Search Tutorials
Step 4.The common practice is to create the control layer, containing an empty MC which holds only the actionscript for the control of game flow. Here’s the code that the control MC contains (the comments within the code should make it clear enough):
onClipEvent(load)
{
step = 5; //the speed of movement can be easily adjusted by changing this variable
ok = true; //used later on in collision detection
}
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|