A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: movie clips within a movie clip -- need pause

  1. #1
    damn, im smooth drkknght's Avatar
    Join Date
    Feb 2001
    Posts
    159
    lord, thats a confusing subject. sorry

    here's the deal (ill describe this as best as i can):

    in the main scene, i have a baseball field.

    in one of the layers, i have a movie clip.

    in that movie clip, i have 16 images of baseball players in 16 key frames, randomly displayed, [with this script -- gotoAndPlay ((random(16)+1));].

    ok so far?

    now, what id LIKE to do, is replace those images, with movie clips.

    these movie clips would simply be the player's image fading in, followed by his name, and take 20-25 frames, each.

    SO...

    what i want is to have the main scene (baseball field)
    have a movie clip in a layer.
    and, in that movie clip, have 16 randomly displayed movies of players and their names -- WHERE EACH 20 (or so) FRAME MOVIE PLAYS COMPLETELY, BEFORE RANDOMLY PLAYING THE NEXT.

    is this possible?

  2. #2
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    Go to the flash exchange:

    http://www.macromedia.com/exchange/flash/

    You'll find a Pause Movie Smartclip there.

  3. #3
    Senior Member
    Join Date
    Mar 2001
    Posts
    351
    I think you've overlooked a very simple solve...
    Set it up as you've said. Have the random actionscript on the first frame (I think you have to make it (16)+2 cause You want to skip frame 0 and the first frame when it chooses randomly) and then 16 frames after that, each with a MC of the players fading or whatever and each with a STOP action (Very important and easy to overlook). On the last frame of each MC, add:

    _root.gotoAndPlay (1)

    You have to paste that 16 times, but I'm sure you can handle that .This will send the movie back to the random choice frame once the MC is finished and it will select again. I've tested this a couple of seconds ago and it works....

    Good luck....

  4. #4
    damn, im smooth drkknght's Avatar
    Join Date
    Feb 2001
    Posts
    159
    heya guys!!

    help and feedback is VERY appreciated!!!!

    neo, a question...

    i went with your suggestion, but i think i hit one little bug.

    on each of the 16 player movie clips, you said to put the "_root" code. what that seems to be doing, tho, is going back to the beggining of the ENTIRE flash movie, and not just the random movie. (hard to explain better than that...)

    like, ok... i have my main scene, the baseball field. in that scene, i have a few things happening. a sound says "lets play ball," a text title appears that says "baseball time," and then also, the randomly generated movie of boxers.

    now that i've added all that stuff, tho, after each boxer appears, the whole presentation starts over (the guy says "lets play ball" again, the title of the movie appears, etc).

    is there any way to just have the 16 random clip movie start over, and not the whole show?

    like, instead of "root" is there a "parent" option? (im not too familiar with the coding aspects of flash)

  5. #5
    Senior Member
    Join Date
    Mar 2001
    Posts
    351
    Oh yeah, sorry. My example is if the random bit is on the main timeline. What you have to do is insert either of the following codes at the end of each MC instead of the one I gave you:

    _root.(insert random mc clip instance here).gotoAndPlay (1)

    or whatever the actual path is? If you click the little target on the bottom right of the actions screen, you can work the path out from there if you find it easier...I do.

    OR, the easier way

    _parent.gotoAndPlay (1)

    Either one will work fine....but the _parent way is easier.

    Good luck...


  6. #6
    damn, im smooth drkknght's Avatar
    Join Date
    Feb 2001
    Posts
    159
    hey, i got it right! "parent!" gold star for me

    anyway, neo, everything appears to be working PERFECTLY now!!

    thanks A MILLION for the assistance!!

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