Beautiful
Sometimes I come across something that I want to share:
Nuit Blanche from Spy Films on Vimeo.
There’s a making of video too.
Sometimes I come across something that I want to share:
Nuit Blanche from Spy Films on Vimeo.
There’s a making of video too.
// Anything to the right of these two slashes is
// A comment and will not be part of the code.
var xSize:int = 200;
// Add an event listener to the stage and name the function
stage.addEventListener(Event.ENTER_FRAME,onFrameLoop);
// Your function name must match the name after the comma
// in the parenthesis.
function onFrameLoop(evt:Event):void {
// These are all of the things that will happen in
// the function.
// This will rotate the instance of the rectangle
// colin according to mouse X and Y values.
colin.y = mouseY;
colin.x = 800 - mouseX;
// here’s an if statement
if (mouseX > xSize) {
trace(”rotating! ” + mouseX +” ” + colin.y);
//colin.rotation = mouseX;
colin.height = 29;
// here’s another option if that statement hasn’t been met
}
else if(mouseX < xSize) {
trace(”scaling!”);
colin.scaleY = mouseY;
}
// This will scale the instance of the rectangle
// colin according to the mouse X and Y values.
colin.scaleX = mouseY/20;
colin.scaleY = mouseX/20;
}
// Don’t forget to close the function with the
// brace (squiggly bracket) above!!!