Copy link to clipboard
Copied
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:
var someDate:Date = new Date();
var dayNum:uint = someDate.getMonth();
{
gotoAndStop (dayNum + 3);
}
(and so on for all the months)
then this
var Aug:Date=new Date(); gotoAndStop(Aug.date, "August")
Once it gets to that frame, I try to run the button
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?
Copy link to clipboard
Copied
if you put a trace() that's not executing in fl_mch_2 when Right is clicked, you're either not clicking Right or there's an error message (or both).
Copy link to clipboard
Copied
There's no error message and how could I not be clicking it?
Very confused by this problem
Copy link to clipboard
Copied
you probably have code in more than one keyframe and/or more than 1 timeline, and whatever you think is Right is probably in more than 1 keyframe or is part of a tween.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now