A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: button functions not working properly

  1. #1
    Junior Member
    Join Date
    Jun 2010
    Posts
    11

    button functions not working properly

    I'm putting together a pretty basic website/portfolio. The buttons/code that go from page to page work great. The code I'm using to access larger images from thumbnails is basically the same, however it's not working.
    I have the site setup so that each larger image is it's own separate page, so basically the thumbnails act as buttons to access a specifically labeled page. Ex- Thumbnail/button "Character1_btn" goes to the page labeled as "Character1" to display the larger image. I hope this makes sense.
    Below is the code I'm using. As I said- all functions but the character1 function are working properly.. I really need the character 1 function to work. Any help is greatly appreciated.

    stop ();

    home_btn.addEventListener(MouseEvent.CLICK,playhom e);

    function playhome(event:MouseEvent):void{
    gotoAndStop("home");
    }

    character_btn.addEventListener(MouseEvent.CLICK,pl aycharacter);

    function playcharacter(event:MouseEvent):void{
    gotoAndStop("character");
    }

    everyday_btn.addEventListener(MouseEvent.CLICK,pla yeveryday);

    function playeveryday(event:MouseEvent):void{
    gotoAndStop("everyday");
    }

    so_btn.addEventListener(MouseEvent.CLICK,playso);

    function playso(event:MouseEvent):void{
    gotoAndStop("so");
    }

    character1_btn.addEventListener(MouseEvent.CLICK,p laycharacter1);

    function playcharacter1(event:MouseEvent):void{
    gotoAndStop("character1");
    }
    ETA- the code in the quote has random spaces that don't actually exist.

  2. #2
    Member
    Join Date
    Sep 2010
    Posts
    37
    only thing that seems obvious is; check your typing for appropriate casing. Make sure you dont have uppercase in the framelabel: "Character1" vs "character1", and that this is true wherever you refer to the framelabel. The code seems fine to me otherwise.

  3. #3
    Junior Member
    Join Date
    Jun 2010
    Posts
    11
    Quote Originally Posted by Jumpkut View Post
    only thing that seems obvious is; check your typing for appropriate casing. Make sure you dont have uppercase in the framelabel: "Character1" vs "character1", and that this is true wherever you refer to the framelabel. The code seems fine to me otherwise.
    All casing is consistently lowercase.

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