A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: button order

  1. #1
    Senior Member whytefly's Avatar
    Join Date
    Jun 2004
    Location
    submerged
    Posts
    363

    Exclamation button order

    I have 4 tab btns and what i want is when one is pressed it jumps in front of the other 3. I am using a simple goto frame script right now. But when I place the btn on the timeline in front of another nothing seems to work right. Does it have to do with levels? Any ideas?

    Test Link It is the component on the right side of the page

    Code:
    stop();
    
    btn_registry.addEventListener(MouseEvent.CLICK, buttonNavClick1);
    
    function buttonNavClick1(event:MouseEvent):void{
    gotoAndStop("registry");
    };
    
    btn_inursery.addEventListener(MouseEvent.CLICK, buttonNavClick2);
    
    function buttonNavClick2(event:MouseEvent):void{
    gotoAndStop("inursery");
    };
    
    btn_sales.addEventListener(MouseEvent.CLICK, buttonNavClick3);
    
    function buttonNavClick3(event:MouseEvent):void{
    gotoAndStop("sales");
    };
    
    btn_news.addEventListener(MouseEvent.CLICK, buttonNavClick4);
    
    function buttonNavClick4(event:MouseEvent):void{
    gotoAndStop("news");
    };

  2. #2
    Senior Member whytefly's Avatar
    Join Date
    Jun 2004
    Location
    submerged
    Posts
    363
    I got it to work. I was trying to just use the code on one frame and have it work for the whole flash application. All I did was add it to every frame and create a new function so the next 4 would be function buttonNavClick5...6...7...8

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