User Interface: Actionscript For Java Developers! Trivia Quiz

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Emb03
E
Emb03
Community Contributor
Quizzes Created: 4 | Total Attempts: 1,249
Questions: 10 | Attempts: 185

SettingsSettingsSettings
User Interface: Actionscript For Java Developers! Trivia Quiz - Quiz

Welcome to the trivia quiz on the user interface: action script for java developers. If you clicked on this quiz, there is a high chance that you need some help when it comes to this application and worries, not as the quiz below will infuse you with enough knowledge to start you on the rejuvenation journey. Do give it a try and try others like it!


Questions and Answers
  • 1. 

    In the following code sample, what is the underlined part of the code commonly referred to as? (choose one) contact.addEventListener (MouseEvent.MOUSE_DOWN, mouseDownHandler0);

    • A.

      Target event

    • B.

      Event class

    • C.

      Symbol name

    • D.

      Named function

    Correct Answer
    A. Target event
    Explanation
    The underlined part of the code is commonly referred to as the "target event". This is because it specifies the event that the code is listening for, in this case, the "MouseEvent.MOUSE_DOWN" event.

    Rate this question:

  • 2. 

    The following code is doing what? (Choose one) about.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2); function mouseDownHandler2(event:MouseEvent):void { gotoAndStop("about"); }

    • A.

      When a user clicks a button the animation opens a URL

    • B.

      When a user clicks a button the animation advances to the frame labeled ‘about’

    • C.

      When a user clicks a button the animation advances to the frame 2

    • D.

      When a user clicks a button the animation advances to a scene named ‘about’

    Correct Answer
    B. When a user clicks a button the animation advances to the frame labeled ‘about’
    Explanation
    The given code is adding an event listener to the "about" button. When the user clicks on the button, the function "mouseDownHandler2" is called. This function uses the "gotoAndStop" method to advance the animation to the frame labeled 'about'. Therefore, when a user clicks the button, the animation advances to the frame labeled 'about'.

    Rate this question:

  • 3. 

    Event listeners contain two parameters: the listener parameter and the type parameter. The type parameter specifies the type of event. In the code sample below, what part of the code is the type parameter? (choose one) function myFunction(e:MouseEvent):void { } ep_btn.addEventListener(MouseEvent.MOUSE_OVER, myFunction)

    • A.

      E:MouseEvent

    • B.

      AddEventListener

    • C.

      MouseEvent.MOUSE_OVER

    • D.

      :void

    Correct Answer
    C. MouseEvent.MOUSE_OVER
    Explanation
    In the given code, the type parameter is "MouseEvent.MOUSE_OVER". This is because "MouseEvent.MOUSE_OVER" specifies the type of event that the event listener is listening for.

    Rate this question:

  • 4. 

    There are two ways to define a function in ActionScript 3.0: you can use a function statement or a function expression. As a general rule, use a function statement. Which statement below best explains why this is true? (Choose one)

    • A.

      Expression statements are anonymous, and easier to re-use in the code, which leads to a more elegant coding style.

    • B.

      Function statements are less verbose, and they provide a more consistent experience between strict mode and standard mode than function expressions.

    • C.

      Function expressions are less verbose, and they provide a more consistent experience between strict mode and standard mode than functions statements.

    • D.

      Function statements only work with strict mode turned on, which develops good coding practice.

    Correct Answer
    B. Function statements are less verbose, and they provide a more consistent experience between strict mode and standard mode than function expressions.
    Explanation
    Function statements are less verbose and provide a more consistent experience between strict mode and standard mode than function expressions. Function statements allow for a clearer and more readable code structure, making it easier to understand and maintain. Additionally, function statements can be used in both strict mode and standard mode, ensuring a consistent behavior across different environments. On the other hand, function expressions can be anonymous and may require additional steps to reuse in the code, potentially leading to a less elegant coding style.

    Rate this question:

  • 5. 

    Event listeners contain two parameters: the listener parameter and the type parameter. The listener parameter specifies the listener function that will execute when the event occurs. The listener parameter can be a reference to either a function or a class method. In the code sample below, what is the listener parameter? (Choose one)function myFunction(event:MouseEvent):void { }ep_btn.addEventListener(MouseEvent.MOUSE_CLICK, myFunction)

    • A.

      The first instance of myFunction

    • B.

      The second instance of myFunction

    • C.

      The first instance of MouseEvent

    • D.

      The second instance of MouseEvent

    • E.

      None of the above

    Correct Answer
    B. The second instance of myFunction
    Explanation
    In the given code sample, the listener parameter is referring to the second instance of the function "myFunction". This means that when the event "MouseEvent.MOUSE_CLICK" occurs, the second instance of the function "myFunction" will be executed.

    Rate this question:

  • 6. 

    How do you add an object to the Display List? (choose two)

    • A.

      By dragging it onto the stage

    • B.

      By adding it the library

    • C.

      By importing it to stage

    • D.

      By opening an external library

    Correct Answer(s)
    A. By dragging it onto the stage
    C. By importing it to stage
    Explanation
    The correct answers are "By dragging it onto the stage" and "By importing it to stage". These two methods allow you to add an object to the Display List. By dragging it onto the stage, you can simply click and drag the object from the library or another location onto the stage. By importing it to stage, you can use the import function to bring the object into the stage from an external source or library.

    Rate this question:

  • 7. 

    The name of the event is defined by the constant associated with the event class. In the code sample below, choose the constant. (choose one)function functionName(event:MouseEvent):void {}next.addEventListener(MouseEvent.MOUSE_DOWN, functionName)

    • A.

      Next

    • B.

      AddEventListener

    • C.

      MouseEvent

    • D.

      MOUSE_DOWN

    • E.

      None of the above

    Correct Answer
    D. MOUSE_DOWN
    Explanation
    In the given code sample, the constant associated with the event class that defines the name of the event is "MOUSE_DOWN". This constant is used in the addEventListener function to specify the type of event that the function "functionName" should listen for.

    Rate this question:

  • 8. 

    The piece of code  for a typical button action requires which of the following three pieces? (choose three)

    • A.

      Defined Function

    • B.

      Variables

    • C.

      Instance Name

    • D.

      Event Listener

    • E.

      Data Type

    Correct Answer(s)
    A. Defined Function
    C. Instance Name
    D. Event Listener
    Explanation
    The code for a typical button action requires a defined function, an instance name, and an event listener. A defined function is necessary to specify the actions that should be performed when the button is clicked. An instance name is used to identify the specific button that is being clicked. An event listener is needed to detect when the button is clicked and trigger the associated function. Variables and data types may be used within the function, but they are not essential components for the button action code.

    Rate this question:

  • 9. 

    An event listener is essentially: (Choose one)

    • A.

      A function

    • B.

      An event object

    • C.

      A target node

    • D.

      A method

    • E.

      None of the above

    Correct Answer
    A. A function
    Explanation
    An event listener is essentially a function that is responsible for handling an event when it occurs. It is used to specify the behavior that should be executed when a particular event takes place, such as a button click or a key press. The event listener function is attached to a target node, which is the element on which the event is expected to occur. When the event is triggered, the event listener function is called and executed. Therefore, the correct answer is "a function".

    Rate this question:

  • 10. 

    The event flow consists of the following three concepts (Choose one):

    • A.

      Function, listener, event object

    • B.

      Function, method, property

    • C.

      Event, event object, target event

    • D.

      Capture, target, bubble

    • E.

      Stage, parent, movieclip

    Correct Answer
    D. Capture, target, bubble
    Explanation
    The correct answer is capture, target, bubble. In event flow, capture phase happens first where the event is captured by the parent elements before reaching the target element. Then, the event reaches the target element in the target phase. Finally, in the bubble phase, the event bubbles up from the target element to its parent elements. This sequence of capture, target, and bubble is the correct order of concepts in event flow.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 16, 2008
    Quiz Created by
    Emb03
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.