A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Movie Clips inside of Movie Clips

  1. #1
    Junior Member
    Join Date
    Feb 2005
    Posts
    16

    Movie Clips inside of Movie Clips

    I'm having a dilemma using movie clips inside of movie clips, and I'm sure you can do this, right?

    I'm creating my website, and all the actionscript is coded the way it should be. What I have is the first movie clip (we'll call it "clip1" with buttons, and when you click the buttons, they are supposed to move clip1 to a certain frame, and this works fine. But it is also supposed to move "clip2" (which is inside of clip1) to a certain frame as well, and this does not work. Here is the code for the button as follows:

    on(release) {
    clip2.gotoAndPlay(80); //move clip2 to certain frame
    this.gotoAndPlay(60); //since buttons are inside clip1
    }

    I've also tried this with frame labels and that does not work either. If you want, I can post the project for you to take a look at and I appreciate all the help you can offer. Thanks!

  2. #2
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    There isn't anything obviously wrong, maybe check your Instance names, otherwise I think you need to post your fla.

  3. #3
    Junior Member
    Join Date
    Feb 2005
    Posts
    16
    Here's a scene that contains the ASing problem. When you "Click Here!" both clips should essentially move to the indicated frame in their clips, but they do not. It seems so simple. I recrated a scene from scratch because the other one was too big.

    Also, I'm working in the first version of MX, not the 2004 version. Think that could be a problem? I recently ordered the 2004 version. Thanks again for all the help!

    -Scott
    Attached Files Attached Files

  4. #4
    Senior Member chi-styler's Avatar
    Join Date
    Jul 2001
    Location
    Bristol, UK
    Posts
    1,237
    Ok, 2 problems with that fla you attached (nothing to do with not having 2004 by the way). Firstly you haven't given Instance names to your MCs. If you select a MC then look in the properties panel, that's where you need to name the clips, Clip1 and Clip2.

    Also, Clip2 is in Clip1, so it should be
    Code:
    on (release) {
    	Clip1.gotoAndPlay(15);
    	Clip1.Clip2.gotoAndPlay(15);
    }

  5. #5
    Junior Member
    Join Date
    Feb 2005
    Posts
    16
    That makes perfect sense! I must've missed that part in the book, but I thank you! That solves quite a few problems.

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