User Interface: Actionscript For Java Developers! Trivia Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Emb03
E
Emb03
Community Contributor
Quizzes Created: 4 | Total Attempts: 1,263
| Attempts: 187
SettingsSettings
Please wait...
  • 1/10 Questions

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

    • Defined Function
    • Variables
    • Instance Name
    • Event Listener
    • Data Type
Please wait...
About This 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!

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

Quiz Preview

  • 2. 

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

    • When a user clicks a button the animation opens a URL

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

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

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

    Correct Answer
    A. 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. 

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

    • Target event

    • Event class

    • Symbol name

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

  • 4. 

    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)

    • E:MouseEvent

    • AddEventListener

    • MouseEvent.MOUSE_OVER

    • :void

    Correct Answer
    A. 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:

  • 5. 

    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)

    • Next

    • AddEventListener

    • MouseEvent

    • MOUSE_DOWN

    • None of the above

    Correct Answer
    A. 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:

  • 6. 

    An event listener is essentially: (Choose one)

    • A function

    • An event object

    • A target node

    • A method

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

  • 7. 

    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)

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

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

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

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

    Correct Answer
    A. 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:

  • 8. 

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

    • By dragging it onto the stage

    • By adding it the library

    • By importing it to stage

    • By opening an external library

    Correct Answer(s)
    A. By dragging it onto the stage
    A. 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:

  • 9. 

    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)

    • The first instance of myFunction

    • The second instance of myFunction

    • The first instance of MouseEvent

    • The second instance of MouseEvent

    • None of the above

    Correct Answer
    A. 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:

  • 10. 

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

    • Function, listener, event object

    • Function, method, property

    • Event, event object, target event

    • Capture, target, bubble

    • Stage, parent, movieclip

    Correct Answer
    A. 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 (Updated): Mar 21, 2023 +

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.