More information about the Underscore mailing list

[_] actionscript video embedding

Tim Brayshaw tim at twisty.com
Tue Jun 19 14:45:12 BST 2007

On 19 Jun 2007, at 09:16, Alex Stanhope wrote:

> Morning all,
>
> I'm trying to play an flv video clip in a Flash movie.  Simple  
> enough, but the video is part of a slideshow: a mixture of still  
> images and videos.  I have an array of movie clips that I cycle  
> around using alphas, dynamically loading images into each one  
> shortly before it's displayed.  The problem comes when I try to  
> load the video into the movie clip.

This worked okay for me:

/*
  * start (ActionScript in frame 1)
  */

import mx.video.*;

var fish = this.createEmptyMovieClip('fish',200);
with(fish)
{
    moveTo(0,0);
    beginFill(0x0000FF)
    lineTo(163,200);
    lineTo(93,280);
    lineTo(0,280);
    endFill();
}

var flvPlayback = fish.attachMovie("FLVPlayback", "flvPlayback",  
fish.getNextHighestDepth(), {width:320, height:240, x:100, y:100});
flvPlayback.skin = "ClearOverPlaySeekMute.swf"
flvPlayback.contentPath = "http://www.helpexamples.com/flash/video/ 
water.flv";

// end

I copied "ClearOverPlaySeekMute.swf" into the same location as the  
swf I was outputting.

Tim.