- art363&463 [interactive_media] -

instructor : ryanSmith

Week #11

Lets take this quiz / test thing

*look at students' Mode Diagrams & Project C in progress

Basic usage of the if conditional AS 3.0

VIDEOS:

2008 installation
Flash portion


FLASH :

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player


//Change Cursor:
//Export for ActionScript

Mouse.hide(); //this hides the mouse

var sml:Smile = new Smile(); //Smile is the name of my movie clip
addChild(sml); //sml is the variable that I am declaring

stage.addEventListener(Event.ENTER_FRAME, handlerThing); //add an event

function handlerThing(event:Event):void {
sml.mouseEnabled = false;
sml.x = mouseX;
sml.y = mouseY;
}
//set up the handler for our event
//make sure to type in "sml.mouseEnabled = false;" or your buttons might not work right

//––––––––––––––––––––––––––––––––––––

//to get your mouse to come back you should add "removeChild(sml);" and "Mouse.show();"

//For example, you can add it to a button:

button.addEventListener(MouseEvent.CLICK, clickHandler);

function clickHandler(evt:Object):void {
removeChild(sml);
Mouse.show();
gotoAndPlay(27);
}
//you can also add Mouse.show(); to the actions on another keyframe



Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player



download GUN_edit.fla
view code
view finished project


Home Work :

Finish Project C