Friday, April 25, 2008

my first modular function!

To share with you my nerdy(er) side, I'm starting to learn ActionScripting, and starting with AS3. I wrote my first custom modular function today and I'm super excited! Horray!

function moveShape(shapeName:MovieClip, vertMovement:Number, rotAmt:Number, alphaAmt:Number):void
{
shapeName.y -= vertMovement;
shapeName.rotation += rotAmt;
shapeName.alpha = alphaAmt;
}

moveShape(blue_mc, 120, 5, .3);
moveShape(orange_mc, -30, 12, .9);
moveShape(purple_mc, 175, 50, .5);
moveShape(yellow_mc, 30, 0, 1);


I know I still have a loooong way to go, but hey, it's a start!

No comments: