Skip navigation
vidrem
Currently Being Moderated

Problem creating Flash video placeholder

May 24, 2012 8:48 AM

I'm using this code to load a swf with an flv video file. The Flash movie also has a jpg placeholder that loads before the user clicks the video start button on the control panel. When the user clicks the start button, the placeholder overlay is tweened out of the picture and the video plays. This is what the code is upposed to do but it isn't loading the video. Can anyone tell me why this isn't working or what I can do to make it work?  This is meant to have an image rather than a black box before the user starts a video on a web page. Thanks. Here's the code:

 

import fl.video.*;

import com.greensock.*;

import com.greensock.easing.*;

movie1.autoPlay=false;

movie1.source="sandywoods_resident_export.flv";

movie1.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, isPlaying);

function isPlaying(e:VideoEvent): void

{ TweenLite.to(poster, 4,{alpha:0} ); }

 
Replies
  • Currently Being Moderated
    May 24, 2012 9:07 AM   in reply to vidrem

    Work without the tween?

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 9:34 AM   in reply to vidrem

    import fl.video.*;

    import com.greensock.*;

    import com.greensock.easing.*;

    movie1.autoPlay=false;

    movie1.source="sandywoods_resident_export.flv";

    movie1.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, isPlaying);

    function isPlaying(e:VideoEvent): void

    { TweenLite.to(poster, 4,{alpha:0} onComplete:hidePoster); }

     

    function hidePoster(){

          poster.visible=false;

    }

     

     

    or use the normal class Tween, Tween Lite is efficient and compact, but sometimes does strange things

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 9:51 AM   in reply to vidrem

    Sorry

     

     

    { TweenLite.to(poster, 4,{alpha:0, onComplete:hidePoster}); }

     
    |
    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