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,264
| Attempts: 187 | Questions: 10
Please wait...
Question 1 / 10
0 %
0/100
Score 0/100
1. The piece of code  for a typical button action requires which of the following three pieces? (choose three)

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.

Submit
Please wait...
About This Quiz
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... see morestart you on the rejuvenation journey. Do give it a try and try others like it! see less

2. The following code is doing what? (Choose one) about.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2); function mouseDownHandler2(event:MouseEvent):void { gotoAndStop("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'.

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

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.

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

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.

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

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.

Submit
6. An event listener is essentially: (Choose one)

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".

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

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.

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

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.

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

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.

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

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.

Submit
View My Results

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
Cancel
  • All
    All (10)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
The piece of code  for a typical button action requires which of...
The following code is doing what? (Choose one)...
In the following code sample, what is the underlined part of the code...
Event listeners contain two parameters: the listener parameter and the...
The name of the event is defined by the constant associated with the...
An event listener is essentially: (Choose one)
There are two ways to define a function in ActionScript 3.0: you can...
How do you add an object to the Display List? (choose two)
Event listeners contain two parameters: the listener parameter and the...
The event flow consists of the following three concepts (Choose one):
Alert!

Advertisement