A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Fade in/out

  1. #1
    Member
    Join Date
    Jan 2008
    Posts
    75

    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

  2. #2
    Member
    Join Date
    Nov 2006
    Posts
    69
    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

  3. #3
    Member
    Join Date
    Jan 2008
    Posts
    75
    Thanks deldelfarrom,

    Your a life saver.

    vxd

  4. #4
    Member
    Join Date
    Jan 2008
    Posts
    75
    How about when it exits the MC?

    thanks vxd

  5. #5
    Member
    Join Date
    Nov 2006
    Posts
    69
    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.

  6. #6
    Member
    Join Date
    Jan 2008
    Posts
    75
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center