3/20/12

In class Wed Mar 21st

Who needs to have access to the lab this break?


Flash Examples




New ActionScript:

How to navigate to a URL.

put the following ActionScript on a button. Use the URL you want, "blank" can also be "self"

on (release) {
getURL("http://www.hartwickdigital.com", blank);
}


Variables

c = 1;

hight = 4;

race = hight + c;


check your Variables

trace("text" + variable);

ex.
trace("variable hight = " + hight);


Generate Random Numbers

random(number);

ex.
c = random(100) * 100;

hight = random(7) + 4;


Check if something happens

if ( something == something) { do something }

if (hight <= 4){
race = "halfling"
gotoAndPlay(10);
}

if (hight == 5){
race = "elf"
gotoAndPlay(15);
}

if (hight == 6){
race = "human"
gotoAndPlay(20);
}

if (hight >=7){
race = "half-Orc"
gotoAndPlay(25);
}



Creating Transitions in Flash
- Color Change
- Background Fade
- Movement


* Remember only one animation at a time on a layer

* Remember Actionscript goes on Buttons and Key Frames ONLY!



Think of an Idea. Gather Content. Work on Project.

No comments: