swishmax 4 scripted fade in / out tutorial.
First Of All:
open swishmax 4 and set movie width and height 25 frame rate.
create a movieclip of whatever it is you want to fade in/ out.
this will be a button fade in fade out action. so add the following to your movieclip.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | onSelfEvent (load) { /* simple scripted fade in / out script by Craig Lowe www.loweonline.co.uk www.swish-designs.co.uk */ fading=true; // fade out on start false alpha=100; // makes object opaque fadeSpeed=3; // how quick the fade is } onSelfEvent (enterFrame) { this.onRollOver = function(){ fading=false; } this.onRollOut = function(){ fading=true; } if(fading && alpha>0){ alpha-=fadeSpeed; this._alpha=alpha; } if(!fading && alpha<100){ alpha+=fadeSpeed; this._alpha=alpha; } } |
Social Connect
Login with one of the following.Enter your WordPress.com blog URL
http://.wordpress.com
Proceed