Upwork ACTION SCRIPT 3.0 TEST 2016

Hello Freelancer, Welcome to allupworktestanswers.com Here to get the ACTION SCRIPT 3.0 TEST of Latest version 2016. We are ready here to provide your desire upwork test answer. We already tested all exam test information Available include on here. So Dear, Why Late? Read the below full exam test and get more information from our website.



1. Which of the following methods of the XML object class can be used to add a new node to an XML object?
Answers:
  1. addNode()
  2. appendNode()
  3. addChild()
  4. appendChild()
  5. prependChild()
2. When a variable is of the type protected, it is accessible in:
Answers:
  1. all child classes irrespective of the package
  2. only child classes in the same package
  3. only child classes outside the current package
  4. not accessible in any of the child classes.
3. What does the addItem() method of the ArrayCollection class do?
Answers:
  1. It adds an item at the beginning of the collection.
  2. It adds an item at the end of the collection.
  3. It removes an item from the beginning of the collection.
  4. It removes an item from the end of the collection.
4. Given the code snippet below, what will be the value of myFlag after the 2nd assignment:
var myFlag : Boolean=false;
myFlag=Boolean (new Date ( ) );
Answers:
  1. True
  2. False
  3. Run time error
  4. Type Coercion error at compile time
5. Which of the following statements is correct?
Answers:
  1. The ‘.’ and ‘@’ operator can be used only to read data.
  2. The ‘.’ operator can be used to read data and write data but the ‘@’ operator can be used only to read data.
  3. The ‘.’ and ‘@’ operator can be used both to read and write data.
  4. The ‘@’ operator can be used to read data and write data but the ‘.’ operator can be used only to read data.
6. Which of the following is not a valid Action script data type?
Answers:
  1. int
  2. uint
  3. long
  4. String
7. The only difference between a timer and a loop is that timers are machine speed independent while loops are not.
Answers:
  1. True
  2. False
8. 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;
Answers:
  1. only i & ii are valid
  2. only ii & iii are valid
  3. only i & iii are valid
  4. i, ii & iii are all valid
9. What will be the output of the following code snippet?
var myArray1 : Array = new Array (“One”, “Two”, “Three”);
for(var i : int=0; i<3; i++)
{
delete myArray1[i];
}
trace(myArray1.length);
Answers:
  1. Undefined
  2. 0
  3. 3
  4. Runtime error: Null pointer reference
10. Given the following instantiation of a date type variable, choose the statement which is true.
var myDate : Date = new Date()
Answers:
  1. The value of myDate is the current time stamp.
  2. The value of myDate is an instance of the date class with all values set to either 0 or blank.
  3. The value of myDate is null.
  4. None of the above
11. Which of the following statement is not correct?
Answers:
  1. While accessing child nodes of an XMLList, the array access operator ‘[]’ can be used and the starting Index is 0.
  2. While accessing child nodes of an XMLList, the array access operator ‘[]’ can be used but the starting Index in this case is 1.
  3. While fetching children of an XMLList, the children() method of the XML class can be used interchangeably with the ‘*’ operator.
  4. All of the above statements are correct.
12. Which of the following Errors does not occur at runtime?
Answers:
  1. Compile time error
  2. Runtime-error
  3. Synchronous error
  4. Asynchronous error
13. The useWeakReference parameter in the addEventListener method is used to:
Answers:
  1. make the listener eligible for garbage collection
  2. make the Component for which the event is registered eligible for garbage collection.
  3. make the parent of the Component for which the event is registered eligible for garbage collection.
  4. All of the above
14. Given the following statements about the try/catch/finally block, choose the correct option.
Answers:
  1. Try is optional but catch and finally are required.
  2. Catch is optional but try and finally are required.
  3. Finally is optional but try and catch are required.
  4. All three blocks are required.
15. Based on the above mentioned declaration of myXML, how can we access the id attribute of the ’employee’ tag?
Answers:
  1. myXML.managers.employee[1].@id
  2. myXML.employeeList.managers.employee[1].@id
  3. myXML.managers.employee[1].id
  4. myXML.employeeList.managers.employee[1].id
16. What will be the output of the following code snippet?
var myArray1 : Array = new Array(“One”, “Two”, “Three”);
var myArray2 : Array = myArray1;
myArray2[1] = “Four”;
trace(myArray1);
Answers:
  1. One,Two,Three
  2. Four,Two,Three
  3. One,Four,Three
  4. Two,Three,Four
17. Which of the following methods of the String class does not accept a regular expression as its parameter?
Answers:
  1. search()
  2. substring()
  3. replace()
  4. match()
18. Given the following code snippet:
public function helloWorld(value:int) : String {
switch(value){
case 1:
return “One”;
break;
case 2:
return “Two”;
break;
case 3:
return “Three”;
break;
default:
return “No Match”;
}
}
What will be returned if we pass call the above function as helloWorld(2):
Answers:
  1. One
  2. Two
  3. Three
  4. No match
19. A constant (const) variable can be initiated only once.
Answers:
  1. True
  2. False
20. Which of the following classes is not used to interact with the client system environment?
Answers:
  1. Application Class
  2. ApplicationDomain Class
  3. System Class
  4. Capabilities Class
21. The minimum version of flash player required to run Action script 3.0 is:
Answers:
  1. 6.0
  2. 8.0
  3. 9.0
  4. 10.0
22. Which of the following syntax would be used to call a method name helloWorld(), (defined in the html Wrapper) from actionscript?
Answers:
  1. Application.call (“helloWorld”);
  2. ExternalApplication.call (“helloWorld”);
  3. ExternalInterface.call (“helloWorld”);
  4. helloWorld ();
23. Which of the following property of the String class returns the no. of characters in a string?
Answers:
  1. size
  2. numChar
  3. length
  4. None of the above
24. Given the declaration ‘a timer’, which of the following statements is correct?
var myTimer:Timer = new Timer (500,5);
Answers:
  1. When the timer is started, the TimerEvent.TIMER event is dispatched 5 times with a difference of 0.5 seconds between 2 successive events.
  2. When the timer is started, the TimerEvent.TIMER_COMPLETE event is dispatched 5 times with a difference of 500 seconds between 2 successive events.
25. Which of the following conditions must be true to facilitate the usage of seek() function of an Array Collection’s Cursor?
Answers:
  1. The Array Collection must contain only similar data types.
  2. The Array Collection must be sorted.
  3. The Array Collection should have more than 278 objects.
  4. None of the above
26. Which of the following statements is true?
Answers:
  1. An array is a collection of objects of the same data type.
  2. An array is a collection of objects irrespective of the data types.
  3. The size of an array must be declared when the array is first declared.
  4. The starting index of an array is 1.
27. The following regular expression : var pattern : RegExp = /d+/; will match:
Answers:
  1. one or more words
  2. zero or more words
  3. one or more digits
  4. zero or more digits
28. What does XML stand for?
Answers:
  1. Exclusive Markup Language
  2. Extensible Markup Language
  3. Exclusive Model Language
  4. Extensible Model Language
29. A String is:
Answers:
  1. a series of zero or more characters.
  2. a series of one or more characters.
  3. a single character.
  4. a set of no more than 5 characters.
30. 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
var mydate : Date = p; //Line5
Answers:
  1. Compilation error at line1
  2. Compilation error at line4
  3. Compilation error at line5
No error. The code will compile and run without errors.
31. 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?
Answers:
  1. Hello World
  2. Blank string
  3. Program execution ends with a Runtime error
  4. Compilation error
32. Which of the following types of variables can be accessed without creating an instance of a class?
Answers:
  1. Constant
  2. Final
  3. Static
  4. Global
33. Which of these is not a valid access modifier?
Answers:
  1. Private
  2. Protected
  3. Internal
  4. All of the above are valid.
34. 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.
Answers:
  1. Security, SecurityErrorEvent.SECURITY_ERROR
  2. SecurityError, SecurityErrorEvent.ERROR
  3. SecurityError, SecurityErrorEvent.SECURITY_ERROR
  4. Security, SecurityErrorEvent.ERROR
35. Which of the following is not a phase in the event propagation lifecycle?
Answers:
  1. Targeting
  2. Bubbling
  3. Cancelling
  4. Capturing
36. What will be the output of the following code snippet?
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);
}
Answers:
  1. << try >> << catch >> ArgumentError: throw this error << throw >> << Error >> ArgumentError: throw this error << catch >> ArgumentError: throw this error
  2. << try >> << catch >> ArgumentError: throw this error << throw >>
  3. << try >> << catch >> ArgumentError: throw this error << throw >> << catch >> ArgumentError: throw this error
  4. Compilation error: Nesting or try catch block not permitted
37. E4X in Action script is used to:
Answers:
  1. manipulate complex numeric data.
  2. manipulate String data.
  3. manipulate string and numeric data.
  4. manipulate XML data.
38. What will be the output of the following trace statement?
trace (“output: ” + 10 > 20);
Answers:
  1. output: true
  2. output: false
  3. true
  4. false
39. What will be the output of the following trace statement?
trace(myXML..employee.*.@*);
Answers:
  1. An XMLList that includes every attribute defined on the employee tag, its parent and all descendants
  2. An XMLList that includes every attribute defined on the employee’s parent tag and all descendant tags
  3. An XMLList that includes every attribute defined on the employee tag’s descendants but not on the employee tag
  4. An XMLList that includes every attribute defined on the employee tag and all its descendants
40. The default values of String and int type variables are:
Answers:
  1. null and 0 respectively.
  2. “” and NaN respectively.
  3. null and Nan respectively.
  4. “” and 0 respectively.
41. Which of the following statements is not correct?
Answers:
  1. TimerEvent.TIMER is dispatched when one cycle of the timer is complete.
  2. When the repeat count in a timer is set as 0, the timer continues indefinitely until the stop() method is invoked.
  3. When a timer is instantiated, it starts automatically.
  4. All of the above statements are correct.
42. In the date formatter’s format string, which of the following pattern letter represents minutes?
Answers:
  1. M
  2. N
  3. S
  4. Y
43. While accessing the clipboard through the system manager class, we can:
Answers:
  1. read data from the clipboard.
  2. write data to the clipboard.
  3. read data from and write data to the clipboard.
  4. Neither read data from nor write data to the clipboard.
44. Given two String variables str1=”Hello” and str2=”World”, which of the following 2 ways can be used to concatenate the 2 strings and store the result in str1?
Answers:
  1. str1= str1+str2;
  2. str2.concat(str1,str2);
  3. str1.concat(str1,str2);
  4. str1.concat(str2);
  5. str2.concat(str1);
45. Which of the following loop structures are used to access dynamic instance variables of an object?
Answers:
  1. while
  2. do-while
  3. for
  4. for-each-in
46. Which of the following properties of the Date class does not accepts 0 as a value?
Answers:
  1. hours
  2. date
  3. day
  4. month
47. Which class is the parent class of all custom event classes?
Answers:
  1. Event
  2. MouseEvent
  3. ResultEvent
  4. EventDispatcher
48. 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?
Answers:
  1. Yes, for any event
  2. Yes, but only for MouseEvent.CLICK
  3. No, events that occur in the Child.swf do not propagate outside that swf
  4. None of the above
49. Which event is triggered when a timer completes its execution?
Answers:
  1. TimerEvent.CYCLE_COMPLETE
  2. TimerEvent. END
  3. TimerEvent. COMPLETE
  4. TimerEvent.TIMER_COMPLETE
50. Read the following 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
Answers:
  1. Only i and ii are true
  2. Only i, ii and iii are true
  3. Only i, ii and iv are true
  4. All the four are true
51. Which of the following statements about the System class is true?
Answers:
  1. It is used to access the user’s operating system.
  2. It can be used to set the content of the user’s clipboard.
  3. It can be used to retrieve current memory usage for flash player.
  4. All of the above
52. The Error class serves as the base class for all run-time errors thrown by Flash.
Answers:
  1. True
  2. False
53. Which of the following keywords is used to bring control out of a loop?
Answers:
  1. break
  2. continue
  3. end
  4. terminate
54. Given the following string variable declaration, where 3 is an int
var myString : String = “These are ” + 3 + ” lines”
The value stored in myString is:
Answers:
  1. These are 3 lines
  2. These are lines
  3. These are three lines
  4. Compilation Error: could not convert int to String
55. The addEventListener() method of the EventDispatcher class is used to:
Answers:
  1. create a new Event
  2. delete an event
  3. add/register a new listener for an event
  4. deregister an event listener
56. The trim() method of StringUtil Class is used:
Answers:
  1. only to remove all white spaces from the beginning of the string.
  2. only to remove all white spaces from the end of the string.
  3. to remove all white spaces from the beginning and the end of the string.
  4. to remove all whitespaces in the string including those inside the string.
57. Which of the following is not a security-sandbox type?
Answers:
  1. Local-trusted
  2. Local-with-networking
  3. Remote
  4. Remote-with-networking
58. If no Access modifier is specified for a property in a class, then by default, the property is:
Answers:
  1. Public
  2. Private
  3. Protected
  4. Internal
59. What is the length of the given array?
var myArray1 : Array = new Array (“One”, “Two”, “Three”);
Answers:
  1. 0
  2. 1
  3. 2
  4. 3
60. 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?
Answers:
  1. Null
  2. A reference to the last item in the array collection
  3. A reference to the first item in the array collection
  4. A reference to any random item in the array collection
61. Given a number, num = 23, which of the following methods will be used to convert it to a String:
Answers:
  1. num.toString();
  2. num.toSentence();
  3. num.toWord();
  4. num.toNumber();
62. Which of the following is not a valid quantifier metacharacter used in Regular expressions?
Answers:
  1. +
  2. *
  3. ?
63. The compiled output of an Action script file is:
Answers:
  1. ‘.class’ file
  2. ‘.swf’ file
  3. ‘.as’ file
  4. ‘.mxml’ file
64. Given the following code snippet, what will be 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());
}
Answers:
  1. Line1 Value of num in try: 25 Value of num in catch: 25 Value of num: 0
  2. Line1 Value of num in catch: 25 Value of num: 0
  3. Line1 Value of num in try: 25 Value of num in catch: 25
  4. Line 1 Value of num in try: Infinity Value of num: 0
65. Which of the following are primitive datatypes in Action script 3.0:
Answers:
  1. Array
  2. Date
  3. String
  4. XML
  5. Null
66. Given the following code snippet, what will be 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”);
}
Answers:
  1. Code Start try catch finally Code End
  2. Code Start catch finally
  3. Code Start try catch finally
  4. Code Start catch
67. Which of the following is a valid variable name?
Answers:
  1. _123
  2. 123
  3. my@Var
  4. my-Var
68. What will be the output of the following code snippet?
var num1 : String=”Hello”;
var num2:String=”Hello”;
if (num1===num2) {
trace (“Equal”);
} else {
trace (“Unequal”);
}
Answers:
  1. Equal
  2. Unequal
  3. “”
  4. Compilation error: Syntax error
69. Which property of the Event object contains information about the component which generated that event?
Answers:
  1. target
  2. currentTarget
  3. type
  4. eventPhase
70. An Swf in a local security sandbox:
Answers:
  1. can access all resources in the local security sandbox.
  2. can access some but not all resources in the local security sandbox.
  3. can access no resources in the local security sandbox.
  4. can access resources in the local as well as the remote security sandbox.
71. Which kind of an error is thrown when parsing error occurs in the action script?
Answers:
  1. Type error
  2. Syntax error
  3. Argument error
  4. Verify error
72. What will the output of the following trace statement?
trace(myXML..employee.(lastName==”Zmed”));
Answers:
  1. All employee blocks are printed on the console.
  2. The first employee block is printed on the console.
  3. The complete structure of myXML is printed in the console.
  4. Only the lastName tag with value “Zmed” is printed.
73. 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?
Answers:
  1. func1 is called but func2 is not called.
  2. func2 is called but func1 is not called.
  3. Either func1 or func2 are randomly chosen and called.
  4. Both func1 and func2 are called.
74. The source of an ArrayCollection is of the type:
Answers:
  1. ArrayCollection
  2. int
  3. String
  4. Array
75. When in application, in what order do the following events take place (starting from the first)?
Answers:
  1. Creation complete, pre-Initialize, Initialize, Application complete
  2. pre-Initialize, Creation complete, Initialize, Application complete
  3. pre-Initialize, Initialize, Application complete, Creation complete
  4. pre-Initialize, Initialize, Creation complete, Application complete
76. Which of the following is not a correct way of adding an item to an Array myArr?
Answers:
  1. myArr.push(item);
  2. myArr.addItem(item);
  3. myArr[0] = item;
  4. All of the above
77. Which nature of ActionScript is depicted by the use of Events?
Answers:
  1. Synchronous
  2. Asynchronous
  3. Procedure oriented
  4. Object oriented

Finally no more words require about the ACTION SCRIPT 3.0 TEST  information in this session of this content. If you are require knowing more, Please ask to us via our contact us form or comment box. Please make sure that, you don’t send Personal information via the Comment box.  Thank you very mutch for being with us

0 comments: