fade btw keyframes

  • Started
  • Last post
  • 1 Response
  • Buckyball2

    I'm setting up a pic sequence in Flash with forward and back buttons. At the moment it simply goes to the next or previous frame without an effect. I'd like to have a 1 second or so fade transition into the next photo. Regardless of if you're going forward or back on the timeline. Make sense?

    Any actionscript to do this without mucking up my whole timeline?

    thanks,
    bB

  • visualplane_0

    This can be done creating a function adjusting the alpha properties of a movieclip, and the timing can be adjusted using setInterval.

    First set the alpha to zero with the following code:

    _root.mcBox._alpha = 0;

    mcBox is the instance name of your image.

    Then use this code to create the fade onto the movieclip:

    function fade():Void {
    _root.mcBox._alpha +=10;
    }

    Then set the timing with setInterval here, and adjust the speed where the 50 is. It's in milliseconds:
    var nInertiaInterval:Number = setInterval(fade,50);

    So again, place all of the code per each of the frame.