art382 (interactive media)

instructor: ryanSmith
home | syllabus | contact | links | student work

Week 11

MONDAY :

Look at Project C Code (HW) & mode diagrams

Has anyone seen this:
http://www.jimcarrey.com


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

Get Adobe Flash player



"Try it once, and not much happens.
Try it again, and fail.
Keep trying, and keep failing.
Start over, and eventually you will succeed.
Then you do it again."
//the code on frame 1:

stop();
var i:int;
i=0;
//////////code for the button/////
BTN1.addEventListener(MouseEvent.CLICK,test);
function test(evt:Object):void{
if (i==0){gotoAndStop(2);
}
else{
gotoAndStop(10);
}
i=i+1;
if (i==5){
gotoAndStop(3);
}
if (i>=7){
gotoAndPlay("youWin");
}
}


Change Cursor:
**Export for ActionScript

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

var sml:Smile = new Smile();
addChild(sml);
//Smile is the name of my movie clip
//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


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


Review Test material


Homework:


Keep working on Project C
Have your code finished, everything should be working,
Rough draft is due
Monday, Nov. 12

Study for TEST next week (Wednesday)