Groups | Blog | Home
all groups > flash actionscript > june 2005 >

flash actionscript : Simple how to question for syntax



VanL
6/24/2005 10:59:08 PM
Okay, I would really appreciate a little help here. I need to create a simple
button goto using a frame lable, but I need to check to be sure that the
playhead isn't already at that frame. If it is already at that frame, the I
need nothing to happen. Below is what I had, before I realized I had no clue
how to format the syntax. I put a short description of what I need to happen in
where I think the script would go. I really appreciate any help that anyone can
offer. Thanks!



on (release) {
if ( < [b] If current frame is not equal to frame labled "next"[/b] > ) {
gotoAndPlay("next");
}
}
kglad
6/25/2005 1:23:50 AM
flash can check the current frame of any movieclip using the _currentframe
property, but this checks a frame number, not a label. you'll need to
determine which frame number "next" is. the following function can be used
during flash development to determine the frame numbers you need to use:

function frameNumber(mc,labelS){
mc.gotoAndStop(labelS);
return mc._currentframe;
}
AddThis Social Bookmark Button