[_] actionscript video embedding
Alex Stanhope
listalex at lightenna.com
Tue Jun 19 09:16:19 BST 2007
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.
As an example I've created the following code (A):
this.createEmptyMovieClip('fish',200);
with(this.fish)
{
moveTo(0,0);
beginFill(0x0000FF)
lineTo(163,200);
lineTo(93,280);
lineTo(0,280);
endFill();
}
which correctly creates a movie clip and I can see the big blue triangle in the corner. This successfully plays the video (B):
import mx.video.*;
_root.attachMovie("FLVPlayback", "my_FLVPlybk", 201, {width:320, height:240, x:100, y:100});
my_FLVPlybk.skin = "file:///C|/Program Files/Macromedia/Flash 8/en/Configuration/Skins/ClearOverPlaySeekMute.swf"
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
but when I attachMovie to my movieclip I don't see the video (C):
this.fish.attachMovie("FLVPlayback", "my_FLVPlybk", 201, {width:320, height:240, x:100, y:100});
Any guidance much appreciated.
Cheers, Alex
Alex Stanhope
Lightenna Ltd.
0117 929 1032
http://www.lightenna.com
Company registration number: 5110477