Adobe Flex Actionscript Interview Preparation Guide
Download PDF

Adobe Flex and Actionscript Interview Questions Answers Tutorial and Guide to build your knowledge for better career. Adobe Flex is a highly productive application also called actionscript, its free and open source framework for building and maintaining expressive web applications that deploy consistently on all the web browsers, desktops, and operating systems. Adobe Flex actionscript Interview Questions and Answers will guide you about all the aspects of Adobe Flex Actionscript.

84 Adobe Flex Actionscript Questions and Answers:

Table of Contents:

Adobe Flex Actionscript Interview Questions and Answers
Adobe Flex Actionscript Interview Questions and Answers

1 :: Explain What is the function of trace?

A. Initiate the automatic debugging procedure.
B. Discover who has downloaded your movie.
C. Send String Values to the output panel.
D. Determine what objects are presents on stage ant any one time.

2 :: What are the correct statements consenting text field?

A. Embedded font outlines are shared by text fields using the same font.
B. Font Outlines for static for static text field are embedded in the SWF file by default.
C. Font outline for input text field are embedded in SWF file by default.
D. Individual font outlines are embedded in to the SWF file for each text field in the FLA file.
E. Font outlines for dynamic text fields are embedded in SWF file by default.

3 :: Explain What happens if an .swf is loaded into a already occupied level?

A. An error is thrown.
B. The new swf is rejected and the old one stays.
C. The old swf is unloaded and the new swf is loaded.
D. They share the same level

9 :: What Is Interface or Benefit of Interface in term of OOP?

► Allows you to specify a set of methods that
classes are required to implement

► Classes can implement multiple interfaces,
interfaces can extend each-other

► Interfaces can be seen as contracts to be
developed against, great for frameworks

10 :: What Is Event Flow in term of Event Handling in Flash Action Script 3.0?

The event flow describes how an event object moves through the display list. The event flow is conceptually divided into three parts.

Capture phase: This phase comprises all of the nodes from the Stage to the parent of the target node

Target phase: This consists solely of the target node.

Bubbling phase: The bubbling phase comprises the nodes encountered on the return trip from the parent of the target node back to the Stage.

The ability to add event listeners along the event flow is useful when a user interface component comprises more than one object. For example, a button object often contains a text object that serves as the button's label. Without the ability to add a listener to the event flow, you would have to add a listener to both the button object and the text object to ensure that you receive notification about click events that occur anywhere on the button. The existence of the event flow, however, allows you to place a single event listener on the button object that handles click events that occur either on the text object or on the areas of the button object that are not obscured by the text object.

11 :: What Is the Model-View-Controller (MVC) Pattern?

The Model-View-Controller (MVC) is a compound pattern, or multiple patterns working together to create complexapplications.

► Model Contains the application data and logic to manage the state of the application

► View Presents the user interface and the state of the application onscreen

► Controller Handles user input to change the state of the application

12 :: What is Display container?

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.

13 :: What is Display object?

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.

14 :: What is Display list?

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).

15 :: What is Polymorphism in term of OOP (Flash Actionscript)?

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.

16 :: What is Inheritance in term of OOP (Flash Actionscript)?

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.

17 :: What is Interface in term of OOP (Flash Actionscript)?

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.

18 :: What is different between URLLoader class and Loader class?

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.

19 :: Tell some new capabilities / Features of Flash AS 3.0?

► 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)

20 :: What is the difference in MovieClip and Sprite?

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.

21 :: 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 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.
var fR:FileReference =new FileReference()
fR.save("your Written text should be come here.","flexflashforum.txt")

Paste the following code on frame and run a sample application...

Code:
var TxtF:TextField = new TextField();
var BtnMc:TextField = new TextField();
var MyFile:FileReference = new FileReference();

TxtF.border = true;
TxtF.type = TextFieldType.INPUT;

BtnMc.background = true;
BtnMc.backgroundColor = 0xCCCCCC;
BtnMc.x = 150;
BtnMc.height = 20;
BtnMc.text = " Click here to save";

22 :: How can you show a jpg image in Dynamic Text Field?

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 "

23 :: Can I embed HTML in my Flex application?

Flex supports a limited subset of HTML in its TextArea and some other text-related classes.

24 :: Why are the columns in my DataGrid in some strange order?

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.

25 :: When I have only a single record, why does not it appear in my DataGrid?

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:
{mx.utils.ArrayUtil.toArray(modelAccidents1.accidents.accident)}
The inline format:
dataProvider={mx.utils.ArrayUtil.toArray(testSrv.result.result.error)}
In ActionScript:
myControl.dataProvider = mx.utils.ArrayUtil.toArray(testSrv.result.result.error)