A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] [fCS3] How do i break out of a movie clip?

  1. #1
    Junior Member
    Join Date
    Aug 2007
    Posts
    9

    resolved [RESOLVED] [fCS3] How do i break out of a movie clip?

    Ok, this is confusing.

    I have made a button inside a movieclip. I have a applied actionscript to the button. The actionscript has an IF statement which, when true, should take me to a frame on the main timline that i have labeled "window". however, this doesn't work.

    basically how can i get a button in a movieclip to take me to somewhere on the main timline?

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    change gotoAndPlay("window");
    to
    _parent.gotoAndPlay("window");

    if you had a movieclip inside of a movieclip and you wanted to access the main timeline you would put
    _parent._parent.gotoAndPlay("window");

    good luck!
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Senior Member Alluvian's Avatar
    Join Date
    Jun 2006
    Posts
    967
    Or since you know it is on the main timeline, use _root.gotoAndPlay("window")

  4. #4
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    i prefer to steer clear of _root, imo it's problematic and typically unnecessary (for example if you had a game made in flash that uses root, then you loaded that game into another swf with a menu of a bunch of games, the game wouldn't' work because it would look to the root of the menu swf instead of the game swf.. you can use _lockroot to get around that, but at that point it's a hack)
    Evolve Designs Interactive Media
    the natural selection

  5. #5
    Junior Member
    Join Date
    Aug 2007
    Posts
    9
    Thank you so much! I don't know what i'd do without you guys!

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