-
is it possible to have random events in flash 3? i would like to set a button to go to one of 8 possible events, but since variables aren't used in v.3 i haven't been able to find a workaround.
any ideas anyone?
chundle
-
Piece of cake
Here's the easiest way to do it:
Just put your button inside a looping movie clip. This movie clip should have 8 keyframes, each containing an instance of the same button. Now, here's the trick.. All the keyframes will LOOK the same, but you can give each button a different action! The user will have no idea that the button is continually changing.. but each time they click it, chances are they will hit a different button.
Essentially, the trick is to use the user as the random element!
I hope that will work in Flash 3, I think it will.. If you have any questions, let me know!
------------------
Scott Richards
http://www.rjscs.com/scotty
scotty@rjscs.com
[This message has been edited by scottris (edited 05 March 2000).]
-
Senior Moderator Defender of the Faith
Great basic game code. All the early shooting games use this method. I still use it for games. Check out "Get flippy" in the competion section of the games. All done with flash 3 code. Regards, Bill
------------------
Macromedians 1:1
In the beginning the web was without shape and color, and the hype covered the darkness of the net. Then there was a Flash and life came to the web and vision became reality.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|