1. What keyword brings control out of a loop?
2. What's the output? var a: Sprite = new Sprite(); var b: Sprite = a; a = null; trace(b);
3. Which class can be used to read the URL that your SWF or media file is currently running on?
4. What's the output? var animal1:String = 'Lions'; var animal2:String = 'Dogs'; var zoo:Array = new Array(animal1, animal2, ' and Bears'); zoo[1] = 'Tigers'; trace(zoo);
5. Which method will call the constructor of a parent class?
6. Which keyword allows a child class to overwrite a parent class's method?
7. var check:Boolean = 0; will have value of?
8. To detect when an object was entered to stage we listen for:
9. How do you create a circle?
10. Import statement for Mouse Click events?
11. To display messages on the console we type:
12. Correct syntax for opening a webpage using the default web browser is
13. What's the outpu? var string1:String = 'Hello World'; var string2:String = 'Hello World'; if (string1 == string2) { trace('TRUE'); } else { trace('FALSE'); }
14. What is the modular and performance-oriented concept upon which ActionScript is built?
15. To bind an event listener the correct syxtax is:
16. Choose the BEST appropriate data type for the following situation: Lucy wants to store the names of the animals at the zoo into an array of variables.
17. Correct function to call in order to open an external url?
18. Which is a function of the MovieClip class?
19. What is a Sprite?
20. Method to add a DisplayObject on the DisplayList ?
21. To disable mouse selection to an InteractiveObject, the correct syntax is:
22. Which is a strict type declaration?
23. Which is a valid variable declaration?
24. What expression will insert a new line into a String?
25. What element appears above and below lines of annotated code to distinguish them from working code?
26. Which function of the String class returns the number of characters in a string?
27. How do you end filling on a shape object?
28. Which is NOT a function of the String class?
29. Which event class can be used to tell if a user clicks on an object?
30. Which statement can be used to exit an otherwise infinite for loop?
31. ButtonOne.addEventListener(MouseEvent.CLICK,runA); ButtonTwo.addEventListener(MouseEvent.CLICK,runB); What happens when ButtonOne's click event is triggered?
32. The addEventListener() function is used to ________.
33. Difference between .swc and .swf?
34. What is the smallest amount by which the Timer class measures time?
35. How do you add an object to the display list?
36. The correct syntax for removing an object from a specific index position of the stage is:
37. Which class can be used to change the color of a display object?
38. What symbols represent an XML literal tag delimiter?
39. Choose the BEST appropriate data type for the following situation: A teacher would like you to record a list of student names and grades in an array.
40. public function someFunction(value: Number) { switch(value) { case 5: trace ('Hello'); case 9: trace ('World'); } trace('Apples'); } What would the output be if someFunction(4) were called?
41. How would you load an image from an external file?
42. Which class can be used to find the size in bytes of your SWF or other media file?
43. On an Event handler function, how do you know which item fired the event ?
44. To communicate with Javascript the correct synxtax is:
45. What event is dispatched when a Loader finishes loading?
46. The function Date.getDay() will return a zero for what day of the week?
47. Sprite is a class of the following package:
48. The proper syntax for assigning an object literal is:
49. Referring to the index position of an array item that doesn't exist will throw which error?
50. What does the stop() action do?
51. Which is required to download images from another domain?
52. Correct syntax to cast a String 'str' into a Number?
53. What class is needed to change the alignment of text in a TextField?
54. What's the output? var b:Array = [1,2,3].map(function(i) { return i+1 }); trace(b);
55. Which class is used to load an XML File?
56. Name of the function of the StringUtil Class that removes all white spaces from the beginning and end of a String?
57. To detect when an object has entered into a stage we listen for:
58. Which is an example of a bitwise operator
59. Choose the BEST appropriate data type for the following situation: Your boss wants you to calculate the percentage of people that donated more than five dollars to your non-profit.
60. Which is not a primitive type in ActionScript 3.0?
61. Which method allows you to join two Arrays into a new Array?
62. Read the following code: var str1:String = 'foobar'; var str2:String = 'helloWorld'; var str3:String = (str1.length > 5) ? str1 : str2; trace(str3); What will be the output?
63. To successfully remove an event listener the correct syntax is:
64. What access modifier hides a variable or function?
65. Default maximum size allocated by the user for shared objects?
66. How can you retrieve an attribute from an XML variable?
67. To dispatch an event with a custom type the correct syntax is:
68. In the event of an infinite recursion, what exception will be thrown?
69. If a Timer is set with a repeatCount of 0 (zero), how many times will the timer run?
70. When using addChild() to add a child object, what does the 'child' get added to?
71. The correct syntax for testing for overlap between the bounding boxes of two objects is:
72. How do you properly remove c in: var c:MovieClip = new MovieClip(); c.addEventListener(Event.ENTER_FRAME, myFunction); addChild(c);
73. Which property of an event listener can be set to allow for garbage collection of that listener?
74. Appropriate class to utilize when importing data from an external file?
75. ActionScript 3.0 is related most closely to ________.
76. To skip the remaining code in a loop and proceed to the next cycle without leaving the loop you would type
77. What object can't be added to display list directly?
78. Which video format is AIR and Flash Player NOT compatible with?
79. Name of the variable that passes arguments into a flash movie (.swf)?
80. What type of number is returned by Math.asin()?
81. What method is used to find the character at position (i) in a String (s)?
82. When started, how will the following Timer execute? var timer:Timer = new Timer(3000,0); will run for:
83. How do you access a specific child of a container Sprite?
84. Valid method of opening a link in ActionScript 3?
85. Default maximum size for a remote shared object?
86. How do you store data in a Dictionary?
87. What property of an event listener refers to the object actively processing an Event object?
88. Which way can be used to concatenate String str1 and String str2? 1). str1 = str1 + str2; 2). str1.concat(str2); 3). str1.concat(str1, str2); 4). str1 += str2;
89. The volume of a sound can be adjusted using what class?
90. Read the following code: var bool1:Boolean = true; var bool2:Boolean = false; trace(bool1 ||= bool2); trace(bool1 &&= bool2); What will be the output?
91. Which is a function of the Timer class?
92. To display hand cursor over a Sprite you declare:
93. Valid way to create a Vector of type String? i. var v: Vector. = new ['str1', 'str2', 'str3']; ii. var v:Vector. = new Vector.(); iii. var v:Vector = new Vector(); iv. var v: Vector = ['str1', 'str2', 'str3'];
94. Which text control allows the user to input text? i. Text ii. TextArea iii. TextInput iv. RichTextEditor
95. What are the three phases of the event flow?
96. To cast a class as a specific type the correct syntax is:
97. Which keyword will prevent a method from being overwritten by a child class?
98. What does the following display? for each (var someVar in someArray) { trace(someVar); }
99. Which will add the element someElement to the end of the Array someArray?
100. What is AVM1Movie ?
101. What's the output? var world:Number = 3; trace('Hello ' + world + 3 + '3');
102. How do you create style rules for textFields?
103. Which will NOT be garbage collected?
104. What class creates a two way connection between a client Flash/AIR application and a server?
105. What's the output? import flash.utils.getDefinitionByName; var ClassReference:Class = getDefinitionByName('flash.display.Sprite') as Class; var instance:Object = new ClassReference(); trace(instance);
106. Which function of ArrayCollection adds an item at the end of a collection?
107. What is the difference between Shape and Sprite?
108. The following code will create: box.graphics.beginFill(0xffffff,0);
109. What property of the Date class does not accept 0 as a parameter?
110. Which snippet will set String myDay to the current day of the week?
111. Which is not a valid class?
112. What effect does the following code have? button.useHandCursor = true; button.buttonMode = true; button.mouseChildren = false;
113. Read the following code: var str1:String = 'Hello world!'; trace(str1.substr(2,7)); What will be the output?
114. How to change the text color of a TextField?
115. Which class of objects can be focused by setting stage.focus?
116. To bind a Class to a bitmap object you do the following:
117. MovieClip is a direct child of which class?
118. To hide the standard context menu options, which function can you call?
119. Which is not a correct StageScaleMode Constant?
120. Which is NOT a property of a GeolocationEvent?
121. Tween easing is loaded by importing:
122. Which event fires when the display objects of a frame have loaded but before any frame scripts run?
123. To make a Sprite have hand cursor when hovered you do the following:
124. The Loader object exists in which package?
125. Result of the following code? var b:Number = ['0','1','2','3','4'].indexOf(0); trace(b)
126. Appropriate class to utilize when storing data to an external file?
127. What's the output? var s:String = 'Pandas use tea cups to drink tea'; s.replace('tea', '''');
128. Which one can you NOT do through the System class?
129. Which is true about Stage?
130. What is the default access modifier if none is specified?
131. While accessing the clipboard through the SystemManager AS3 Flex class, we can
132. Which error is thrown when parsing error occurs in the ActionScript?
133. What's the output? var myArray1 : Array = new Array('One', 'Two', 'Three'); var myArray2 : Array = myArray1; myArray2[1] = 'Four'; trace(myArray1);
134. Given two String variables str1='Hello' and str2= 'World', which 2 ways can be used to concatenate the 2 strings and store the result in str1?
135. Given the following code snippet: public class Student { public function Student () { trace('Student variable created'); } public function hello () : String { return "Hello World"; } } ------------------------------------------------------- public function helloWorld () : String { var student1 : Student; return student1.hello (); } What will the function helloWorld() return?
136. Which class is the parent class of all those classes that dispatch events?
137. What's the output? var myArray1 : Array = new Array ('One', 'Two', 'Three'); for(var i : int=0; i<3; i++) { delete myArray1[i]; } trace(myArray1.length);
138. Length of the given array? var myArray1 : Array = new Array ('One', 'Two', 'Three');
139. Look at the following function declarations and then choose the correct option. i. public function myFunction():*; ii. public function myFunction():void; iii. public function myFunction():String;
140. By default, Which SWL local sandbox system is used by flash players to place all local SWF files and assets?
141. Suppose we have an arrayCollection whose cursor (myCursor) has been created using the arraycollection's getCursor() method. At runtime, when myCursor.afterLast returns true, what is the value of myCursor.current?
142. Which statement is not correct?
143. Given the following code snippet: public function helloWorld(value:int) : String { switch(value){ case 1: return 'One'; default: return 'No Match'; case 2: return 'Two'; case 3: return 'Three'; } } What will be returned if we pass call the above function as helloWorld(2):
144. Which are primitive datatypes in Action script 3.0:
145. When a variable is of the type protected, it is accessible in:
146. What does the addItem() method of the ArrayCollection class do?
147. Given the code snippet below, what will be the value of myFlag after the 2nd assignment: var myFlag : Boolean=false; myFlag=Boolean (new Date ( ) );
148. Which statement is correct?
149. Which is not a valid Action script data type?
150. The only difference between a timer and a loop is that timers are machine speed independent while loops are not.
151. Given the instantiation of a date type variable, choose correct statement. var myDate : Date = new Date()
152. Which statement is not correct?
153. Which error does not occur at runtime?
154. The useWeakReference parameter in the addEventListener method is used to:
155. Given statements about the try/catch/finally block, choose the correct option.
156. Based on the above mentioned declaration of myXML, how can we access the id attribute of the 'employee' tag?
157. Which method of the String class does not accept a regular expression as its parameter?
158. A constant (const) variable can be initiated only once.
159. Which class is not used to interact with the client system environment?
160. The minimum version of flash player required to run Action script 3.0 is:
161. Which syntax would be used to call a method name helloWorld(), (defined in the html Wrapper) from actionscript?
162. Which property of the String class returns the no. of characters in a string?
163. Given the declaration 'a timer', which statement is correct? var myTimer:Timer = new Timer (500,5);
164. Which conditions must be true to facilitate the usage of seek() function of an Array Collection's Cursor?
165. Which statements is true?
166. The following regular expression : var pattern : RegExp = /\d+/; will match:
167. XML stand for?
168. A String is:
169. What would happen when the following piece of code is compiled and run? var p : * = new ArrayCollection() //Line1 p.addItem('vishal'); //Line2 p.addItem(24); //Line3 p= new Date(); //Line4
170. Which types of variables can be accessed without creating an instance of a class?
171. Which is not a valid access modifier?
172. When ActionScript can immediately judge an operation to be in violation of a security rule, the __________ exception is thrown, and if, after waiting for some asynchronous task to complete, ActionScript deems an operation in violation of a security rule, the __________ event is dispatched.
173. Which is not a phase in the event propagation lifecycle?
174. What's the output? try { try { trace('<< try >>'); throw new ArgumentError ('throw this error'); } catch(error : ArgumentError) { trace('<< catch >> ' + error); trace('<< throw >>'); throw error; } catch(error:Error) { trace ('<< Error >> ' + error); } } catch (error:ArgumentError) { trace ('<< catch >> ' + error);
175. What;'s the output? trace(myXML..employee.*.@*);
176. The default values of String and int type variables are:
177. In the date formatter's format string, which pattern letter represents minutes?
178. Which loop structures are used to access dynamic instance variables of an object?
179. Which property of the Date class does not accepts 0 as a value?
180. Which class is the parent class of all custom event classes?
181. Suppose we have two swf's named Parent.swf and Child.swf (in the same domain), where the Child.swf is loaded inside the Parent.swf as a module, can an Event listener be registered in the Parent.swf to detect mouse click events inside the Child.swf?
182. Which event is triggered when a timer completes its execution?
183. Read statements and then choose the correct option. i. A class can extend another class ii. A class can Implement an Interface iii. An interface can extend a class iv. An interface can extend another interface
184. Which statement about the System class is true?
185. The Error class serves as the base class for all run-time errors thrown by Flash.
186. Which keyword is used to bring control out of a loop?
187. Given the following string variable declaration, where 3 is an int var myString : String = 'These are ' + 3 + ' lines' The value stored in myString is:
188. The addEventListener() method of the EventDispatcher class is used to:
189. The trim() method of StringUtil Class is used:
190. Which is not a security-sandbox type?
191. If no Access modifier is specified for a property in a class, then by default, the property is:
192. Given a number, num = 23, which method will be used to convert it to a String:
193. Which is not a valid quantifier metacharacter used in Regular expressions?
194. The compiled output of an Action script file is:
195. What's the output when helloWorld() is run? public function helloWorld() : void { trace('Line 1'); var num : Number=25; try{ num=num/0; trace ('Value of num in try: '+num.toString()); }catch (err : IOError) { trace('Value of num in catch: '+num.toString()); }finally{ num=0; } trace('Value of num: '+num.toString()); }
196. Which method of the XML object class can be used to add a new node to an XML object?
197. What's the output when helloWorld( ) is run? public function helloWorld() : void { trace('Code Start'); try{ throw new Error ('Test_Error'); trace('try'); } catch(err : Error) { trace('catch'); return; }finally{trace('finally'); } trace('Code End'); }
198. Which is a valid variable name?
199. What's the output? var num1 : String='Hello'; var num2:String='Hello'; if (num1===num2) { trace ('Equal'); } else { trace ('Unequal'); }
200. Which property of the Event object contains information about the component which generated that event?
201. An Swf in a local security sandbox:
202. Wha's the output? trace(myXML..employee.(lastName=='Zmed'));
203.
Given that two event listeners are registered for a component CompA as:
CompA.addEventListener(MouseEvent.CLICK, func1);
CompA.addEventListener(MouseEvent.CLICK, func2);
What will happen when a click event is fired on CompA?
204. The source of an ArrayCollection is of the type:
205. When in application, in what order do the following events take place (starting from the first)?
206. Which is not a correct way of adding an item to an Array myArr?
207. Which nature of ActionScript is depicted by the use of Events?
208. Default maximum size of Shared objects?
209. What's the output? trace ('output: ' + 10 > 20);
210. E4X in Action script is used to:
211. Given that ClassB extends ClassA, which (when written inside the constructor of ClassB) would invoke the constructor of ClassA?
212. Which pattern letter represents minutes in DateTimeFormatter class of flash.globalization package?