-
Fade in/out
I'm just wondering how I can make it when you navigate into a page in will fade in and when you navigate out of the page it will fade out using action script.
I know i can do it manually with tween but hoping to find out how to do it with AS
Thanks vxd
-
import mx.transitions.Tween;
import mx.transitions.easing.*;
var tw:Tween = new Tween(my_mc, "_alpha",Strong.easeOut,0,100,5,true);
-------
Tween(A,B,C,D,E,F,G);
A = movie name
B = property to change
C = method (easout works for most) ****
D = start value
E = destination value
F = time to do it
G = (false = F Frames) (true = F Seconds)
In the example above my_mc alpha would take 5 seconds to fade in.
Hope that helps.
***
These categories and types can be mixed an matched the example was Strong.easeOut (Strong Category : easeOut Type)
Categories of easing
Strong
Back
Elastic
Regular
Bounce
None
Types of easing
easeIn
easeOut
easeInOut
easeNone
-
Thanks deldelfarrom,
Your a life saver.
vxd
-
How about when it exits the MC?
thanks vxd
-
var tw2:Tween = new Tween(my_mc, "_alpha",Strong.easeOut,100,0,5,true);
Just swaping the start and destinations around so that it starts at 100 and fades out to 0.
-
Yeah I know that but I wanted to know how you would make it fade out when you navigate out of that movie clip.
eg: MC opens (fades in), MC closes (fades out). I'm designing a website where it would like to multiple MC.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|