Click to Play
(Javascript Required)
Untitled-999.swf [ 12.33 KiB | Viewed 12955 times ]
This is the code that i did put in to the button symbol and im going to explain it as good as i know.
(I did make all the symbols to one symbol caled "zep")
on(release) {
zep.mask.nextFrame();
}
on(release) {
when you have released the button the action line under will be activated
zep.mask.nextFrame();
"zep" is the instance name for the character "mask" is the mask that is inside the character symbol and "nextFrame();" means jump to next frame. So inside "zep" we got "mask" which is going to jump to the next frame after we release the button = the code. When i mean jump to next frame i mean it jumps to next frame inside it self.
Inside the mask there is three frames which all contain the code stop(); which makes it dont play. The mask is on the first frame but the scond frame is just blank and on the last frame i got a code:
gotoAndPlay(1);
this makes so when you have pressed the button two times it goes back to frame one inside the mask because the nextframe(); code makes it goes on frame and stop.
If we want the mask to me inside the head instead inside of only inside of "zep" the code would look like this:
on(release) {
zep.head.mask.nextFrame();
}
hope you understand what im saying and also will be able to use this knowledge.