I have the _root with a sliding menu. In the sliding menu I have buttons. I want the buttons to change scenes, however the buttons only seem to function as long as my request is in within the same scene.
Do you mean the buttons in your sliding menu don’t work, or they buttons in a different scene?
Your code should either have the first or the second line, you should take one out because one of them goes on a keyframe and the other inside button1.
There are 2 ways, an easy way would be to put invisible buttons over them, one on each side. And do on(rollover) blah blah blah. But theres another way without doin that…
This is the script I am using for my buttons on the main time line. I have a sliding menu with more buttons on it, but they dont work.
Say I have scene 1, 2, 3, 4, 5,
on “scene 1”, I have a button to go to “scene 2”,
on “scene 2”, I have a sliding menu.
When the sliding menu is double clicked on it becomes
“scene 2”, “menu”.
it is on this “menu” layer that I have more buttons, the buttons will jump to different frames on that “menu” layer, but I canot get them to go to “scene 3”.
I thought it might have something to do with _root _parent but I couldn’t get either to make a difference.
You can’t tell the buttons to go to layers, you just have to directly tell it to go to a frame. I’m not too sure what you want to do…
Oh yea, your code should be:
[AS]
on (press) {
gotoAndPlay (“scene 2”, 1)
}
[/AS]
you shouldn’t have the other line under it (this is if the code is placed inside the button). You also don’t need both press and release because if you do one, you must do the other…
You don’t need any other code, just place that inside the sliding thing (with the instance named scrollbar). I havnt’ looked at your fla but i’m guessing you didn’t tell it to go back to its original position once it slides off the screen.