A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Beginner: Need Help : Label Frame

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Location
    Living in Hong Kong
    Posts
    2

    Talking Beginner: Need Help : Label Frame

    Hi everyone,

    I am trying to find a way to get my menu bar working. Little info, I am a beginner in Flash just learned the essential DVD from Adobe.

    My menu bar has the following:

    (About Us) (Services) (Quality) (Projects) (Contact Us)

    Each page will have a motion shape tween and slide the page down.

    I have type in this actions :

    stop();
    import flash.events.MouseEvent;

    //---aboutus Button Timeline change---\\

    aboutus_btn.addEventListener(MouseEvent.CLICK, aboutusClick);

    function aboutusClick(event:MouseEvent):void{
    gotoAndPlay("aboutus");
    }

    //---services Button Timeline change---\\

    services_btn.addEventListener(MouseEvent.CLICK, servicesClick);

    function servicesClick(event:MouseEvent):void{
    gotoAndPlay("services");
    }

    //---quality Button Timeline change---\\

    quality_btn.addEventListener(MouseEvent.CLICK, qualityClick);

    function qualityClick(event:MouseEvent):void{
    gotoAndPlay("quality");
    }

    //---projects Button Timeline change---\\

    projects_btn.addEventListener(MouseEvent.CLICK, projectsClick);

    function projectsClick(event:MouseEvent):void{
    gotoAndPlay("projects");
    }

    //---contactus Button Timeline change---\\

    contactus_btn.addEventListener(MouseEvent.CLICK, contactusClick);

    function contactusClick(event:MouseEvent):void{
    gotoAndPlay("contactus");
    }



    This actions only works when I click to the next labels but doesn't work when I want to click back to the previous labels. For example, if I click onto (About Us) to (Services) and (Services) to (Quality) and (Quality) to Projects and (Projects) to (Contact Us)... it all works. If I then click from (Contact Us) back to (Projects) or even any previous buttons... it does NOT work??

    Anyone? Please help!

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    It looks like your navigation runs on the same timeline, which may be the reason for the broken nav.

    Need to ensure that the code for the button is available throughout the entire timeline. If you don't then some functions will work while other won't depending on where you are in the timeline. An easy way to do this is to add a new layer at the very top and copy ONLY the navigation code to that layer. The layer should extend to the very last frame.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

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