A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Problems with the buttons showing different movie clips!

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Location
    Canada
    Posts
    6

    Problems with the buttons showing different movie clips!

    Hello,
    I'm working on an educational Flash animation. In one scene I have 4 buttons which need to show different movieclips. I have created all 4 movie clips and inserted into one layer in 4 frames, one after another one. I also gave the frames specific names. Then the buttons are all in one frame with a name so I could call it when we're on "rollout" mode. Now, when I go over the first button it shows its movieclip perfectly but the second one show two, overlapping, with the previous frame!!! I did also deleted the previous movie clip but still get the same error!!! I did this in another scene with no problems but this time I don't know where the problem is coming from. Here is the code that I use:

    on (rollOver) {
    gotoAndPlay("lobes", "think");
    }
    on (rollOut) {
    gotoAndPlay("lobes", "lobes-button");
    stop();
    }

    lobes is the name of the scene, think is the name of the frame which has the movie clip and "lobes-button" is the name of the frame which has all the buttons without any movie clips.

    I truly appreciate your help...I've been trying to fix this since last night, for 4 hours but no success yet!

    Thanks.
    Mojan

  2. #2
    Member
    Join Date
    Feb 2012
    Location
    Cairns - Great Barrier Reef - Australia
    Posts
    86

    Why you making it so complicated?...

    Defy the boundaries!.. NEVER surrender to the code!!!.....

  3. #3
    Member
    Join Date
    Feb 2012
    Location
    Cairns - Great Barrier Reef - Australia
    Posts
    86
    Sorry dude.. I missed the rollover/rollout part.... You want movie to start on mouseover and stop on mouse away?... do you want movie to appear & disappear as well?.... thats even easyer then above demo!..or do you want all 4 clips visible still and waitng for mouse over?
    Defy the boundaries!.. NEVER surrender to the code!!!.....

  4. #4
    Member
    Join Date
    Jul 2011
    Posts
    51
    Actionscript Code:
    //Frame Script
    btn1.onRelease = onClick;
    btn2.onRelease = onClick;
    btn3.onRelease = onClick;
    btn4.onRelease = onClick;
    function onClick() {
        switch(this){
            case btn1:mc.gotoAndStop("One");break;
            case btn2:mc.gotoAndStop("Two");break;
            case btn3:mc.gotoAndStop("Three");break;
            case btn4:mc.gotoAndStop("Four");break;
        }
    }



    FFA

  5. #5
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Scenes are bad, resort to frames.

    Post FLA if possible
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  6. #6
    Junior Member
    Join Date
    Mar 2012
    Location
    Canada
    Posts
    6
    Thanks all. Back 2012, I could resolve the problem with your method. Thanks so much.

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