# fadeStartTime, rewind flvcomponent? HELP! :)

**URL:** <https://forum.kirupa.com/t/fadestarttime-rewind-flvcomponent-help/299765>\
**Category:** Uncategorized\
**Created:** [November 10, 2009, 6:45pm UTC](https://forum.kirupa.com/t/fadestarttime-rewind-flvcomponent-help/299765 "2009-11-10T18:45:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dr\_Abner\_Mellon](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@Dr\_Abner\_Mellon](https://forum.kirupa.com/u/Dr_Abner_Mellon)\
**Post date:** [November 10, 2009, 6:45pm UTC](https://forum.kirupa.com/t/fadestarttime-rewind-flvcomponent-help/299765/1 "2009-11-10T18:45:38Z")

</div>

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!

```auto

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)
    {
        
    }
}

```
