Networking, Programming and Graphics Tutorials

Action Script in Macromedia Flash MX [2/2]

Step Three
In the Action Panel (Window>Actions or F9), choose 'Expert Mode' and type the code below.

Action Script in Macromedia Flash MX
Step Four
Now click Control>Test Movie (Ctrl+Enter) and you will see the circle/rectangle you've made is moving as it wish.
Now it's your turn to make some changes to the Action Script and see how does the animation looks like. In that way, you will
know and learn more about the action script.

onClipEvent (load) 
{ xdirection=random(20)-10;
 ydirection=random(20)-10; 
}
 onClipEvent (enterFrame) 
{ if(this._x>=630){ 
this._x=0; 

else if(this._x<=0){ 
this._x=630; 

else if(this._y>480) { 
this._y=0; 

else if(this._y<=0) { 
this._y=480; 

this._x=this._x+xdirevtion; 
this._y=this._y+ydirection; 
}
Rate this tutorial:                    
Networking, Programming and Graphics Tutorials - Action Script in Macromedia Flash MX [2/2] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: "Flash Action Script Tutorials"  what is a script in macromedia flash?  "macromedia flash mx" script example  flash macromedia script  flash mx +action +scripts  flash mx free action scripts  how to make 3d animation in macromedia flash  Macromedia Script  how to make a photoshop frame action  macromedia mx scripts  Make 3D Flash animation from 3D Studio .3ds file in Vectra 3D Flash tutorial  CAD to 3d flash  www.flash cad  flash get  3d flash  3d flash CAD  cad on flash  cad with flash  var php flash  flash vectra