random frame

  • R.L.D.
  • Student
  • Student
  • User avatar
  • Posts: 83
  • Loc: Astoria,Queens

Post 3+ Months Ago

i have a mc , inside theres 5 frames with stop() scripts , each frame loads a different song.

i want this mc to skip to a random frame everytime it loads so it wont play the same song if lets say the page is refreshed ect.

how would i do that?
thanks.
  • R.L.D.
  • Student
  • Student
  • User avatar
  • Posts: 83
  • Loc: Astoria,Queens

Post 3+ Months Ago

nevermind i got it ...

i tried using

onClipEvent(enterframe){
gotoandStop(Math.random(5));
}

on the mc but the frames kept looping out of control

so i added this line to the first keyframe in the mc:

gotoandStop(Math.random(5));

that works just as i wanted it to .. jumps to a random frame on load.

but i still would like to know why the onClipEvent one didnt work...

:)

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 4 guests
  • 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 post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.