61+ Adobe Flex Action Script Interview Questions And Answers

Spread the love

Adobe Flex Action Script Interview Questions

Question 1. What Is A Drag Manager In Adobe Flex Actionscript?

The Flex Drag and Drop Manager lets you choose an object, similar to an merchandise in a List management, or a Flex management, similar to an Image management, after which drag it over one other element so as to add it to that element.

Question 2. Explain What Is The Function Of Trace?

Initiate the automated debugging process.
Discover who has downloaded your film.
Send String Values to the output panel.
Determine what objects are presents on stage ant anyone time.

Question 3. What Are The Correct Statements Concerning Text Field?

Embedded font outlines are shared by textual content fields utilizing the identical font.
Font Outlines for static for static textual content discipline are embedded within the SWF file by default.
Font define for enter textual content discipline are embedded in SWF file by default.
Individual font outlines are embedded in to the SWF file for every textual content discipline within the FLA file.
Font outlines for dynamic textual content fields are embedded in SWF file by default.
Question 4. Explain How Many Levels Does Flash Mx Support?

20
80
100
1000

Question 5. Explain What Happens If An .swf Is Loaded Into A Already Occupied Level?

An error is thrown.
The new swf is rejected and the outdated one stays.
The outdated swf is unloaded and the brand new swf is loaded.
They share the identical degree

Question 6. What Are The Similarities Between Java And Flex?

Both can be utilized as shopper utility, each have packages, OOP based mostly , help XML , import exterior packages, up casting, help ArrayAssortment ,virtually identical primitive information sorts, each help class library packaging( .jar , .swc).

Question 7. What Is A Resource Manager In Flex Actionscript?

The ResourceManager – now handles entry to all localized sources in an utility. Any parts that reach UIComponent, Formatter, or Validator now have a brand new useful resourceManager property, which helps you to simply entry the singleton occasion of this supervisor. If you are writing another sort of class that should use the ResourceManager, you’ll be able to name ResourceManager.getInstance() to get a reference to it.

Question 8. Why Are There Errors With The Macromedia.css.locatorparser Class And Weblogic?

WebLogic ships with its personal model of the fop.jar, which in flip consists of the batik.jar, which is older and breaks Flex. To resolve this concern, take away the fop.jar from the CLASSPATH within the beginWebLogic.cmd file. This could apply to non-WebLogic servers as properly, the place batik.jar was included.

Question 9. How Do I Pass Parameters To A Pop-up Window In Actionscript?

Three other ways to cross information right into a title window.

It makes use of the initobj to cross in a number of built-in properties plus two consumer outlined properties.

One is an easy string, the opposite is a reference to the principle utility that can be utilized for binding. Note the variable that holds the applying reference is typed to the title of the applying. that is important for binding to work accurately.

Question 10. How Do I Run Flex As A Service?

Flex just isn’t a server that you just deploy and run. It is just deployed as a part of your net utility. So it is going to work, irrespective of which net container you’re utilizing: Tomcat, JRun 4, WebLogic, and so forth. To discover ways to deploy Tomcat, JRun 4, or another Java server as a service, confer with the suitable documentation for the server you’re utilizing.

Question 11. How Do I Get Flex To Query My Database?

Flex doesn’t have any native database integration performance. You will need to have your personal server-side tier that gives the database-access tier and sends the info again to Flex via one of many following protocols:

DistantObjects: This is the quickest. It communicates with server-side EJBs or POJOs utilizing AMF, a binary compressed format.
HTTPService: This one makes use of the HTTP protocol. Sources will be JSP, ASPx, .NET, or any URL that returns HTTP.
WebService: This is the slowest. It makes use of the SOAP protocol. Sources will be .NET or any net service.

Question 12. How Do I Make Synchronous Data Calls In Actionscript?

You can’t make synchronous calls. You should use the outcome occasion. No, you’ll be able to’t use a loop, setInterval, and even doLater. This paradigm is kind of aggravating at first. Take a deep breath, give up to the inevitable, resistance is futile.

There is a generic option to deal with the asynchronous nature of information service calls, referred to as ACT (Asynchronous Call Token). Search for this within the Developing Flex Applications DwellDocs for a full description.

Here it’s in a nutshell. This instance makes use of HTTPService however shall be comparable for DistantObject and WebService:

Create a perform to deal with the info return, like onResult().
In the HTTPService tag, put this perform title within the outcome property and cross “occasion” in too.
Invoke the decision within the script:
//invokes the decision to the HTTP information service
var oRequestCallbject = app.mxdsGetData.ship(oRequest);
//Next, outline a string to establish the decision. We will use this string worth within the outcome handler.
oRequestCall.MyQueryId = “WhateverIWanttoUseToIdentifyThisCall” ;
//Yes, you CAN set this AFTER you invoke ship()

In the outcome handler, which shall be referred to as each time the info service name returns, establish what the returned information incorporates, as follows:
var callResponse = oEvent.name; //get the decision object
//will get the worth of this property you set within the name
var sQueryId = callResponse.MyQueryId; //shall be “WhateverIWanttoUseToIdentifyThisCall”;
hint(sQueryId);

Question 13. How Can You Show A Jpg Image In Dynamic Text Field?

Using HTML Tags in HTML enabled textual content discipline you’ll be able to load picture in that. Make a Dynamic Text Field on Stage and provides it occasion title “txt”, On body paste the next code and take a look at your flash.

Code: txt.htmlText =”<img src=’http://www.globalguideline.com/images/ggl.gif’ width=’139′ peak=’139′> This picture is below Dynamic textual content discipline of flash ”

Question 14. 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?

To obtain this it’s a must to use flash CS4 with Flash Player 10 or above. Using the brand new methodology of filereference class it can save you you typed textual content in your laptop as a textual content file.

First create a object of filereference… then use the save methodology and cross your information to it.
var fR:FileReference =new FileReference()
fR.save(“your Written textual content needs to be come right here.”,”flexflashforum.txt”)
Paste the next code on body and run a pattern utility…

Code:

var TxtF:TextField = new TextField();
var BtnMc:TextField = new TextField();
var MyFile:FileReference = new FileReference();
TxtF.border = true;
TxtF.sort = TextFieldSort.INPUT;
BtnMc.background = true;
BtnMc.backgroundColor = 0xCCCCCC;
BtnMc.x = 150;
BtnMc.peak = 20;
BtnMc.textual content = ” Click right here to save lots of”;

Question 15. What Is The Difference In Movieclip And Sprite?

Sprite doesn’t have timeline in it But Movie Clips can have. Sprite is the mum or dad class of MovieClip although not the entire MovieClip properties can be found within the mum or dad class.

Question 16. When I Have Only A Single Record, Why Does Not It Appear In My Datagrid?

This is a identified concern that’s brought on by the shortcoming of Flex to distinguish between an object and an array with a single row. The answer is to all the time use toArray(), as within the following examples:

In MXML:
{mx.utils.ArrayUtil.toArray(modelAccidents1.accidents.accident)}

The inline format:
dataProvider=

In ActionScript:
myControl.dataProvider = mx.utils.ArrayUtil.toArray(testSrv.outcome.outcome.error)

Question 17. Why Are The Columns In My Datagrid In Some Strange Order?

The order is usually the reverse of the order wherein they have been added. If you want a particular order, specify that and plenty of different good issues through the use of DataGridColumn tags.

Question 18. Can I Embed Html In My Flex Application?

Flex helps a restricted subset of HTML in its TextArea and another text-related lessons.

Question 19. Tell Some New Capabilities / Features Of Flash As 3.0?

URLLoader class to load textual content or binary information (The ActionScript 2.0 MovieClipLoader and LoadVars lessons will not be utilized in ActionScript 3.0. The Loader and URLLoader lessons substitute them.)

Sound.computeSpectrum() (Takes a snapshot of the present sound wave and locations it into the required ByteArray object. It returns a ByteArray containing 512 normalized values (-1 to 1) that can be utilized to visually show the waveform of sound. 256 values for the left channel and 256 values for the best channel. These values will be use to create Sound Spectrum Analyzer shows in Audio Players like Winamp and Windows Media Playres.)

BitmapData.getPixels() (Generates a byte array from an oblong area of pixel information. Writes an unsigned integer (a 32-bit unmultiplied pixel worth) for every pixel into the byte array. No must loop via each pixel in a bitmap, one after the other with getPixel to ship a bitmap to the server.)

MovieClip.presentLabel (This returns the label of the present body as a String. The present label wherein the playhead is situated within the timeline of the MovieClip occasion. If the present body has no label, presentLabel is about to the title of the earlier body that features a label. If the present body and former frames don’t embrace a label, presentLabel returns null.)

stage.frameRate ( At runtime body charge of stage will be change)

Question 20. What Is Different Between Urlloader Class And Loader Class?

The URLLoader class downloads information from a URL as textual content, binary information, or URL-encoded variables. It is helpful for downloading textual content recordsdata, XML, or different info for use in a dynamic, data-driven utility. A URLLoader object downloads the entire information from a URL earlier than making it obtainable to ActionScript. It sends out notifications in regards to the progress of the obtain, which you’ll monitor via the bytesLoaded and bytesTotal properties, in addition to via dispatched occasions.

The Loader class is used to load SWF recordsdata or picture (JPG, PNG, or GIF) recordsdata. Use the load() methodology to provoke loading. The loaded show object is added as a toddler of the Loader object.

Question 21. What Is Interface In Term Of Oop (flash Actionscript)?

An interface is a set of methodology declarations that enables unrelated objects to speak with each other. The construction of an interface definition is much like that of a category definition, besides that an interface can comprise solely strategies with no methodology our bodies. Interfaces can’t embrace variables or constants however can embrace getters and setters. To outline an interface, use the interface key phrase. Use the implements key phrase in a category declaration to implement a number of interfaces.

Question 22. What Is Inheritance In Term Of Oop (flash Actionscript)?

Inheritance is a type of code reuse that enables programmers to develop new lessons which might be based mostly on current lessons. The current lessons are sometimes called base lessons or superclasses, whereas the brand new lessons are normally referred to as subclasses. Advantage of inheritance is that it lets you reuse code from a base class. Use the extends key phrase to point {that a} class inherits from one other class.

Question 23. What Is Polymorphism In Term Of Oop (flash Actionscript)?

Inheritance additionally lets you benefit from polymorphism in your code. Polymorphism is the power to make use of a single methodology title for a way that behaves in another way when utilized to totally different information sorts.

Question 24. What Is The Model-view-controller (mvc) Pattern?

The Model-View-Controller (MVC) is a compound sample, or a number of patterns working collectively to create complexapplications.

Model Contains the applying information and logic to handle the state of the applying
View Presents the consumer interface and the state of the applying onscreen
Controller Handles consumer enter to alter the state of the applying

Question 25. What Is Display List?

Display checklist is hierarchy of show objects that shall be rendered as seen display content by Flash Player. The Stage is the basis of the show checklist, and all of the show objects which might be hooked up to the Stage or considered one of its kids kind the show checklist (even when the thing is not truly rendered, for instance if it is outdoors the boundaries of the Stage).

Question 26. What Is Display Object?

Display object is an object which represents some sort of visible content in Flash Player. Only show objects will be included within the show checklist, and all show object lessons are subclasses of the DisplayObject class. After a show object is created, it will not seem on-screen till it’s added right into a show object container.

Question 27. What Is Display Container?

Display object container is particular sort of show object which might comprise little one show objects along with (typically) having its personal visible illustration. When a show object container is faraway from the show checklist, all its kids are eliminated as properly.

Question 28. What Is Interface Or Benefit Of Interface In Term Of Oop?

Allows you to specify a set of strategies that lessons are required to implement.
Classes can implement a number of interfaces,interfaces can prolong each-other.
Interfaces will be seen as contracts to be developed towards, nice for frameworks.

Question 29. What Design Patterns Have You Used? In Actionscript And Java?

Creational Pattern
Factory Method Pattern.
Singleton Pattern.
Structural Patterns
Decorator Pattern.
Adapter Pattern.
Coposite Pattern.
Behavioral Patterns
Command Pattern.
Observer Pattern.
Template Metod Pattern.
State Pattern.
Strategy Pattern.
Multiple Patterns
MVC Pattern.
Symetric Proxy Pattern.

Question 30. Explain How Binding Works In Mxml Components In Flex?

Binding in MXML:

Lets have a look at the next code…
<mx:TextInput id=”ti1?/>
<mx:Label id=”label1? textual content=””/>

Here you’re binding the textual content property of the TextInput to the label. So no matter you sort within the textual contentInput routinely displays within the label. That’s the ability of Binding…

The greatest follow for outlining parts that return info again to the principle utility is to design the element to dispatch an occasion that incorporates the return information. In that manner, the principle utility can outline an occasion listener to deal with the occasion and take the suitable motion. You additionally use occasions in information binding.

The following instance makes use of the Bindable metadata tag to make useShortNames a bindable property.The implicit setter for the useShortNames property dispatches the change occasion that’s used internally by the Flex framework to make information binding work.

Question 31. What Is The Difference Between Changewatcher.watch, And Bindingutils.bindproperty?

ChangeWatcher: Acts just like the watch on AS2. It watches a variable for adjustments and when one thing occurs fires an occasion. Make certain you name the canWatch to make sure which you can watch it! There are Three methods to specify the second parameter, the chain.

A String containing the title of a public bindable property of the host object.ChangeWatcher.watch(this, “myvar”, handler)
An Object within the kind:
{ title: property title, entry: perform (host) { return host[name] } }.
The Object incorporates the title of a public bindable property, and a perform which serves as a getter for that property.ChangeWatcher.watch(this, { title:”myvar”, getter: perform():String return “one thing” }, handler);

A non-empty Array containing any mixture of the primary two choices. This represents a series of bindable properties accessible from the host. For instance, to look at the property host.a.b.c, name the strategy as: watch(host, [“a”,”b”,”c”] BindingUtils.bindProperty
Works just about the identical manner because the watch, however as a substitute of getting to deal with and occasion it lets you instantly bind two properties one-way.The first two parameters are for the the goal, the second parameters are the triggers.

BindingUtils.bindProperty( this, “va1”, this, “var2”);

Note : Make certain you add the flex framework.swc to your mission Library Path to have entry to the mx.binding.util class.

Question 32. Why Would You Want To Keep A Reference To A Changewatcher And Call Unwatch()?

So we will reattach the watcher once more & We can change the supply object (of changewatcher) by reset methodology.The ChangeWatcher class defines utility strategies that you should use with bindable Flex properties. These strategies allow you to outline an occasion handler that’s executed every time a bindable property is up to date.

unwatch() methodology: Detaches this ChangeWatcher occasion, and its handler perform, from the present host. You can use the reset() methodology to reattach the ChangeWatcher occasion, or watch the identical property or chain on a unique host object.

public perform unwatch():void

Question 33. How Do You Add Event Listeners In Mxml Components. Now As3 Components?

addEventListener(sort:String, listener:Function, useCapture:Boolean = false, precedence:int = 0, useWeakReference:Boolean = false):void

take awayEventListener(sort:String, listener:Function, useCapture:Boolean = false):void
dispatchEvent(occasion:Event):Boolean
hasEventListener(sort:String):Boolean
willTrigger(sort:String):Boolean

Question 34. What Does Calling Preventdefault() On An Event Do? How Is This Enforced?

Cancels an occasion’s default habits if that habits will be canceled.. For instance, the doubleClick occasion has an related default habits that highlights the phrase below the mouse pointer on the time of the occasion. Your occasion listener can cancel this habits by calling the preventDefault() methodology. You can use the Event.cancelable property to verify whether or not you’ll be able to forestall the default habits related to a selected occasion. If the worth of Event.cancelable is true, then preventDefault() can be utilized to cancel the occasion; in any other case, preventDefault() has no impact.

Question 35. What Is The Problem With Calling Setstyle()?

Calling the setStyle() methodology can lead to decreased efficiency. Use it solely when obligatory.You ought to attempt to apply type sheets relatively than use the setStyle() methodology as a result of it’s computationally costly. This methodology ought to solely be used when you find yourself altering an object’s kinds throughout run time.You can’t get or set type properties instantly on a element as you’ll be able to with different properties. Instead, you set type properties at run time through the use of the getStyle() and setStyle() ActionScript strategies.

Question 36. Explain The Difference Between Creating An Effect And Setting The Target As Opposed To Adding An Effectlistener?

To create a habits, you outline a particular impact with a singular ID and bind it to the set off.
For instance, the next code creates two zoom results: one for shrinking the element barely, and one for reverting it to its unique dimension. These results are assigned, through the use of their distinctive IDs, to the mouseDownEffect and mouseUpEffect triggers on the Button element.

<mx:Application …>
<mx:Zoom id=”shrink” period=”100″ zoomHeightTo=”.9″ zoomWidthTo=”.9″ />
<mx:Zoom id=”revert” period=”50″ zoomHeightTo=”1″ zoomWidthTo=”1″ />
<mx:Panel title=”Bouncy Button” paddingTop=”10″ paddingBottom=”10″
paddingLeft=”10″ paddingRight=”10″ autoLayout=”false” left=”41″ prime=”24″ proper=”42″>
<mx:Button id=”bouncyButton” label=”Click me!”
mouseDownEffect=”{shrink}” mouseUpEffect=”{revert}”/>
</mx:Panel>
</mx:Application>

Question 37. How Do We Identify A Component Created In A Repeater Using Flex?

If presentIndex worth is bigger than beginIndex worth means a element is created in Repeater. We can use rely property to seek out variety of kids.A Repeater element executes initially when it’s instantiated. If the Repeater element’s dataProvider property exists, it proceeds to instantiate its kids, and so they instantiate their kids, recursively.The Repeater element re-executes every time its dataProvider, beginningIndex, or rely properties are set or modified both explicitly in ActionScript, or implicitly by information binding.

When a Repeater element re-executes, it destroys any kids that it beforehand created (assuming the recycleChildren property is about to false), after which reinstantiates its kids based mostly on the present dataProvider property.

Question 38. Differences Between Defining Bindings In Mxml And Actionscript?

There are a number of variations between defining information bindings in MXML at compile time and in defining them at runtime in ActionScript:

You can’t embrace ActionScript code in a knowledge binding expression outlined by the bindProperty() or bindSetter() methodology. Instead, use the bindSetter() methodology to specify a way to name when the binding happens.
You can’t embrace an E4X expression in a knowledge binding expression outlined in ActionScript.
You can’t embrace features or array components in property chains in a knowledge binding expression outlined by the bindProperty() or bindSetter() methodology. For extra info on property chains, see Working with bindable property chains.
The MXML compiler has higher warning and error detection help than runtime information bindings outlined by the bindProperty() or bindSetter() methodology.

Question 39. Can I Dynamically Instantiate A Web Service Or Httpservice In Actionscript?

Flex 1.5 doesn’t help this. First declare the tags in MXML after which manipulate the URLs, request objects, and so forth utilizing ActionScript.

Question 40. Can I Load Css Style Sheets Dynamically At Runtime?

Dynamic loading of CSS recordsdata just isn’t supported in Flex. CSS in Flex is processed on the server aspect throughout MXML compilation relatively than on the shopper aspect at runtime. There is a trick although: A CSS file will be compiled right into a separate SWF file and loaded dynamically into the applying utilizing the Loader element.

Question 41. When I Set Visible=”false”, The Component Still Takes Up Space And Appears In The Tab Order. Why Is That?

You can typically obtain the “show=none” impact by setting the peak/width to zero if you set it invisible, after which set it again to a set worth or to undefined if you make it seen once more.

Question 42. Why Are My Valueobject Member Variables Undefined In The Results From My Remoteobject Requests?

Flash Player deserializes objects in a particular order that may confuse builders used to object serialization from different RPC techniques. When a strongly typed object is returned to the participant, it first creates an occasion from the prototype of the registered class with out calling the constructor. It then populates the thing with the properties despatched within the outcome. Finally, it calls the constructor with out arguments.

If your WorthObject constructor expects arguments to initialize an occasion, you should definitely verify whether or not arguments have been truly despatched to the constructor earlier than overriding member variable values.

Question 43. Why Do Strongly Typed Objects Appear As “undefined” In The Netconnection Debugger?

The NetConnection Debugger is an outdated utility from the early days of Flash Remoting that some builders nonetheless discover helpful. It has a difficulty, nevertheless, displaying sorts which have been registered with Object.registerClass(). If your Flex server is put in domestically, we propose enabling server-side “debug” degree logging in /WEB-INF/flex/gateway-config.xml to look at the uncooked hint info within the Flex server console/logs from the AMF Gateway because it processes your DistantObject requests.
Flex Builder additionally features a Network Debugger that lets you monitor AMF traffic.

Question 44. How Do I Get Access To The J2ee Session From My Remoteobjects?

The AMF Gateway gives entry to the present HttpServletRequest occasion in a thread native variable. The session will be obtained from the request, as follows:
flashgateway.Gateway.getHttpRequest().getSession();

Question 45. Can I Resize The Internet Explorer Browser Window From Flex?

Use getURL() to speak with JavaScript within the HTML wrapper:

getURL(‘javascript:window.resizeTo(1050,900)’);

Question 46. Is Double-clicking Supported On Various Components?

Unfortunately, double-clicking just isn’t supported by default. If you want to add this performance to, say, a List or DataGrid element, you’ll have to add the next ActionScript 2.Zero code to your utility:

var someTimestamp:Number;
public perform doubleClickHandler( evt:Object ):Void {
var now = getTimer();
// we acquired a double-click
if( ( now – someTimestamp ) < 500 )
someTimestamp = now;
}

Question 47. Sometimes, If I Do Not Move The Mouse, “click on” And “mousedown” Do Not Work. Why Is That?

This is a spotlight concern with Flash Player; normally when the UI adjustments “beneath” the mouse pointer, as in a ViewStack navigation the place the buttons are in the identical display location.

Question 48. When I Add Or Modify An Item In My Dataprovider, Why Does Not It Show Up In My Datagrid?

Low-level strategies like Array.push() or myArray[0] = “no matter” don’t trigger the dataProvider’s modelChanged occasion to fireside.

When you’re employed with a dataProvider, it’s all the time greatest to make use of the dataProvider API. In the above instance, you would possibly code: myDataSupplier.addItem(myItemObject) so as to add an merchandise or use editField() to switch a price programmatically.

Alternatively, you’ll be able to name myDataSupplier.modelChanged your self or reassign dataProvider to the management, as follows: myDataGrid.dataProvider = myDataSupplier;

Question 49. How Do We Use Css Styles In Flex?

External kinds are outlined in a separate file and can be utilized in any MXML file that references the CSS file. You reference a CSS file into an MXML file with the supply property of the <mx:Style> tag, as follows:

<mx:Style supply=”../web siteStyles.css”/>

Embedded kinds are outlined in an MXML file and may solely be utilized in that file. Embedded kinds are outlined with the <mx:Style> tag, as follows:

<mx:Style>
.myclass { background-color: xFF0000 }
TextInput { font-family: Helvetica; font-size: 12pt }
</mx:Style>
<mx:Canvas>
<mx:Button styleName=”myclass”>
</mx:Canvas>
Inline kinds are outlined in an MXML tag and may solely be utilized in that tag. Inline kinds are outlined as follows:

<mx:Button shade=”crimson”…>
<mx:TextInput fontFamily=”Helvetica” fontSize=”12″…>

Question 50. What Is The Difference Between Sealed Class And Dynamic Classes In Flex?

Classes are sealed by default, i.e. properties can’t be added dynamically at runtime.

Dynamic lessons can add extra dynamic properties at runtime; sealed lessons can’t.
Sealed lessons preserve reminiscence as a result of no inner hash desk is required to retailer dynamic properties, and the compiler can present higher error suggestions.

Question 51. What Is Mvc And How Do You Relate It To Flex Apps?

(Separation of issues) The objective of the Model-View-Controller (MVC) structure is that by creating parts with a well-defined and restricted scope in your utility, you enhance the reusability of the parts and enhance the maintainability of the general system. Using the MVC structure.

you’ll be able to partition your system into three classes of parts:

Model parts Encapsulates information and behaviors associated to the info.
View parts Defines your utility’s consumer interface.
Controller parts Handles the info interconnectivity in your utility.

Question 52. What Is State? What Is The Difference Between States And Viewstack In Flex?

The State class defines a view state, a selected view of a element. For instance, a product thumbnail might have two view states; a base view state with minimal info, and a wealthy view state with extra info. The overrides property specifies a set of kid lessons so as to add or take away from the bottom view state, and properties, kinds, and occasion handlers to set when the view state is in impact.

You use the State class within the states property of Flex parts. You can solely specify a states property on the root of an utility or a customized management, not on little one controls.

Question 53. Difference Between States And Viewstack In Flex?

View Stack is to deal with totally different MXML file eg TAB management and states is the transition inside single MXML file.
ViewStack needs to be used have been there may be full change within the controls used and States needs to be used if you simply need to add or take away a number of parts based mostly on sure situations.
ViewStates are digital state of an current web page apearing at an occasion i.e. just one state will be proven at a time
whereas viewStack are assortment of various view containers which will be proven at a time.

Question 54. How Does Item Renderer Work? How Do We Add Item Renderer At Runtime In Flex?

Each checklist management has a default mechanism for controlling the show of information, or view, and allows you to override that default. To override the default view, you create a customized merchandise renderer.

Note: With reusable inline merchandise renderers you utilize information binding to bind to the merchandise renderer. When you utilize a element as an merchandise renderer, you don’t use information binding however specify the title of the customized element to make use of as an merchandise renderer.

Add itemrendrer at run time:

Create the fundamental merchandise renderer. One of the issues I wanted to perform with my merchandise renderer was the power so as to add it to totally different columns (ie the infoField was not all the time the identical). This meant I wanted a manner from inside the renderer to find out what column it was sure to so I might get and show the right information. To do that the renderer must implement the IDropInListItemRenderer. This interface permits the renderer to have entry to details about the checklist and column it’s in through the BaseListData and DataGridListData lessons. The DataGridListData offers you every little thing it’s worthwhile to get the info required to make a versatile, reusable renderer.

To Modify itemrenderer at runtime we Need to make use of mx.core.ClassFactory. Basically, with the intention to change a Flex merchandiseRenderer at runtime, it’s worthwhile to forged it to a sort ClassFactory.

Question 55. What Keyword Allows You To Refer To Private Variables Of A Class In Flex?

Private key phrase , this key phrase (? ) in flex

Question 56. How Polymorphism Works On Actionscript?

class UnpaidIntern extends Employee {
override public perform receivePayment():Number {
return 0;
}
}
class Manager extends Employee {
override public perform receivePayment():Number {
return baseSalary*3;
}
}
class Engineer extends Employee {
override public perform receivePayment():Number {
return this.baseSalary*2;
}
}
class Employee {
inner var baseSalary:Number = 1000;
public perform receivePayment():Number {
return this.baseSalary;
}
}

Question 57. What Is Dynamic Keyword Used For In Actionscript?

Dynamic lessons, which let you programmatically add new properties and habits to lessons through the run-time. Just add the magic key phrase dynamic to the category definition:

dynamic class Person

Now let’s add dynamically two variables title and age and the perform printme() to the thing of sort Person:

Person p= new Person();
p.title=”Joe”;
p.age=25;
p.printMe = perform ()
hint (p.title, p.age);

p.printMe(); // Joe 25

Question 58. What Are Sealed Classes In Flex?

A sealed class possesses solely the fastened set of properties and strategies that have been outlined at compile-time; extra properties and strategies can’t be added. This makes stricter compile-time checking potential, leading to extra sturdy applications.

Question 59. What Are Runtime Shared Libraries In Flex?

Macromedia Flex 1.5 you’ll be able to construct runtime shared libraries (RSLs) that may be individually loaded, cached, and utilized by a number of functions.

Use Flex Three runtime-shared-libraries (RSLs) to cut back the dimensions of your functions and thereby cut back the time required to obtain the applying. RSLs are simply SWF recordsdata whose code is used as a shared library between totally different utility SWF recordsdata. There are two sorts of RSLs, signed and unsigned. Signed RSLs are libraries which might be signed by Adobe and could also be saved within the Flash Player Cache, which will be accessed by functions from any area. This means in case your utility is utilizing a signed RSL, the RSL could not even must be downloaded if the RSL is already within the Flash Player Cache. The signed RSL could have been put into the Flash Player Cache by visiting one other web page that was utilizing the identical signed RSL. Signed RSLs have a “swz” extension.

Unsigned RSLs are regular SWF recordsdata and will not be loaded into the Flash Player Cache. Instead, these RSLs depend on the browser’s cache to maintain them from being downloaded.

Question 60. What Is Cairnghorm In Flex? How Do We Use It?have You Worked With Cairnghorn In Flex?

Cairngorm is the light-weight micro-architecture for Rich Internet Applications in-built Flex or AIR. A collaboration of acknowledged design patterns, Cairngorm exemplifies and encourages best-practices for RIA growth advocated by Adobe Consulting, encourages best-practice leverage of the underlying Flex framework, whereas making it simpler for medium to massive groups of software program engineers ship medium to massive scale, mission-critical Rich Internet Applications.

The advantages of the Cairngorm structure are realized when growing advanced RIA functions with a number of use-cases and views, with a crew of builders, and with a multi-disciplinary growth crew that features designers in addition to inventive and technical builders.


Spread the love