Results 1 to 2 of 2

Thread: Play Animation Then Open Selected Item

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Play Animation Then Open Selected Item

    Hi all... Am wondering the best way to do this... I have 4 menu items, each time one of them is pressed an animation plays BEFORE it goes to the selected frame label. But I only want to have one animation on the timeline... IS there a way to do it so Flash knows what button is pressed and after the animation plays the correct frame label? Otherwise I guess I could have 4 of the same animation before each frame label just seems wrong to do it that way... I'm sure I can do it with As somehow...

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    To do that (if I understand clearly enough) you will tell the on(release) AS how to handle the event. Usually with an if/else statement. It is possible you will need to use currentframe as well, or at least a mixture of the methods. If I can get my brain to function I will post the code here:

    Code:
    on(release){
       _root.BtnWhole.gotoAndStop("44");
       if (_root.BtnWhole._currentframe == 44){
          _root.BtnStormCreative.gotoAndPlay("56");
         }
    }
    You should be able to see the idea here. first you tell which MC/Button/timeline the frame to go to, then we check, if it is there then take the other MC/Button/timeline to the frame you want it to go.

    You can add other things too...

    Code:
    on(release){
       _root.BtnWhole.gotoAndStop("44");
       if (_root.BtnWhole._currentframe == 44 && _root.BtnWhole.BtnContactUs._currentframe == 12){
          _root.BtnStormCreative.gotoAndPlay("56");
         }
    }
    Or add other if's to make other things do other things as well...

    Code:
    on(release){
       _root.BtnWhole.gotoAndStop("44");
       if (_root.BtnWhole._currentframe == 44){
          _root.BtnStormCreative.gotoAndPlay("56");
         }
       else if (_root.BtnContactUs._currentframe == 12){
                _root.BtnContactUs._visble = false;
       }
    }

    You see the idea.
    Last edited by BLiZZaRD; 03-02-2007 at 03:22 AM. Reason: Brain started working :)
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •