Sei sulla pagina 1di 10

FAKULTI SAINS DAN TEKNOLOGI MAKLUMAT

FINAL EXAMINATION
SESSION I, ACADEMIC YEAR 2015/2016

TDMM 2073
SCRIPTING IN MULTIMEDIA

INSTRUCTION TO CANDIDATES:
1.

The time allotted for this paper is 2 HOURS 30 MINUTES.

2.

This question paper consists of THREE sections:


SECTION A: 20 Multiple Choice Questions.
SECTION B: 4 Structured Questions.
SECTION C: 2 Short Essay Questions.

3.

Answer ALL questions in the question paper.

4.

This question paper requires:


i)

Answer Booklet.

THIS QUESTION PAPER CONSISTS OF 10 PRINTED PAGES.


DO NOT OPEN UNTIL YOU ARE TOLD TO DO SO.

SULIT

TDMM 2073

SEPTEMBER 2015
SECTION A
Marks: 20

Choose the CORRECT answer in the answer booklet provided.

1.

2.

3.

4.

5.

A ________ is a self-contained description for a set of services and ________.


A.

class; data

B.

data; class

C.

suffix; object

D.

code hinting; suffix

Which of the following statement is right about trace command?


A.

Places any relevant text into the Flash Action panel.

B.

A testing and debugging command for late feedback.

C.

Only available at runtime, and has no use at author-time.

D.

Could be useful for testing: a loop, function, or a loading process.

Code hint for a specific object can be obtained using


A.

suffix.

B.

services.

C.

code hinting.

D.

self-contained.

Dynamic Text loading data using


A.

FLA.

B.

EXE.

C.

XML.

D.

DHTML.

A program reads/executes the code from


A.

right to left.

B.

left to right.

C.

top to bottom.

D.

bottom to top.
2

SULIT

TDMM 2073
6.

7.

8.

Pseudo-code is
A.

separate layers for each intuitive name.

B.

a structured list for describing tasks by algorithms.

C.

as methods for jumping between actionScript frame.

D.

only available at runtime, and has no use at author-time.

One way to naming elements


A.

use ordinary name.

B.

start with a lowercase letter.

C.

start with a uppercase letter.

D.

use the same element name with difference cases.

Which of the following is the right match between flash files and its function?
A.

FLV: Flash Video File.

B.

AS: ActionScript Class File (embedded in HTML).

C.

FLA: The Project File (Built-in or user defined class files).


SWF: The exported program file (Built-in or user defined class

D.

9.

SEPTEMBER 2015

files).

Comparison operators commonly used in loops return value


A.

0 or 1.

B.

0 and 1.

C.

true or false.

D.

true and false.

10. __________ is an example of object type.


A.

B.

Array

C.

Method

D.

MyMovieclip_mc

SULIT

TDMM 2073

SEPTEMBER 2015

11. Shortcut key to create new symbol


A.

F8.

B.

Ctrl + F8.

C.

Ctrl + Alt + F8.

D.

Ctrl + Shift + F8.

12. The && (and) operator returns true if


A.

the left operand returns a value of true.

B.

the right operand returns a value of true.

C.

the left operand and the right operand both return a value of true.

D.

the left operand and the right operand both return a value of false.

13. For alpha property, __________ is opaque and __________ is totally


transparent.
A.

1; 0

B.

0; 1

C.

100; 0

D.

0; 100

14. To perform event handling there are three important elements need to be
identified. One of the element is
A.

the use.

B.

the class.

C.

the event.

D.

the function.

15. A(n) __________ provide a way to group action together as a single unit.
A.

event

B.

function

C.

data type

D.

parameter

SULIT

TDMM 2073

SEPTEMBER 2015

16. Event source also known as


A.

event target.

B.

event action.

C.

event object.

D.

event handler.

17. Which of the following the right matches between operator and its type?
A.

>=

Logical operator.

B.

Numeric operator.

C.

!=

Comparison operator.

D.

===

Strict equality operator.

18. The modulus (%) operator

19.

A.

return the absolute value of an operand.

B.

the right operand returns a value of true.

C.

the right operand returns a value of false.

D.

divides two operands and returns the reminder.

Symbol of parenthesis
A.

[]

B.

{}

C.

D.

()

20. Which statement is NOT right about Local variable?


A.

Available to anywhere.

B.

Used in the body of function.

C.

Help prevent name collisions.

D.

Only changeable within its function.

SULIT

TDMM 2073

SEPTEMBER 2015
SECTION B
Marks: 40

Answer ALL questions in the answer booklet provided.

1.

Write the answer for the following cases:

a.

The symbols for line comment and block comment in ActionScript 3.0.
(2 marks)

b.

List of three the most common event arguments.

(3 marks)

c.

Name two keyboard events that are available in ActionScript 3.0.


(2 marks)

2.

d.

Name three text field types available in flash.

(3 marks)

e.

Write a function..return to calculate a rectangle size.

(3 marks)

f.

Name two parameters of timer object.

(2 marks)

Write output for the following ActionScript 3.0 code:

a)

trace (Lapan < Sepuluh);

(2 marks)

b)

trace ("Zaitun" < "100");

(2 marks)

c)

trace ("Uwais Al-Qarni"); // trace ("Anak sulung");

(2 marks)
d)

trace (3950 % 5);

(2 marks)

SULIT

TDMM 2073
e)

SEPTEMBER 2015
var nama = "Seroja"; var pekerjaan = "nelayan.";
trace (ayah + nama + " adalah seorang " + pekerjaan);

(2 marks)
f)

var Salam = "Assalamualaikum "; var Nama = "Qudwah";


var Ucapan = Salam + Nama; trace (Ucapan);

g)

(2 marks)

var markah = 40 ;
var kehadiran = 10;
var lulus = (markah <= 50)&&(kehadiran >= 10);
if (lulus){
trace("Alhamdulillah, anda LULUS");
} else{
trace("Ulang subjek Scripting.");
}

(2 marks)

h)

trace("100" < 95);

i)

var t = 10; var u = "10"; var v = (t === u);

(2 marks)

trace (v);

j)

(2 marks)

var i = 13; var j = 13; var k = i == j;


trace (k);

3.

(2 marks)

Write the structure name for each label.

(3 marks)

____(a)____.addEventListener( ____(b)____.EVENT_NAME, eventResponse);

function ____(c)____ (eventObject:EventType): void


{
//Action performed in response to the event go here.
}

SULIT

TDMM 2073
4.

SEPTEMBER 2015

Find the syntax error of the ActionScript code below and rewrite the right
script.

(2 marks)

this.Stop ();
function playMovie (event:mouseEvent): void
{
this.Play ();
}
playButton.addEventListener(MouseEvent.Click, playMovie);

SULIT

TDMM 2073

SEPTEMBER 2015
SECTION C
Marks: 20

Answer ALL questions in the answer booklet provided.

Question 1

Answer the questions based on the ActionScript 3.0 code below.

a)

Rewrite the given statement above using if..else statement.


(8 marks)

c)
var

Find the output.

(2 marks)

saluran = "TV IQ";

switch (saluran){
case "TV 1":
trace ("Saluran Komunikasi Anda...");
break;
case "TV 2":
trace ("Saluran Dunia Anda...");
break;
case "TV 3":
trace ("Keriangan sentiasa bersamamu di TV3...");
break;
case "NTV 7":
trace ("Saluran Ceria Anda. Feel Good...");
break;
case "TV 8":
trace ("We're different...");
break;
case "TV 9":
trace ("Malaysia...lah!");
break;
case "TV Al-Hijrah":

SULIT

TDMM 2073

SEPTEMBER 2015
trace ("TV Kita Untuk Semua...");
break;
default :
trace ("Jom cipta slogan TV");
break;

Question 2

Answer the question based on ActionScript below.

a)

Rewrite the following statement using for loop.

(4 marks)

b)

Rewrite the following statement using while loop.

(4 marks)

c)

Find the output.

(2 marks)

var a = 7;
do{
trace ("Output do...while loop: " + a);
a--;
} while (a >= 5);

END OF QUESTION PAPER

10

SULIT

Potrebbero piacerti anche