A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: EventListener Failure

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    3

    Exclamation EventListener Failure

    I can't figure out why this button isn't working. I have an air iOS document running actionscript 3.6. When it opens, it runs this code:

    Code:
    var someDate:Date = new Date(); 
    var dayNum:uint = someDate.getMonth(); 
    {
    gotoAndStop (dayNum + 1);
        }
    then this

    Code:
    var Aug:Date=new Date();
    gotoAndStop(Aug.date, "August")
    Once it gets to that frame, I try to run the button

    Code:
    Right.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
    function fl_MouseClickHandler_2(event:MouseEvent):void
    {
        gotoAndStop(currentFrame + 1)
    }
    But nothing happens when I publish and hit the button.
    -There's a next frame for it to go to
    -I've tried duplicating the button and the action script in a new air document and the button worked
    -I tried replacing the "gotoAndStop" in the button with a trace and nothing was retuned.

    Really running out of ideas of what could be wrong..... is it the actionscript preceding the eventlistener that's causing it not to respond?

  2. #2
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    927
    Quote Originally Posted by boultinghomes View Post
    -I've tried duplicating the button and the action script in a new air document and the button worked
    who is this? a word of friendly advice: FFS stop using AS2

Tags for this Thread

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