I have a custom function with parameter. I’m trying to pass the parameter to the gotoAndPlay as follows.
This is where the function is called...
myButton_btn.onPress = function() {
myFunction("Apply");
}
This is the function...
myFunction = function (fLabel) {
trace(fLabel);
gotoAndPlay(fLabel);
}
Basically “Apply” is a frame label that I’m trying to send the playhead to. The fLabel paramater traces out properly, but the gotoAndPlay doesn’t send the playhead to the appropriate frame label. It sends it to 4 frames before the end. It’s really weird. Even if I add frames to the timeline, it still sends it to 4 before the end. I can get it to work perfectly in a “new” flash document, but not in my existing document. Do I have wrong syntax or is something possibly conflicting?