fadeStartTime, rewind flvcomponent? HELP! :)

Hey all you all are always such a big help. I’ve got yet another question. Is it possible to have: shareBG have a different fadeStartTime?

Also, is it possible to have the videoBG fade out at a certain time?

Last question, is it possible to have both the videoBG and the shareBG almost kinda reset when the “replay” button is clicked?

Do like a rewind on the flvcomponent? and reset the opacity on the image? How would I do something like this? What would it look like?

thanks for any help!


import fl.video.VideoEvent;
import fl.video.VideoState;


stop();
this.bgPlayed = false;
videoBG.alpha = 0;
shareBG.alpha = 0;
videoPlayer.addEventListener(VideoEvent.PLAYHEAD_UPDATE, onTick, false, 0, true);

//videoPlayer.addEventListener(VideoEvent.STATE_CHANGE, onStateChange, false, 0, true);


function onTick(e:VideoEvent):void
{
    //shareBG.alpha = e.target.playheadPercentage / 100;
    var fadeStartTime:int = 45;
    var triggerTime:int = 55;
    
    
    if (e.playheadTime >= fadeStartTime)
    {
        videoBG.alpha = (e.playheadTime - fadeStartTime) / (triggerTime - fadeStartTime);
        shareBG.alpha = (e.playheadTime - fadeStartTime) / (triggerTime - fadeStartTime);

    }
    
    if (e.playheadTime >= triggerTime && !videoBG.playing && !this.bgPlayed) {
        this.bgPlayed = true;
        videoBG.play();
    }
    
    //trace(e.target.playheadPercentage);
}

function onStateChange(e:VideoEvent):void
{
    if (e.state == VideoState.STOPPED)
    {
        
    }
}