Copy link to clipboard
Copied
Hello
I have the same f() in frame 1 and frame 2, and when I play the movie again, it says f() dupliicated.
How can change it in the second frame, not to be the same. Here is the f()
function onEnterFrame(event:Event):void
{
domystuff;
}
Don't use the same function name, or just use the one from frame 1 if they both do the same thing... just have frame 1 extend thru frame 2
Copy link to clipboard
Copied
Don't use the same function name, or just use the one from frame 1 if they both do the same thing... just have frame 1 extend thru frame 2
Copy link to clipboard
Copied
How can I keep the same function doing the same thing by changing the name ? Particularly this function, how can I do it ?
function onEnterFrame(event:Event):void
{
dosamestuff;
}
Copy link to clipboard
Copied
I just changed the name of the f(). Problem solved. Thank you.
Copy link to clipboard
Copied
You can use a function that is in frame 1 even in frame 2 if you extend it along the layer. Just like if you wanted an object to span across frames, you can do the same with code elements like functions and variables.
Copy link to clipboard
Copied
Thank you Ned. You are right, both ways. Thanks to your input, now I can make my record flip to side number 2 and play the second song.