A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: 1 Movie Clip Controlls 2, but have conflict

  1. #1
    Member
    Join Date
    Apr 2001
    Location
    Minneapolis, MN
    Posts
    36

    1 Movie Clip Controlls 2, but have conflict

    Using Flash 5.
    I have 12 movie clips. Each controlls 2 different movie clips (not of the 12).

    Example: blueMC controlls aMC which is a static label, and bMC - a mini movie.

    What I want:
    When the mouse is over blueMC, aMC (a label) becomes visible, and remains visible while bMC (an animation) plays. Both aMC and bMC need to remain visible if the mouse leaves blueMC. aMC and bMC only disappear if the mouse is over a different controlling movie clip like redMC which controlls it's own label and mini movie (aredMC and bredMC).

    What actually happens:
    When the mouse is over blueMC, aMC appears. When the mouse leaves blueMC, aMC disappears and bMC plays. bMC disappears only if the mouse is over blueMC a second time.

    The actions so far:
    onClipEvent (enterFrame) {
    if (_root.blueMC.hitTest(_root._xmouse, _root._ymouse, true)) {
    _root.aMC._visible = true;
    _root.bMC.gotoAndPlay(1);
    } else {
    _root.aMC._visible = false;
    }
    }

  2. #2
    Flash Initiate StuartW's Avatar
    Join Date
    Jul 2000
    Location
    The Metaverse
    Posts
    504
    The best way to tackle this is not to do it all in the rollover but instead use a variable that sets to true whenyou are over a certain MC and false when you are not. The get aMC and bMC to set depending on that variable on their respective onEnterFrame handlers.

    You'd need a variable for the other part that only allws you to have one of those bMC's visible at any time.

    Hope it helps,

    Stu

  3. #3
    Member
    Join Date
    Apr 2001
    Location
    Minneapolis, MN
    Posts
    36
    Sorry, I'm still learning how all the action stuff works.

    Do I put the variables on the movie clips I want to become visible, do I put them in a frame, or do I put the variables on the controller movie clip?

    Thanks,
    zuk

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