gavin sim logo
 

Week 1

Week 2

Week 3

Week 4

Week 5

Week 6

Week 7

Week 8

Week 9

Teaching > ActionScript

Debugging

Part 1

Open page2.fla

This file should enable you to press the button and navigate to page 2. There are three errors in this that prevents it working.

See if you can figure out what the errors are.

 

Part 2

Open addNumber.fla

The objective is to push the button to add 1 to the variable and then display this in a dynamic text box.

There are three errors in this that prevents it working.

 

Part 3

Create a new flash document and on the first frame open the actions panel and type:

var number1:Number = 5;
var number2:Number = 8;
var total:Number;


function addNumbers(num1:String, num2:Number):void{
 total=num1+num2;
 trace(total);
}


addNumber(number1, number2);

There are two errors in this code that prevents it working.

 

Part 4

Create a new flash document and on the first frame open the actions panel and type:

var number1:Number = 5;
var number2:Number = 8;
var total:Number;


function addUp(num1:Number, num2:Number):void{
 sum =num1+num2;
 return sum;
}


total = addUp(number1,number2);

trace(total); 

There are two errors in this code that prevents it working.

 

Part 5

Open monster1.fla

This file should enable the two monsters to move left and right across the screen.

See if you can figure out what the errors two errors are.