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
4. Explain In which level does the original movie resides?
A. 0
B. -0
C. 1
D. -1
5. Explain How many levels does Flash MX support?
A. 20
B. 80
C. 100
D. 1000
A. Car
B. Engine
C. Oilpump
D. Clamp
A. / (slash)
B. $ (Dollar sign)
C. _ (underscore)
D. % (percentage sign)
8. What is default frame rate of the timeline in frame per second?
A. 1
B. 12
C. 24
D. 30
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.
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 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.
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)
26. How do I make synchronous data calls in actionscript?
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:
1. Create a function to handle the data return, like onResult().
2. In the HTTPService tag, put this function name in the result property and pass "event" in too.
3. Invoke the call in the script:
//invokes the call to the HTTP data service
var oRequestCallbject = app.mxdsGetData.send(oRequest);
//Next, define a string to identify the call. We will use this string value in the result handler.
oRequestCall.MyQueryId = "WhateverIWanttoUseToIdentifyThisCall" ;
//Yes, you CAN set this AFTER you invoke send()
4. In the result handler, which will be called every time the data service call returns, identify what the returned data contains, as follows:
var callResponse = oEvent.call; //get the call object
//gets the value of this property you set in the call
var sQueryId = callResponse.MyQueryId; //will be "WhateverIWanttoUseToIdentifyThisCall";
trace(sQueryId);
You are probably trying to read the result immediately after the send(), right? You're expecting synchronous behavior?
28. How do I get Flex to query my database?
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:
• RemoteObjects: This is the fastest. It communicates with server-side EJBs or POJOs using AMF, a binary compressed format.
• HTTPService: This one uses the HTTP protocol. Sources can be JSP, ASPx, .NET, or any URL that returns HTTP.
• WebService: This is the slowest. It uses the SOAP protocol. Sources can be .NET or any web service.
29. How do I run Flex as a service?
Flex is not a server that you deploy and run. It is simply deployed as part of your web application. So it will work, no matter which web container you are using: Tomcat, JRun 4, WebLogic, and so forth. To learn how to deploy Tomcat, JRun 4, or any other Java server as a service, refer to the appropriate documentation for the server you are using.
30. How do I pass parameters to a pop-up window in actionscript?
Three different ways to pass data into a title window.
It uses the initobj to pass in several built-in properties plus two user defined properties.
One is a simple string, the other is a reference to the main application that can be used for binding. Note the variable that holds the application reference is typed to the name of the application. this is critical for binding to work correctly.
31. myTree appears just fine but why ca not I access the node attributes?
Select a node in your myTree. In ActionScript, you can reference this node by using the following code: myTree.selectedNode;
To access the attributes of the node, use the tree DataProvider API. These methods will work for any format dataProvider item, which might be an object, array, or XML node.
The following example might work: myTree.selectedNode.attributes.myAttribute
But the following example is far more reliable:
myTree.selectedNode.getProperty("myAttribute");
32. When I add or modify an item in my dataProvider, why does not it show up in my DataGrid?
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;
33. Why is myTreeNode.label or myTreeNode.attributes.label undefined?
Make sure you use the TreeDataProvider methods to modify a node. Do not rely on the node being XML. For example, the above should be myTreeNode.getProperty("label") instead.
34. Sometimes, if I do not move the mouse, "click" and "mouseDown" do not work. Why is that?
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.
35. Why are there errors with the macromedia.css.LocatorParser class and WebLogic?
WebLogic ships with its own version of the fop.jar, which in turn includes the batik.jar, which is older and breaks Flex. To resolve this issue, remove the fop.jar from the CLASSPATH in the startWebLogic.cmd file. This may apply to non-WebLogic servers as well, where batik.jar was included.