Reputation: 783
This is the code which I used in AS2
on (release) {
tellTarget ("/incorrect")
{
nextFrame();
}
}
How do I do this in AS3 (AIR) ?
Thank you.
Upvotes: 2
Views: 780
Reputation: 6718
Instead of tellTarget("/something")
use (root as MovieClip).something
. Instead of on (release) {
use addEventListener
.
import flash.events.MouseEvent;
button.addEventListener(MouseEvent.CLICK, buttonClick);
function buttonClick(event:MouseEvent):void
{
(root as MovieClip).incorrect.nextFrame();
}
Upvotes: 3