Copy link to clipboard
Copied
Hi everyone,
I've got a problem with function. I have 3 scenes with simple navigation frames, next button/previous button. In Scene 1 I can navigate to next/previous frame by keyboard buttons, right/left. I must copy this function to Scene 2 and Scene 3. How Can I do it? When I copy this function to Scene 2 I have error with duplicate function. Change name function not resolve my problem.
function fl_changeSlideKeyboard(evt:KeyboardEvent):void
{
if(evt.keyCode == 37)
{
if (currentFrame>0)
{
prevFrame();
}
}
else if (evt.keyCode == 39 || evt.keyCode == 32)
{
if (currentFrame<5)
{
nextFrame();
}
}
}
I recommend getting away from using scenes at all. They are an error waiting to happen when you build them in for navigation purposes. Just keep everything in the first scene and if need be divide up the timeline into labeled sections or keep what you would have as separate scenes as separate movieclips instead.
PS -
if (currentFrame>0)
frame numbers start at 1, so that condition will always be true.
Copy link to clipboard
Copied
I recommend getting away from using scenes at all. They are an error waiting to happen when you build them in for navigation purposes. Just keep everything in the first scene and if need be divide up the timeline into labeled sections or keep what you would have as separate scenes as separate movieclips instead.
PS -
if (currentFrame>0)
frame numbers start at 1, so that condition will always be true.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now