Flash cs6 Button to access random scenes
I am developing a flash puzzle game but am only started to learn actionscript 3.
I have three scenes named puzzle1, puzzle2, puzzle3 and I am trying to figure out a way to randomly direct the user to one ofthe three scenes when they press a button on the timeline.
Once the user has completed the puzzle in the scene they should be able to access the other two scenes.
I know how to use code snippets to link a button to a certain scene but is there a way to randomly direct the user to one of three scenes. I have looked online but couldn't find any way to set this up.
If anyone would be able to provide some advice or a possible solution it would be greatly appreciated. Thanks in advance.
I would use Frames instead of Scenes to start off. Then use Math.random() to gotoAndStop() on the random frame. And to eliminate options, use an Array to hold the different puzzle/frames and splice() each chosen item until there are no more puzzles.
Hope that gives you an idea of how to set it up and where to go.
Click Here to Expand Forum to Full Width
Poll by Flashkit.com