UNIVERSITY EXAMINATIONS: 2017/2018
EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN
APPLIED COMPUTING
BAC3210 ACTIONSCRIPT PROGRAMMING
FULL TIME/PARTTIME
DATE: APRIL 2018 TIME: 2 HOURS
INSTRUCTIONS: Answer Question One & ANY OTHER TWO questions.
QUESTION ONE
a) Name any FIVE movie clip properties that can be controlled with ActionScript. (5 Marks)
b) What is the basic logic behind a preloader ActionScript? (7 Marks)
c) Where do you place the messages and animations in ActionScript? (3 Marks)
d) What keyword is used to create a new instance of an ActionScript class? (3 Marks)
e) How is a display object added to the display list in ActionScript? (2 Marks)
f) Explain one way to generate a random color in ActionScript? (5 Marks)
g) Write the basic syntax to use for loop in ActionScript 3.0. (5 Marks)
QUESTION TWO
a) Name THREE file types that you can load into a Flash project with the UILoader component
(3 Marks)
b) Explain an ActionScript class that can be used to store a list of objects (3 Marks)
c) What method can be used to add a new element to the next available location in an Array
instance? (2 Marks)
d) Explain an event that is available for the List component that can respond when the user makes a
selection from a List instance. (2 Marks)
e) Explain the steps of developing an actionscript animation (4 Marks)
f) Write an actionscript program of your choice and explain what it does (6 Marks)
QUESTION THREE
a) Write a script to change temperature from Fahrenheit to Celsius (6 Marks)
b) Describe how you will use the package directive to create a simple package containing one class
(4 Marks)
c) Using examples explain how control structures are used in ActionScript program (10 Marks)
QUESTION FOUR
Using an example of geometric shapes describe by writing ActionScripts that demonstrates the
following concepts
i. Defining classes (4 Marks)
ii. Extending classes (4 Marks)
iii. Polymorphism and the override keyword (4 Marks)
iv. Defining, extending, and implementing interfaces (4 Marks)
QUESTION FIVE
a) With your help, Philip has constructed the initial version of a Flash Web site for KENOMO
Project. He now needs to add some pages with interactive elements, including a page that will
allow potential clients to submit information about projects that they would like KENOMO to
complete. Philip asks you for help in learning how to use ActionScript 3.0 to add these
interactive elements. You show Philip how to write a function that processes information and
returns a value or performs some action. If a function does not return a value, explain the term
that must appear in the function definition to indicate that no value is returned?
(4 Marks)
b) Aaron is developing a Web site for the dinosaur exhibit at his local science museum, and he asks
for your assistance in using ActionScript 3.0 to add interactive elements to the Web site. For
example, he wants to allow users of the site to pause movie clips, and he wants to include links
to Web sites with additional information about dinosaurs. You tell Aaron that he can use
ActionScript to pause a movie clip when the user clicks a pause button. You mention that there
are three elements involved when writing the necessary code. One of these elements is the pause
button itself, which is the object used to trigger the desired action. Explain the technical term for
this type of element? (4 Marks)
c) You next tell Aaron that he must create the function that the Flash Player will execute when the
user clicks the pause button. What is the term used for this type of function? (2 Marks)
d) Once Aaron creates the function that will be executed when the user clicks the pause button, he
needs to establish a connection between that function and the pause button. Explain the name of
the method used to establish the connection? (4 Marks)
e) You next show Aaron how he can use buttons to represent links to external Web sites. When the
viewer clicks a button, a browser window will open, displaying an external Web site. In the
functions that he writes for this purpose, Aaron needs to create an object with the value of the
Web address of the site to which he wants to link. Explain the name of the class that he will use
to define this object? (4 Marks)
f) In the functions that Aaron writes for the purpose of displaying an external Web site, he needs to
call a function that opens the Web site in the computer’s default browser. What is the name of
this function? (2 Marks)