Skip navigation
Currently Being Moderated

Video over a still

Jul 26, 2012 1:45 PM

Hello,

 

I have a video in a flash as2 project using cs4.  I have a video that plays with an alpha channel that fades.  I want to have a background still under so when it fades it fades to the still that I have text on.  This is in a flash game I have made.  The problem is when the game goes from question to question it should play the video then fade to the video beneath, but it plays the background for 1/2 second or so, then plays the video which then fades to the background.  Is there a way that the background can be under the video but not show initially?

 

Thanks for your help.

 

Mark.

 
Replies
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 26, 2012 1:50 PM   in reply to MARKARKARK

    convert your background to a movieclip and assign its _visible property to false until your video starts.

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 26, 2012 4:37 PM   in reply to MARKARKARK

    click on your background (to select it) and (in the properties panel) assign an instance name (eg, bg_mc).  do the same with your flvplayback component (eg, flvpb_mc).

     

    then attaced to the timeline where you want your background to be not visible, use:

     

    bg_mc._visible=false;

    var lo:Object = {};

    lo.ready = function(eObj:Object):Void {

        bg_mc._visible = true;

    };

    flvpb_mc.addEventListener("ready", lo);

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 26, 2012 11:20 PM   in reply to MARKARKARK

    that code should be on the timeline that contains bg1 and q1.

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 27, 2012 4:18 PM   in reply to MARKARKARK

    copy and paste the output from:

     

    trace(bg1);

    trace(q1);

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 28, 2012 9:16 AM   in reply to MARKARKARK

    use:

     

     

    trace(bg1);
    trace(q1);

     

    bg1._visible=false;

    var lo:Object = {};

    lo.ready = function(eObj:Object):Void {

        bg1._visible = true;

    };

    q1.addEventListener("ready", lo);

     

     
    |
    Mark as:
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 28, 2012 12:25 PM   in reply to MARKARKARK

    you're welcome.

     

    p.s. please mark helpful/correct responses, if there are any.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points