Friday, 7 December 2012

Fancy spiderman button:

Today we learnt a little more in flash this time with some buttons, and in this button it involved some awesome transitions using the classic tweens to make the image rotate into the border and zoom a little bit but the code we used was this:


onEnterFrame = function(){
if (bob.hitTest(_xmouse,_ymouse,true))
{
bob.nextFrame();

}else{
bob.prevFrame();
}

};

the instance name for it was bob again it does not have to be bob I just like having random instance names that are easy to remember/type out into flash.


the image above is what it looks like before you hover over the image, and actually in the swf, it zooms out and rotates a bit so you can see more of Spiderman

No comments:

Post a Comment