play random frames

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   play random frames
GoddsEgo
PayPal Donation
CZ Moderator
Status: Offline
Joined: Jun 26, 2003
0.15 posts per day
Posts: 1211
Points: 69,166
 Yahoo Messenger  
Hi All

What I am trying to do is when the movie hits a frame in 1 scene it will start next scene in 3 random places

Here is AS i came up with put its not working

ld.onEnterFrame = function() {
ld = random(3);
if (ld = 0) {
   gotoAndPlay("Scene 1", 1);
}
if (ld = 1) {
   gotoAndPlay("Scene 1", 3623);
}
if (ld = 2) {
   gotoAndPlay("Scene 1", 5880);
}
}



am i even on right trak? lol

Rob


Back to top Reply with quote
#2   re: play random frames
redhot_2oo3
PayPal Donation
CZ Moderator
uk.gif
Occupation: Codezwiz Elf
Website:
Status: Offline
Joined: Aug 26, 2003
0.08 posts per day
Posts: 633
Points: 25,047
   
Here's a decent turorial all about actionscript random math. [ Register or login to view links on this board.]




_________________
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum