as3 FLV组件posistion / align issue - FLVPlayback();

时间:2012-04-21 06:36:23

标签: actionscript-3 flash alignment flvplayback

尝试:

我正在尝试使用另一个动态mc中的FLVPlayback()组件加载FLV并将其放在电视屏幕上。

问题:

---它不会在左上角加载。 ---它适合WIDTH以适应电视屏幕,但在下方和上方有这个时髦的空间。

问题:

如何将视频放在左上角?如何使其适合电视屏幕的高度?

CODE:

import flash.display.*;
import fl.video.*;

var my_mc:MovieClip = new MovieClip(); 
addChild(my_mc); 

var myVideo:FLVPlayback = new FLVPlayback();
myVideo.source = "http://EdVizenor.com/edgen/EpicLogo.flv";
myVideo.align = StageAlign.TOP_LEFT; /// This does not work :(
my_mc.addChild(myVideo);

One.BlackScreen.addChild(my_mc);
my_mc.width = One.BlackScreen.width;
my_mc.height = One.BlackScreen.height;

...

FLA SOURCE DOWNLOAD

源FLA文件位于:http://www.edvizenor.com/Help.fla 它有图像和电视屏幕......

更新日期:4/21/12

以下答案是正确的,但是当我使用此视频源并且不更改任何其他内容时,我遇到了同样的问题。我该如何解决这个问题?

myVideo.source = "http://EdVizenor.com/Boom.flv"; /// DOES NOT WORK

1 个答案:

答案 0 :(得分:4)

这是因为您的.flv文件与动画片段的比例不同。

import flash.display.*;
import fl.video.*;

var my_mc:MovieClip = new MovieClip(); 
addChild(my_mc); 

var myVideo:FLVPlayback = new FLVPlayback();
myVideo.source = "http://EdVizenor.com/edgen/EpicLogo.flv";
myVideo.align = StageAlign.TOP_LEFT;
myVideo.scaleMode = VideoScaleMode.EXACT_FIT;
myVideo.width = One.BlackScreen.width;
myVideo.height = One.BlackScreen.height;

my_mc.addChild(myVideo);
myVideo.play();

One.BlackScreen.addChild(my_mc);
my_mc.width = One.BlackScreen.width;
my_mc.height = One.BlackScreen.height;