Tuesday 8 September 2015

Action Script 3.0 Test (Mac Version)

Action Script 3.0 Test (Mac Version)

:: Home > Upwork > Graphics Designing > Action Script 3.0 Test (Mac Version)

Which of the following are primitive datatypes in Action script 3.0:

a. Array
b. Date
c. String
d. XML
e. Null

When in application, in what order do the following events take place (starting from the first)?

a. Creation complete, pre-Initialize, Initialize, Application complete
b. pre-Initialize, Creation complete, Initialize, Application complete
c. pre-Initialize, Initialize, Application complete, Creation complete
d. pre-Initialize, Initialize, Creation complete, Application complete

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");
     }

a. Code Start
    try
    catch
    finally
    Code End
b. Code Start
    catch
    finally
c. Code Start
    try
    catch
    finally
d. Code Start
    catch

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");
        }

a. Equal
b. Unequal
c. ""
d. Compilation error: Syntax error

Given the following statements about the try/catch/finally block, choose the correct option.

a. Try is optional but catch and finally are required.
b. Catch is optional but try and finally are required.
c. Finally is optional but try and catch are required.
d. All three blocks are required.

What is the default maximum size of Shared objects?

a. 10KB
b. 100KB
c. 500KB
d. 1MB

A constant (const) variable can be initiated only once.

a. True
b. False

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

a. One,Two,Three
b. Four,Two,Three
c. One,Four,Three
d. Two,Three,Four

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

a. One
b. Two
c. Three
d. No match

Which of the following is not a correct way of adding an item to an Array myArr?

a. myArr.push(item);
b. myArr.addItem(item);
c. myArr[0] = item;
d. myArr=[item];

What does XML stand for?

a. Exclusive Markup Language
b. Extensible Markup Language
c. Exclusive Model Language
d. Extensible Model Language

A String is:

a. a series of zero or more characters.
b. a series of one or more characters.
c. a single character.
d. a set of no more than 5 characters.

Given the declaration 'a timer', which of the following statements is correct?

var myTimer:Timer = new Timer (500,5);

a. When the timer is started, the TimerEvent.TIMER event is dispatched 5 times with a difference of 0.5 seconds between 2 successive events.
b. When the timer is started, the TimerEvent.TIMER_COMPLETE event is dispatched 5 times with a difference of 500 seconds between 2 successive events.

The default values of String and int type variables are:

a. null and 0 respectively.
b. "" and NaN respectively.
c. null and Nan respectively.
d. "" and 0 respectively.

Which of the following syntax would be used to call a method name helloWorld(), (defined in the html Wrapper) from actionscript?

a. Application.call ("helloWorld");
b. ExternalApplication.call ("helloWorld");
c. ExternalInterface.call ("helloWorld");
d. helloWorld ();

Given a number, num = 23, which of the following methods will be used to convert it to a String:

a. num.toString();
b. num.toSentence();
c. num.toWord();
d. num.toNumber();

Ques: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?

a. Hello World
b. Blank string
c. Program execution ends with a Runtime error
d. Compilation error

Which of the following conditions must be true to facilitate the usage of seek() function of an Array Collection's Cursor?

a. The Array Collection must contain only similar data types.
b. The Array Collection must be sorted.
c. The Array Collection should have more than 278 objects.
d. None of the above

This question is based upon the figure shown below


Based on the above mentioned declaration of myXML, how can we access the id attribute of the 'employee' tag?

a. myXML.managers.employee[1].@id
b. myXML.employeeList.managers.employee[1].@id
c. myXML.managers.employee[1].id
d. myXML.employeeList.managers.employee[1].id

Which of the following Errors does not occur at runtime?

a. Compile time error
b. Runtime-error
c. Synchronous error
d. Asynchronous error

Which property of the Event object contains information about the component which generated that event?

a. target
b. currentTarget
c. type
d. eventPhase

Which of the following statements is true?

a. An array is a collection of objects of the same data type.
b. An array is a collection of objects irrespective of the data types.
c. The size of an array must be declared when the array is first declared.
d. The starting index of an array is 1.

Which of the following statements is not correct?

a. TimerEvent.TIMER is dispatched when one cycle of the timer is complete.
b. When the repeat count in a timer is set as 0, the timer continues indefinitely until the stop() method is invoked.
c. When a timer is instantiated, it starts automatically.
d. All of the above statements are correct.

Which of the following properties of the Date class does not accepts 0 as a value?

a. hours
b. date
c. day
d. month

Which of the following statements about the system class is true?

a. It is used to access the user's operating system.
b. It can be used to set the content of the user's clipboard.
c. It can be used to retrieve current memory usage for flash player.
d. All of the above

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

a. Compilation error at line1
b. Compilation error at line4
c. Compilation error at line5
d. No error. The code will compile and run without errors.

Which kind of an error is thrown when parsing error occurs in the action script?

a. Type error
b. Syntax error
c. Argument error
d. Verify error

The trim() method of StringUtil Class is used:

a. only to remove all white spaces from the beginning of the string.
b. only to remove all white spaces from the end of the string.
c. to remove all white spaces from the beginning and the end of the string.
d. to remove all whitespaces in the string including those inside the string.

Which of the following is not a valid Action script data type?

a. int
b. uint
c. long
d. String

The minimum version of flash player required to run Action script 3.0 is:

a. 6.0
b. 8.0
c. 9.0
d. 10.0

Given the code snippet below, what will be the value of myFlag after the 2nd assignment:

var myFlag : Boolean=false;
myFlag=Boolean (new Date ( ) );

a. True
b. False
c. Run time error
d. Type Coercion error at compile time

Given the following string variable declaration, where 3 is an int

var myString : String = "These are " + 3 + " lines"
The value stored in myString is:

a. These are 3 lines
b. These are lines
c. These are three lines
d. Compilation Error: could not convert int to String

Which of the following statement is not correct?

a. While accessing child nodes of an XMLList, the array access operator '[]' can be used and the starting Index is 0.
b. While accessing child nodes of an XMLList, the array access operator '[]' can be used but the starting Index in this case is 1.
c. While fetching children of an XMLList, the children() method of the XML class can be used interchangeably with the '*' operator.
d. All of the above statements are correct.

Given the following instantiation of a date type variable, choose the statement which is true.

var myDate : Date = new Date()

a. The value of myDate is the current time stamp.
b. The value of myDate is an instance of the date class with all values set to either 0 or blank.
c. The value of myDate is null.
d. None of the above

The following regular expression : var pattern : RegExp = /\d+/; will match:

a. one or more words
b. zero or more words
c. one or more digits
d. zero or more digits

What will be the output of the following trace statement?

trace ("output: " + 10 > 20);

a. output: True
b. output: false
c. true
d. false

Which of the following is not a valid quantifier metacharacter used in Regular expressions?

a. +
b. –
c. *
d. ?

In the date formatter's format string, which of the following pattern letter represents minutes?

a. M
b. N
c. S
d. Y

This question is based upon the figure shown below


What will the output of the following trace statement?

trace(myXML.employee.(lastName=="Zmed"));

a. All employee blocks are printed on the console.
b. The first employee block is printed on the console.
c. The complete structure of myXML is printed in the console.
d. Only the lastName tag with value "Zmed" is printed.

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

a. Only i and ii are true
b. Only i, ii and iii are true
c. Only i, ii and iv are true
d. All the four are true
Disqus Comments