Wednesday, April 22, 2009
WED. Scripts Frame 3
WED. Scripts Frame 2
WED. scripts FRAME 1
Monday, April 20, 2009
UNLOAD
LOAD external file
AS3 using a MovieClip as a Button w/ Animation
import flash.display.MovieClip;
import flash.events.MouseEvent;
myMc.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);
myMc.addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler);
myMc.addEventListener(MouseEvent.CLICK, onClickHandler);
myMc.addEventListener(MouseEvent.MOUSE_DOWN, onPressHandler);
myMc.addEventListener(MouseEvent.MOUSE_UP, onReleaseHandler);
// if you want a hand cursor
myMc.buttonMode = true; myMc.useHandCursor = true;
function onRollOverHandler(myEvent:MouseEvent) {
trace("s1");
myMc.gotoAndPlay("_over");
}
function onRollOutHandler(myEvent:MouseEvent) {
trace("Out");
myMc.gotoAndPlay("_out");
// myMc.stop();
}
function onClickHandler(myEvent:MouseEvent) {
trace("I waited for Press AND Release!!!");
}
function onPressHandler(myEvent:MouseEvent) {
trace("Press");
}
function onReleaseHandler(myEvent:MouseEvent) {
trace("Release");
}