This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What Is Cairnghorm In Flex? How Do We Use It?have You Worked With Cairnghorn In Flex? |
|
Answer» Cairngorm is the lightweight micro-architecture for Rich INTERNET APPLICATIONS built in Flex or AIR. A collaboration of recognized design patterns, Cairngorm exemplifies and encourages best-practices for RIA DEVELOPMENT advocated by Adobe Consulting, encourages best-practice leverage of the underlying Flex framework, while making it easier for medium to large teams of software engineers deliver medium to large scale, mission-critical Rich Internet Applications. The benefits of the Cairngorm architecture are realized when developing complex RIA applications with multiple use-cases and views, with a team of developers, and with a multi-disciplinary development team that includes DESIGNERS as well as creative and technical developers. Cairngorm is the lightweight micro-architecture for Rich Internet Applications built in Flex or AIR. A collaboration of recognized design patterns, Cairngorm exemplifies and encourages best-practices for RIA development advocated by Adobe Consulting, encourages best-practice leverage of the underlying Flex framework, while making it easier for medium to large teams of software engineers deliver medium to large scale, mission-critical Rich Internet Applications. The benefits of the Cairngorm architecture are realized when developing complex RIA applications with multiple use-cases and views, with a team of developers, and with a multi-disciplinary development team that includes designers as well as creative and technical developers. |
|
| 2. |
What Are Runtime Shared Libraries In Flex? |
|
Answer» Macromedia FLEX 1.5 you can build runtime shared libraries (RSLs) that can be individually loaded, cached, and used by multiple applications. Use Flex 3 runtime-shared-libraries (RSLs) to reduce the size of your applications and thereby reduce the time required to DOWNLOAD the application. RSLs are just SWF files whose code is used as a shared library between different application SWF files. There are two KINDS of RSLs, signed and unsigned. Signed RSLs are libraries that are signed by Adobe and may be stored in the Flash Player Cache, which can be accessed by applications from any domain. This means if your application is using a signed RSL, the RSL may not even need to be downloaded if the RSL is already in the Flash Player Cache. The signed RSL may have been put into the Flash Player Cache by visiting another web site that was using the same signed RSL. Signed RSLs have a "SWZ" extension. Unsigned RSLs are NORMAL SWF files and are not loaded into the Flash Player Cache. Instead, these RSLs rely on the browser's cache to keep them from being downloaded. Macromedia Flex 1.5 you can build runtime shared libraries (RSLs) that can be individually loaded, cached, and used by multiple applications. Use Flex 3 runtime-shared-libraries (RSLs) to reduce the size of your applications and thereby reduce the time required to download the application. RSLs are just SWF files whose code is used as a shared library between different application SWF files. There are two kinds of RSLs, signed and unsigned. Signed RSLs are libraries that are signed by Adobe and may be stored in the Flash Player Cache, which can be accessed by applications from any domain. This means if your application is using a signed RSL, the RSL may not even need to be downloaded if the RSL is already in the Flash Player Cache. The signed RSL may have been put into the Flash Player Cache by visiting another web site that was using the same signed RSL. Signed RSLs have a "swz" extension. Unsigned RSLs are normal SWF files and are not loaded into the Flash Player Cache. Instead, these RSLs rely on the browser's cache to keep them from being downloaded. |
|
| 3. |
What Are Sealed Classes In Flex? |
|
Answer» A sealed class POSSESSES only the fixed set of properties and methods that were DEFINED at compile-time; additional properties and methods cannot be added. This makes stricter compile-time checking possible, RESULTING in more robust PROGRAMS. A sealed class possesses only the fixed set of properties and methods that were defined at compile-time; additional properties and methods cannot be added. This makes stricter compile-time checking possible, resulting in more robust programs. |
|
| 4. |
What Is Dynamic Keyword Used For In Actionscript? |
|
Answer» Dynamic classes, which allow you to programmatically add new properties and behavior to classes during the run-time. Just add the magic keyword dynamic to the class definition: dynamic class Person { Now let's add dynamically two VARIABLES name and AGE and the function printme() to the OBJECT of type Person: Person p= new Person(); Dynamic classes, which allow you to programmatically add new properties and behavior to classes during the run-time. Just add the magic keyword dynamic to the class definition: dynamic class Person { Now let's add dynamically two variables name and age and the function printme() to the object of type Person: Person p= new Person(); |
|
| 5. |
How Polymorphism Works On Actionscript? |
|
Answer» class UnpaidIntern extends Employee { class UnpaidIntern extends Employee { |
|
| 6. |
What Keyword Allows You To Refer To Private Variables Of A Class In Flex? |
|
Answer» PRIVATE KEYWORD , this keyword (? ) in FLEX Private keyword , this keyword (? ) in flex |
|
| 7. |
How Does Item Renderer Work? How Do We Add Item Renderer At Runtime In Flex? |
|
Answer» Each list control has a default mechanism for controlling the DISPLAY of data, or view, and LETS you override that default. To override the default view, you create a custom item renderer. Note: With reusable inline item renderers you use data binding to BIND to the item renderer. When you use a component as an item renderer, you do not use data binding but specify the name of the custom component to use as an item renderer. Add itemrendrer at run time: Create the basic item renderer. One of the things I needed to accomplish with my item renderer was the ability to add it to different columns (ie the dataField was not always the same). This meant I needed a way from within the renderer to determine what column it was bound to so I could get and display the correct data. To do this the renderer needs to implement the IDropInListItemRenderer. This interface allows the renderer to have access to information about the list and column it is in via the BaseListData and DataGridListData classes. The DataGridListData gives you everything you need to get the data required to MAKE a FLEXIBLE, reusable renderer. To Modify itemrenderer at runtime we Need to use mx.core.ClassFactory. Basically, in order to change a Flex itemRenderer at runtime, you need to cast it to a type ClassFactory. Each list control has a default mechanism for controlling the display of data, or view, and lets you override that default. To override the default view, you create a custom item renderer. Note: With reusable inline item renderers you use data binding to bind to the item renderer. When you use a component as an item renderer, you do not use data binding but specify the name of the custom component to use as an item renderer. Add itemrendrer at run time: Create the basic item renderer. One of the things I needed to accomplish with my item renderer was the ability to add it to different columns (ie the dataField was not always the same). This meant I needed a way from within the renderer to determine what column it was bound to so I could get and display the correct data. To do this the renderer needs to implement the IDropInListItemRenderer. This interface allows the renderer to have access to information about the list and column it is in via the BaseListData and DataGridListData classes. The DataGridListData gives you everything you need to get the data required to make a flexible, reusable renderer. To Modify itemrenderer at runtime we Need to use mx.core.ClassFactory. Basically, in order to change a Flex itemRenderer at runtime, you need to cast it to a type ClassFactory. |
|
| 8. |
Difference Between States And Viewstack In Flex? |
Answer»
|
|
| 9. |
What Is State? What Is The Difference Between States And Viewstack In Flex? |
|
Answer» The State class defines a view state, a particular view of a component. For example, a PRODUCT thumbnail could have two view states; a base view state with minimal information, and a rich view state with additional information. The overrides property specifies a set of child classes to ADD or remove from the base view state, and properties, styles, and event handlers to set when the view state is in effect. You use the State class in the states property of Flex components. You can only SPECIFY a states property at the root of an application or a custom CONTROL, not on child controls. The State class defines a view state, a particular view of a component. For example, a product thumbnail could have two view states; a base view state with minimal information, and a rich view state with additional information. The overrides property specifies a set of child classes to add or remove from the base view state, and properties, styles, and event handlers to set when the view state is in effect. You use the State class in the states property of Flex components. You can only specify a states property at the root of an application or a custom control, not on child controls. |
|
| 10. |
What Is Mvc And How Do You Relate It To Flex Apps? |
|
Answer» (Separation of concerns) The goal of the Model-View-Controller (MVC) ARCHITECTURE is that by creating components with a well-defined and limited scope in your application, you increase the reusability of the components and improve the MAINTAINABILITY of the overall system. Using the MVC architecture. you can partition your system into three categories of components:
(Separation of concerns) The goal of the Model-View-Controller (MVC) architecture is that by creating components with a well-defined and limited scope in your application, you increase the reusability of the components and improve the maintainability of the overall system. Using the MVC architecture. you can partition your system into three categories of components: |
|
| 11. |
What Is The Difference Between Sealed Class And Dynamic Classes In Flex? |
|
Answer» Classes are sealed by default, i.e. properties cannot be added dynamically at runtime.
Classes are sealed by default, i.e. properties cannot be added dynamically at runtime. |
|
| 12. |
How Do We Use Css Styles In Flex? |
|
Answer» EXTERNAL styles are defined in a separate FILE and can be used in any MXML file that references the CSS file. You reference a CSS file into an MXML file with the source property of the <MX:Style> tag, as FOLLOWS: <mx:Style source="../siteStyles.css"/> Embedded styles are defined in an MXML file and can only be used in that file. Embedded styles are defined with the <mx:Style> tag, as follows: <mx:Style> <mx:Button color="red"...> External styles are defined in a separate file and can be used in any MXML file that references the CSS file. You reference a CSS file into an MXML file with the source property of the <mx:Style> tag, as follows: <mx:Style source="../siteStyles.css"/> Embedded styles are defined in an MXML file and can only be used in that file. Embedded styles are defined with the <mx:Style> tag, as follows: <mx:Style> <mx:Button color="red"...> |
|
| 13. |
When I Add Or Modify An Item In My Dataprovider, Why Does Not It Show Up In My Datagrid? |
|
Answer» Low-level methods like Array.push() or myArray[0] = "whatever" do not cause the DATAPROVIDER's modelChanged event to fire. When you WORK with a dataProvider, it is always best to use the dataProvider API. In the above EXAMPLE, you might code: myDataProvider.addItem(myItemObject) to add an item or use editField() to modify a VALUE programmatically. Alternatively, you can call myDataProvider.modelChanged yourself or reassign dataProvider to the CONTROL, as follows: myDataGrid.dataProvider = myDataProvider; Low-level methods like Array.push() or myArray[0] = "whatever" do not cause the dataProvider's modelChanged event to fire. When you work with a dataProvider, it is always best to use the dataProvider API. In the above example, you might code: myDataProvider.addItem(myItemObject) to add an item or use editField() to modify a value programmatically. Alternatively, you can call myDataProvider.modelChanged yourself or reassign dataProvider to the control, as follows: myDataGrid.dataProvider = myDataProvider; |
|
| 14. |
Sometimes, If I Do Not Move The Mouse, "click" And "mousedown" Do Not Work. Why Is That? |
|
Answer» This is a FOCUS issue with Flash PLAYER; USUALLY when the UI changes "underneath" the mouse pointer, as in a VIEWSTACK NAVIGATION where the buttons are in the same screen location. This is a focus issue with Flash Player; usually when the UI changes "underneath" the mouse pointer, as in a ViewStack navigation where the buttons are in the same screen location. |
|
| 15. |
Is Double-clicking Supported On Various Components? |
|
Answer» Unfortunately, double-clicking is not supported by default. If you wish to add this functionality to, SAY, a List or DataGrid COMPONENT, you will have to add the following ActionScript 2.0 code to your application: VAR someTimestamp:Number; Unfortunately, double-clicking is not supported by default. If you wish to add this functionality to, say, a List or DataGrid component, you will have to add the following ActionScript 2.0 code to your application: var someTimestamp:Number; |
|
| 16. |
Can I Resize The Internet Explorer Browser Window From Flex? |
|
Answer» USE getURL() to COMMUNICATE with JAVASCRIPT in the HTML WRAPPER: getURL('javascript:window.resizeTo(1050,900)'); Use getURL() to communicate with JavaScript in the HTML wrapper: getURL('javascript:window.resizeTo(1050,900)'); |
|
| 17. |
How Do I Get Access To The J2ee Session From My Remoteobjects? |
|
Answer» The AMF Gateway provides ACCESS to the CURRENT HttpServletRequest instance in a THREAD LOCAL variable. The session can be obtained from the REQUEST, as follows: The AMF Gateway provides access to the current HttpServletRequest instance in a thread local variable. The session can be obtained from the request, as follows: |
|
| 18. |
Why Do Strongly Typed Objects Appear As "undefined" In The Netconnection Debugger? |
|
Answer» The NetConnection Debugger is an old utility from the early days of Flash REMOTING that some developers still find useful. It has an issue, however, displaying types that have been REGISTERED with Object.registerClass(). If your Flex server is installed locally, we suggest enabling server-side "debug" level logging in /WEB-INF/flex/gateway-config.xml to watch the raw trace information in the Flex server console/logs from the AMF Gateway as it PROCESSES your RemoteObject requests. The NetConnection Debugger is an old utility from the early days of Flash Remoting that some developers still find useful. It has an issue, however, displaying types that have been registered with Object.registerClass(). If your Flex server is installed locally, we suggest enabling server-side "debug" level logging in /WEB-INF/flex/gateway-config.xml to watch the raw trace information in the Flex server console/logs from the AMF Gateway as it processes your RemoteObject requests. |
|
| 19. |
Why Are My Valueobject Member Variables Undefined In The Results From My Remoteobject Requests? |
|
Answer» Flash Player deserializes objects in a special order that can confuse DEVELOPERS used to object serialization from other RPC systems. When a strongly typed object is returned to the player, it first creates an instance from the prototype of the REGISTERED class without calling the constructor. It then POPULATES the object with the properties sent in the RESULT. Finally, it calls the constructor without arguments. If your ValueObject constructor expects arguments to initialize an instance, be sure to check whether arguments were actually sent to the constructor before overriding member variable values. Flash Player deserializes objects in a special order that can confuse developers used to object serialization from other RPC systems. When a strongly typed object is returned to the player, it first creates an instance from the prototype of the registered class without calling the constructor. It then populates the object with the properties sent in the result. Finally, it calls the constructor without arguments. If your ValueObject constructor expects arguments to initialize an instance, be sure to check whether arguments were actually sent to the constructor before overriding member variable values. |
|
| 20. |
When I Set Visible="false", The Component Still Takes Up Space And Appears In The Tab Order. Why Is That? |
|
Answer» You can often achieve the "display=none" effect by setting the height/width to zero when you set it invisible, and then set it BACK to a fixed VALUE or to undefined when you MAKE it visible again. You can often achieve the "display=none" effect by setting the height/width to zero when you set it invisible, and then set it back to a fixed value or to undefined when you make it visible again. |
|
| 21. |
Can I Load Css Style Sheets Dynamically At Runtime? |
|
Answer» Dynamic loading of CSS FILES is not supported in Flex. CSS in Flex is processed on the server side during MXML compilation rather than on the client side at RUNTIME. There is a trick THOUGH: A CSS file can be COMPILED into a separate SWF file and loaded dynamically into the application using the Loader component. Dynamic loading of CSS files is not supported in Flex. CSS in Flex is processed on the server side during MXML compilation rather than on the client side at runtime. There is a trick though: A CSS file can be compiled into a separate SWF file and loaded dynamically into the application using the Loader component. |
|
| 22. |
Can I Dynamically Instantiate A Web Service Or Httpservice In Actionscript? |
|
Answer» Flex 1.5 does not support this. First declare the tags in MXML and then manipulate the URLS, request OBJECTS, and so forth using ActionScript. Flex 1.5 does not support this. First declare the tags in MXML and then manipulate the URLs, request objects, and so forth using ActionScript. |
|
| 23. |
Differences Between Defining Bindings In Mxml And Actionscript? |
|
Answer» There are a few differences between defining data bindings in MXML at compile time and in defining them at runtime in ActionScript:
There are a few differences between defining data bindings in MXML at compile time and in defining them at runtime in ActionScript: |
|
| 24. |
How Do We Identify A Component Created In A Repeater Using Flex? |
|
Answer» If currentIndex value is GREATER than startIndex value means a component is created in Repeater. We can use count property to find number of children.A Repeater component executes initially when it is instantiated. If the Repeater component's dataProvider property exists, it proceeds to instantiate its children, and they instantiate their children, recursively.The Repeater component re-executes whenever its dataProvider, startingIndex, or count properties are set or modified either explicitly in ActionScript, or implicitly by data BINDING. When a Repeater component re-executes, it destroys any children that it PREVIOUSLY created (ASSUMING the recycleChildren property is set to false), and then reinstantiates its children based on the current dataProvider property. If currentIndex value is greater than startIndex value means a component is created in Repeater. We can use count property to find number of children.A Repeater component executes initially when it is instantiated. If the Repeater component's dataProvider property exists, it proceeds to instantiate its children, and they instantiate their children, recursively.The Repeater component re-executes whenever its dataProvider, startingIndex, or count properties are set or modified either explicitly in ActionScript, or implicitly by data binding. When a Repeater component re-executes, it destroys any children that it previously created (assuming the recycleChildren property is set to false), and then reinstantiates its children based on the current dataProvider property. |
|
| 25. |
Explain The Difference Between Creating An Effect And Setting The Target As Opposed To Adding An Effectlistener? |
|
Answer» To create a behavior, you define a specific effect with a unique ID and bind it to the trigger. <mx:Application ...> To create a behavior, you define a specific effect with a unique ID and bind it to the trigger. <mx:Application ...> |
|
| 26. |
What Is The Problem With Calling Setstyle()? |
|
Answer» Calling the setStyle() method can result in DECREASED performance. USE it only when necessary.You should try to apply style SHEETS rather than use the setStyle() method because it is computationally expensive. This method should only be USED when you are changing an object's styles during run TIME.You cannot get or set style properties directly on a component as you can with other properties. Instead, you set style properties at run time by using the getStyle() and setStyle() ActionScript methods. Calling the setStyle() method can result in decreased performance. Use it only when necessary.You should try to apply style sheets rather than use the setStyle() method because it is computationally expensive. This method should only be used when you are changing an object's styles during run time.You cannot get or set style properties directly on a component as you can with other properties. Instead, you set style properties at run time by using the getStyle() and setStyle() ActionScript methods. |
|
| 27. |
What Does Calling Preventdefault() On An Event Do? How Is This Enforced? |
|
Answer» Cancels an event's default behavior if that behavior can be canceled.. For example, the DOUBLECLICK event has an associated default behavior that highlights the word under the mouse pointer at the TIME of the event. Your event listener can cancel this behavior by calling the preventDefault() METHOD. You can use the Event.cancelable property to check WHETHER you can PREVENT the default behavior associated with a particular event. If the value of Event.cancelable is true, then preventDefault() can be used to cancel the event; otherwise, preventDefault() has no effect. Cancels an event's default behavior if that behavior can be canceled.. For example, the doubleClick event has an associated default behavior that highlights the word under the mouse pointer at the time of the event. Your event listener can cancel this behavior by calling the preventDefault() method. You can use the Event.cancelable property to check whether you can prevent the default behavior associated with a particular event. If the value of Event.cancelable is true, then preventDefault() can be used to cancel the event; otherwise, preventDefault() has no effect. |
|
| 28. |
How Do You Add Event Listeners In Mxml Components. Now As3 Components? |
|
Answer» ADDEVENTLISTENER(type:String, listener:Function, useCapture:BOOLEAN = FALSE, PRIORITY:int = 0, useWeakReference:Boolean = false):void
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void |
|
| 29. |
Why Would You Want To Keep A Reference To A Changewatcher And Call Unwatch()? |
|
Answer» So we can reattach the WATCHER again & We can change the source object (of changewatcher) by reset method.The ChangeWatcher class defines UTILITY methods that you can use with bindable Flex properties. These methods let you DEFINE an event handler that is executed whenever a bindable property is updated. unwatch() method: Detaches this ChangeWatcher instance, and its handler function, from the current host. You can use the reset() method to reattach the ChangeWatcher instance, or watch the same property or chain on a different host object. public function unwatch():void So we can reattach the watcher again & We can change the source object (of changewatcher) by reset method.The ChangeWatcher class defines utility methods that you can use with bindable Flex properties. These methods let you define an event handler that is executed whenever a bindable property is updated. unwatch() method: Detaches this ChangeWatcher instance, and its handler function, from the current host. You can use the reset() method to reattach the ChangeWatcher instance, or watch the same property or chain on a different host object. public function unwatch():void |
|
| 30. |
What Is The Difference Between Changewatcher.watch, And Bindingutils.bindproperty? |
|
Answer» ChangeWatcher: Acts like the watch on AS2. It watches a variable for changes and when SOMETHING happens fires an event. Make sure you call the canWatch to ensure that you can watch it! There are 3 ways to specify the second parameter, the chain.
{ name: property name, ACCESS: function (host) { return host[name] } }.
Works pretty much the same way as the watch, but instead of having to handle and event it allows you to immediately bind two properties one-way.The first two parameters are for the the target, the second parameters are the triggers. BindingUtils.bindProperty( this, "va1", this, "var2"); Note : Make sure you add the flex framework.swc to your project Library Path to have access to the mx.binding.util class. ChangeWatcher: Acts like the watch on AS2. It watches a variable for changes and when something happens fires an event. Make sure you call the canWatch to ensure that you can watch it! There are 3 ways to specify the second parameter, the chain. { name: property name, access: function (host) { return host[name] } }. Works pretty much the same way as the watch, but instead of having to handle and event it allows you to immediately bind two properties one-way.The first two parameters are for the the target, the second parameters are the triggers. BindingUtils.bindProperty( this, "va1", this, "var2"); Note : Make sure you add the flex framework.swc to your project Library Path to have access to the mx.binding.util class. |
|
| 31. |
Explain How Binding Works In Mxml Components In Flex? |
|
Answer» Binding in MXML: LETS look at the following code… Here you are binding the text property of the TextInput to the label. So whatever you type in the textInput automatically reflects in the label. That’s the POWER of Binding… The best practice for defining components that return information back to the main application is to design the component to dispatch an event that contains the return data. In that way, the main application can define an event LISTENER to handle the event and TAKE the appropriate action. You also use events in data binding. The following example uses the Bindable metadata tag to make useShortNames a bindable property.The implicit setter for the useShortNames property dispatches the change event that is used internally by the Flex framework to make data binding work. Binding in MXML: Lets look at the following code… Here you are binding the text property of the TextInput to the label. So whatever you type in the textInput automatically reflects in the label. That’s the power of Binding… The best practice for defining components that return information back to the main application is to design the component to dispatch an event that contains the return data. In that way, the main application can define an event listener to handle the event and take the appropriate action. You also use events in data binding. The following example uses the Bindable metadata tag to make useShortNames a bindable property.The implicit setter for the useShortNames property dispatches the change event that is used internally by the Flex framework to make data binding work. |
|
| 32. |
What Design Patterns Have You Used? In Actionscript And Java? |
Answer»
|
|
| 33. |
What Is Interface Or Benefit Of Interface In Term Of Oop? |
| Answer» | |
| 34. |
What Is Display Container? |
|
Answer» Display OBJECT container is special type of display object which can CONTAIN child display OBJECTS in addition to (generally) having its own visual representation. When a display object container is removed from the display LIST, all its children are removed as well. Display object container is special type of display object which can contain child display objects in addition to (generally) having its own visual representation. When a display object container is removed from the display list, all its children are removed as well. |
|
| 35. |
What Is Display Object? |
|
Answer» Display object is an object which represents some type of VISUAL CONTENT in Flash Player. Only display objects can be INCLUDED in the display list, and all display object classes are subclasses of the DisplayObject CLASS. After a display object is created, it won't appear on-screen until it is added into a display object container. Display object is an object which represents some type of visual content in Flash Player. Only display objects can be included in the display list, and all display object classes are subclasses of the DisplayObject class. After a display object is created, it won't appear on-screen until it is added into a display object container. |
|
| 36. |
What Is Display List? |
|
Answer» DISPLAY list is hierarchy of display objects that will be rendered as visible screen content by Flash Player. The Stage is the root of the display list, and all the display objects that are ATTACHED to the Stage or one of its CHILDREN form the display list (even if the OBJECT isn't actually rendered, for example if it's outside the BOUNDARIES of the Stage). Display list is hierarchy of display objects that will be rendered as visible screen content by Flash Player. The Stage is the root of the display list, and all the display objects that are attached to the Stage or one of its children form the display list (even if the object isn't actually rendered, for example if it's outside the boundaries of the Stage). |
|
| 37. |
What Is The Model-view-controller (mvc) Pattern? |
|
Answer» The Model-VIEW-Controller (MVC) is a compound pattern, or multiple PATTERNS working together to create complexapplications.
The Model-View-Controller (MVC) is a compound pattern, or multiple patterns working together to create complexapplications. |
|
| 38. |
What Is Polymorphism In Term Of Oop (flash Actionscript)? |
|
Answer» Inheritance also allows you to take advantage of polymorphism in your code. Polymorphism is the ability to use a SINGLE method name for a method that BEHAVES DIFFERENTLY when applied to DIFFERENT data types. Inheritance also allows you to take advantage of polymorphism in your code. Polymorphism is the ability to use a single method name for a method that behaves differently when applied to different data types. |
|
| 39. |
What Is Inheritance In Term Of Oop (flash Actionscript)? |
|
Answer» Inheritance is a form of code reuse that allows programmers to develop new CLASSES that are based on existing classes. The existing classes are OFTEN referred to as base classes or superclasses, while the new classes are usually called subclasses. Advantage of inheritance is that it allows you to reuse code from a base class. Use the EXTENDS KEYWORD to indicate that a class inherits from another class. Inheritance is a form of code reuse that allows programmers to develop new classes that are based on existing classes. The existing classes are often referred to as base classes or superclasses, while the new classes are usually called subclasses. Advantage of inheritance is that it allows you to reuse code from a base class. Use the extends keyword to indicate that a class inherits from another class. |
|
| 40. |
What Is Interface In Term Of Oop (flash Actionscript)? |
|
Answer» An interface is a collection of method declarations that allows unrelated OBJECTS to communicate with one ANOTHER. The structure of an interface definition is SIMILAR to that of a class definition, except that an interface can contain only METHODS with no method bodies. Interfaces cannot include variables or constants but can include getters and setters. To DEFINE an interface, use the interface keyword. Use the implements keyword in a class declaration to implement one or more interfaces. An interface is a collection of method declarations that allows unrelated objects to communicate with one another. The structure of an interface definition is similar to that of a class definition, except that an interface can contain only methods with no method bodies. Interfaces cannot include variables or constants but can include getters and setters. To define an interface, use the interface keyword. Use the implements keyword in a class declaration to implement one or more interfaces. |
|
| 41. |
What Is Different Between Urlloader Class And Loader Class? |
|
Answer» The URLLoader class downloads data from a URL as text, binary data, or URL-encoded variables. It is USEFUL for downloading text files, XML, or other information to be used in a dynamic, data-driven application. A URLLoader object downloads all of the data from a URL before making it available to ACTIONSCRIPT. It sends out notifications about the PROGRESS of the download, which you can monitor through the bytesLoaded and bytesTotal properties, as well as through dispatched events. The Loader class is used to load SWF files or image (JPG, PNG, or GIF) files. Use the load() method to initiate loading. The loaded display object is added as a CHILD of the Loader object. The URLLoader class downloads data from a URL as text, binary data, or URL-encoded variables. It is useful for downloading text files, XML, or other information to be used in a dynamic, data-driven application. A URLLoader object downloads all of the data from a URL before making it available to ActionScript. It sends out notifications about the progress of the download, which you can monitor through the bytesLoaded and bytesTotal properties, as well as through dispatched events. The Loader class is used to load SWF files or image (JPG, PNG, or GIF) files. Use the load() method to initiate loading. The loaded display object is added as a child of the Loader object. |
|
| 42. |
Tell Some New Capabilities / Features Of Flash As 3.0? |
|
Answer» URLLoader class to load TEXT or BINARY data (The ActionScript 2.0 MovieClipLoader and LoadVars classes are not used in ActionScript 3.0. The Loader and URLLoader classes replace them.) Sound.computeSpectrum() (Takes a snapshot of the current sound wave and places it into the specified ByteArray object. It returns a ByteArray containing 512 normalized values (-1 to 1) that can be used to visually display the waveform of sound. 256 values for the left channel and 256 values for the right channel. These values can be use to create Sound Spectrum Analyzer displays in Audio Players like Winamp and Windows Media Playres.) BitmapData.getPixels() (GENERATES a byte array from a rectangular region of pixel data. Writes an unsigned integer (a 32-bit unmultiplied pixel value) for each pixel into the byte array. No need to loop through every pixel in a bitmap, one at a TIME with getPixel to send a bitmap to the server.) MovieClip.currentLabel (This returns the label of the current frame as a String. The current label in which the playhead is located in the timeline of the MovieClip instance. If the current frame has no label, currentLabel is set to the name of the previous frame that includes a label. If the current frame and previous frames do not include a label, currentLabel returns null.) stage.frameRate ( At runtime frame RATE of stage can be change) URLLoader class to load text or binary data (The ActionScript 2.0 MovieClipLoader and LoadVars classes are not used in ActionScript 3.0. The Loader and URLLoader classes replace them.) Sound.computeSpectrum() (Takes a snapshot of the current sound wave and places it into the specified ByteArray object. It returns a ByteArray containing 512 normalized values (-1 to 1) that can be used to visually display the waveform of sound. 256 values for the left channel and 256 values for the right channel. These values can be use to create Sound Spectrum Analyzer displays in Audio Players like Winamp and Windows Media Playres.) BitmapData.getPixels() (Generates a byte array from a rectangular region of pixel data. Writes an unsigned integer (a 32-bit unmultiplied pixel value) for each pixel into the byte array. No need to loop through every pixel in a bitmap, one at a time with getPixel to send a bitmap to the server.) MovieClip.currentLabel (This returns the label of the current frame as a String. The current label in which the playhead is located in the timeline of the MovieClip instance. If the current frame has no label, currentLabel is set to the name of the previous frame that includes a label. If the current frame and previous frames do not include a label, currentLabel returns null.) stage.frameRate ( At runtime frame rate of stage can be change) |
|
| 43. |
Can I Embed Html In My Flex Application? |
|
Answer» FLEX supports a limited subset of HTML in its TEXTAREA and some other text-related CLASSES. Flex supports a limited subset of HTML in its TextArea and some other text-related classes. |
|
| 44. |
Why Are The Columns In My Datagrid In Some Strange Order? |
|
Answer» The order is typically the reverse of the order in which they were added. If you NEED a specific order, specify that and many other good THINGS by using DataGridColumn TAGS. The order is typically the reverse of the order in which they were added. If you need a specific order, specify that and many other good things by using DataGridColumn tags. |
|
| 45. |
When I Have Only A Single Record, Why Does Not It Appear In My Datagrid? |
|
Answer» This is a KNOWN issue that is caused by the inability of Flex to DIFFERENTIATE between an object and an ARRAY with a single row. The solution is to ALWAYS use TOARRAY(), as in the following examples: In MXML: The inline format: In ActionScript: This is a known issue that is caused by the inability of Flex to differentiate between an object and an array with a single row. The solution is to always use toArray(), as in the following examples: In MXML: The inline format: In ActionScript: |
|
| 46. |
What Is The Difference In Movieclip And Sprite? |
|
Answer» Sprite does not have TIMELINE in it But MOVIE Clips can have. Sprite is the parent class of MOVIECLIP though not all of the MovieClip properties are AVAILABLE in the parent class. Sprite does not have timeline in it But Movie Clips can have. Sprite is the parent class of MovieClip though not all of the MovieClip properties are available in the parent class. |
|
| 47. |
I Have I Input Text Field On Stage And I Have A Button Also, Further I Am Writing Some Text In That Input Text Field. I Want To Save My Written Data On My Local System (on My Computer), How Can I Do This? |
|
Answer» To achieve this you have to use FLASH CS4 with Flash Player 10 or above. Using the new method of filereference class you can save you typed text on your computer as a text file. FIRST create a object of filereference… then use the save method and pass your data to it. Code: var TxtF:TextField = new TextField(); To achieve this you have to use flash CS4 with Flash Player 10 or above. Using the new method of filereference class you can save you typed text on your computer as a text file. First create a object of filereference… then use the save method and pass your data to it. Code: var TxtF:TextField = new TextField(); |
|
| 48. |
How Can You Show A Jpg Image In Dynamic Text Field? |
|
Answer» Using HTML Tags in HTML enabled text field you can LOAD image in that. Make a DYNAMIC Text Field on STAGE and give it instance name "txt", On frame paste the following CODE and test your flash. Code: txt.htmlText ="<img src='http://www.globalguideline.com/images/ggl.gif' width='139' height='139'> This image is under Dynamic text field of flash " Using HTML Tags in HTML enabled text field you can load image in that. Make a Dynamic Text Field on Stage and give it instance name "txt", On frame paste the following code and test your flash. Code: txt.htmlText ="<img src='http://www.globalguideline.com/images/ggl.gif' width='139' height='139'> This image is under Dynamic text field of flash " |
|
| 49. |
How Do I Make Synchronous Data Calls In Actionscript? |
|
Answer» You cannot make synchronous calls. You must use the result event. No, you can't use a loop, setInterval, or even doLater. This paradigm is quite aggravating at first. Take a DEEP breath, surrender to the inevitable, RESISTANCE is futile. There is a generic way to handle the asynchronous nature of data service calls, CALLED ACT (Asynchronous CALL Token). Search for this in the Developing Flex Applications LiveDocs for a full description. Here it is in a nutshell. This example uses HTTPService but will be similar for RemoteObject and WebService:
//invokes the call to the HTTP data service
var callResponse = oEvent.call; //get the call object You cannot make synchronous calls. You must use the result event. No, you can't use a loop, setInterval, or even doLater. This paradigm is quite aggravating at first. Take a deep breath, surrender to the inevitable, resistance is futile. There is a generic way to handle the asynchronous nature of data service calls, called ACT (Asynchronous Call Token). Search for this in the Developing Flex Applications LiveDocs for a full description. Here it is in a nutshell. This example uses HTTPService but will be similar for RemoteObject and WebService: //invokes the call to the HTTP data service var callResponse = oEvent.call; //get the call object |
|
| 50. |
How Do I Get Flex To Query My Database? |
|
Answer» Flex does not have any native database INTEGRATION functionality. You must have your own server-side tier that provides the database-access tier and sends the data back to Flex through one of the following protocols:
Flex does not have any native database integration functionality. You must have your own server-side tier that provides the database-access tier and sends the data back to Flex through one of the following protocols: |
|