Monday, August 3, 2009

Flash Actions Script 3 basic button functions

copy and past this into your actions window to activate your buttons. (but see this website first: http://www.youtube.com/watch?v=ameTsITMhxo


// Replace buttonInstanceName with instance name of your button - three places
buttonInstanceName.addEventListener(MouseEvent.CLICK, buttonInstanceName_onMouseClick);
function buttonInstanceName_onMouseClick(e:MouseEvent):void
{
// actions go here. Basic examples:
// Ex: play();
// Ex: stop();
// Ex: gotoAndPlay(___); where ___ = frame number
// Ex: gotoAndStop(___); where ___ = frame number
// Ex: prevFrame();
// Ex: nextFrame();

// Ex: var request:URLRequest = new URLRequest(url); where url is http://www.somedomain.com/
// navigateToURL(request, '_blank'); // second argument is target and is optional to open in same page


// Replace movieClipInstanceName with the instance name of your MovieClip
// Ex: movieClipInstanceName.play();
// Ex: movieClipInstanceName.stop();
// Ex: movieClipInstanceName.gotoAndPlay(___); where ___ = frame number
// Ex: movieClipInstanceName.gotoAndStop(___); where ___ = frame number
// Ex: movieClipInstanceName.prevFrame();
// Ex: movieClipInstanceName.nextFrame();

}

No comments: