A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Do Movie Clips not work within another movie clips?

  1. #1
    Member
    Join Date
    Apr 2004
    Posts
    54

    Do Movie Clips not work within another movie clips?

    I'm using Flash 8, AS 2.0...

    Is it possible to have an action on a movie clip that is INSIDE another movie clip.

    I created a drop down menu movie clips with the following code. I have a simple 15 frame timeline that when you rollover it, it tweens and when you rollout is rewinds...

    Code:
    stop();
     
    this.onEnterFrame = function(){
    if(rewind == true){
    prevFrame();
    }
    }
    
    this.onRollOver = function(){
    rewind = false;
    play();
    }
    
    this.onRollOut = function(){
    rewind = true;
    }
    I want this same effect and code on a nested movie clip. But I'm having trouble figuring out how to make the movie clip work inside this movie clip. It would be the same code... it just doesn't seem to work... and any other things I've tried and read about hasn't yet worked.

    Please help me!

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    If you add button events to the external movie clip (e.g.: onRollOver or onRollOut), the inner movie clip won't be able to have button events as well.
    i.e., the outer movie clip "steals" everything.

    Is this what's happening?

  3. #3
    Member
    Join Date
    Apr 2004
    Posts
    54

    Exactly...

    that's exactly what's happening... how do I go about fixing this?

    Is it possible to have those inner movie clips recognize any sort of onClipEvent? If not, what is the best way to build a nice drop down menu that not only the menu itself animates, but the links inside as well?

    Thanks for the reply by the way... what I'm working on is found here... http://www.michaelweichbrodt.com/evo...olve_text.html ... The "quick nav" menu in the top drops down onRelease and goes back up onRollOut. but inside of these I want more Movie Clips which animate like the detroit and chicago text at the bottom.

    Does this make sense? Is is possible? Does it have something to do with hitTest?

    Thanks for any help...

  4. #4
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    You may read Flash Event Bubbling by senocular for a solution.


    Another solution is, supposing you now have button A inside button B (where I wrote button, it can be MovieClip), not having button button A inside button B, but have them on the same timeline, have have button A appear on top of B, for example (e.g. via attachMovie).

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