Click to See Complete Forum and Search --> : Playing selective scenes in a movie
malgosia
11-02-2006, 09:22 AM
Hi,
I am sure this a simple question but so far it defeated me. I am trying to control the scenes which are played by the menu. So I want to be able to click on the menu and go to specific scene and play it in a loop but just that scene. Then return back to the menu and select the next scene and so on.
Thank you for your help
Malgosia
flashpipe1
11-02-2006, 09:58 AM
One way (without using attachMovie or loadMovie) would be to set up your "scene" (although I wouldn't recommend actually using Scenes to separate your content) so that at the end of the animation, add a goToAndPlay(first frame label of your animation), so that it loops, and then just have your menu do a goToAndPlay(first frame of whichever "scene" they're going to).
Hope that makes sense and answers your question!!
zoranvedek
11-02-2006, 06:27 PM
Like he said, but it's better to put your goto/play in another scene after your main scene...............
....like follows:
scene1-shows all elements in the main movie
scene2-stops movie
scene3-hides elements shown in scene1, goto scene4
scene4-shows elements for loop scene, goto scene5
scene5-does all the actions for the loop
scene6-goto scene5 and play(this will loop scene5)
You can have a button that once clicked(buttonup or buttondown choice is yours) will goto scene3 and the rest happens automatically. to go further with it, once your done with the looping go back to scene1 which will satrt all over. To add more actions add scene7(scene8, scene9, etc) and set it up like the original configuration.
If you need to count a loop, get a property from one of the elements(is showing, opacity, location, collision, whatever) and then figure out how many times it does that property for the loop, add some actions to count that, and then when it reaches that point goto scene1(you might also want to reset that variable in scene1 so that the loop will restart<----otherwise your variable has already reached the point of going to scene1 and will skip right back to there).
Hope this isn't too confusing, but that's as simple as I can word it right now. Try it a few times and you'll get used to working like that.
A better idea might be to use child movies, but thats a whole other subject, and variables are iffy between parent and child(at least that's been my experience).
-Jason
zoranvedek
11-02-2006, 06:29 PM
A simple way to count the loop would be just to set a variable to +1 each time it hits the goto scene for the loop.....
...Sorry that just hit me.
-Jason
flashkit.com
Copyright Internet.com Inc., All Rights Reserved.