Flashead

Made a fancy Flash header for my blog. Had some issues with linking to the same window with a embedded swf, as it's on a external domain, thus the iframe solution. The gently flocking blue dots are done with FLiNT particle system, this is something i will play with for a while.

Here is how you make a MovieClip button in AS3 of an instance called btn
import  flash.display.MovieClip;
import  flash.events.MouseEvent;

btn.addEventListener(MouseEvent.ROLL_OVER, onRollOverHandler);
btn.addEventListener(MouseEvent.ROLL_OUT, onRollOutHandler);
btn.addEventListener(MouseEvent.CLICK, onClickHandler);
btn.addEventListener(MouseEvent.MOUSE_DOWN, onPressHandler);
btn.addEventListener(MouseEvent.MOUSE_UP, onReleaseHandler);

// if you want a hand cursor
btn.buttonMode = true;
btn.useHandCursor = true;

function onRollOverHandler(myEvent:MouseEvent){
//trace("Over!");
 }

function onRollOutHandler(myEvent:MouseEvent){
//trace("Out!");
}

function onClickHandler(myEvent:MouseEvent){
//trace("I waited for Press AND Release!!!");
}

function onPressHandler(myEvent:MouseEvent){
//trace("Press");
}

function onReleaseHandler(myEvent:MouseEvent){
//trace("Release");
}
Listen to fresh souds at Solid Steel Podcast #78

0 comments :