A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: [F8] nested movie clips???

  1. #1
    flash animator guy
    Join Date
    Oct 2006
    Location
    Daly City
    Posts
    219

    [F8] nested movie clips???

    OK here's the deal I have a movie clip acting as a 3 state button (3 frames: over, off, down) nested on the second frame of a movie clip.

    The idea is the outer movie clip shows something, when you rollover it it goes to the second frame that has the 3 state button, which should react to the mouse rollover and click

    My code is in the root time line. "mac" is the parent MC on the root time line, "mm4v" is the child movie clip on the second frame.

    The first part (green) works, the second par (red) dose not.
    any ideas why?

    mac.onRollOver = function() {
    mac.gotoAndStop("over");
    };


    mac.mm4v.onRollOver = function() {
    trace ("good")
    mac.mm4v.gotoAndStop("over");
    };

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    your code cannot scope to frame#2 of a stopped movieclip
    workaround by placing mm4v on frame#1 with _visible property set to false
    PHP Code:
    mac.mm4v._visible false;

    mac.onRollOver = function() {
    mac.mm4v._visible true;
    mac.gotoAndStop("over");
    };

    mac.mm4v.onRollOver = function() {
    trace ("good")
    mac.mm4v.gotoAndStop("over");
    }; 

  3. #3
    flash animator guy
    Join Date
    Oct 2006
    Location
    Daly City
    Posts
    219
    I though it might not work going to the 2nd frame, but I wasn't sure

    So I tried this method too but had some problems.
    On the rollover the nested clip "mm4v" doesn't become visible. And it's still "unclickable"

    Thanks

  4. #4
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    can you open a new fla, replicate the problem in it, save as Flash 8,
    and post here ?

  5. #5
    flash animator guy
    Join Date
    Oct 2006
    Location
    Daly City
    Posts
    219
    OK here's a simple file with my "stuff" in it.

    I got the image swap to work, I just can't get the nested MC to function properly.

    Thank you so very much!
    Attached Files Attached Files

  6. #6
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    cannot open Flash 9 files here

  7. #7
    flash animator guy
    Join Date
    Oct 2006
    Location
    Daly City
    Posts
    219
    OOPS... you said 8, sorry.

    Here it is as flash 8.

    Thanks again!
    Attached Files Attached Files

  8. #8
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    this file makes use of hitTest to overcome the topmost
    movieclip claiming the Hit area and preventing the nested
    movieclip actions.

    hope it helps you on your way
    Attached Files Attached Files

  9. #9
    flash animator guy
    Join Date
    Oct 2006
    Location
    Daly City
    Posts
    219
    Hey there Modified.

    I think it will work.

    Thanks a bazillion!

    That's very kind of you.

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