A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: ::::: go to random frame:::::

  1. #1
    Matthew Riley qualehead's Avatar
    Join Date
    May 2001
    Location
    UK
    Posts
    379
    i'd like to go to a random frame in a movie.
    how would i do that?

    tnx

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Posts
    237
    at first or if mc then onload
    Code:
    p=random(Frame No);
    gotoAndPlay(p);

  3. #3
    curmudgeon swampy's Avatar
    Join Date
    Jan 2001
    Location
    [wakey]
    Posts
    2,775
    Code:
    //swap the 4 for the number of frames in your movie
    
    myFrame = random (4);
    if (_currentframe != myFrame)
    {
    	gotoAndStop (myFrame);
    }
    else
    {
    	myFrame = random (4);
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center