You may regret using scenes and navigation together... thetwo don't mix well. You are better off either using one scene's timeline divided into sections and/or creating movieclips for each section.
Speaking of movieclips... If you were to create the buttons as a movieclip you could have the coding done only once. If you load the menu dynamically, you could avoid having to plant it in every scene as well.
Here's a link to a quick example I made to demonstrate what I described. The menu contains the code so it only gets coded once, and since it is being added dynamically it is not bound to the timeline so it exists for all scenes...
this is excellent, thank you.
I didn't consider calleing a menu dynamically from the library.
I agree, that using scenes is not the best solution, but it was used primarily to avoid huge timelines, but again movieClips were an option.
The only headache there is when you have MovieClips within MovieClips that have navigation, working out the code to navigate to MovieClips at a different level.
But I can work with what you have provided, thank you.
I've been playing with the sample you provided and changed it slightly as each Scene name is different.
My question is though, what is determining the fact that the menu will display in all the Scenes?
I see that the addChild call is at the beginning of Scene 1, but there is no reference to calling the Menu in Scenes 2 and 3, yet the menu does display in those scenes?
When you load anything dynamically it does not have a home in whatever timeline it is loaded into unless you nail it down to something, such as a movieclip that has been manually planted in the timeline.
So by loading it into the main timeline, it is not limited to any frames of that timeline. When you use scenes and compile the file, the scenes are all melded into one timeline, so the menu persists throughout.
Now if you had manually planted a movieclip in the scene and loaded the menu into that movieclip instead of the scene's timeline, then the menu would be restricted to appearing only where that movieclip existed... though within that movieclip it would not be restricted to a particular frame.