使用AS3从图书馆玩飞

时间:2012-12-16 16:42:09

标签: actionscript-3 video flv flvplayback

如何使用AS3从我的图书馆播放视频?它位于文件夹video中,名为video01.flv

package
{
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import fl.video.*;

    public class video01 extends MovieClip
    {
        public function video01()
        {
            trace("movieclip 1 geladen");
            btn_terug.addEventListener(MouseEvent.CLICK, terug);
        }

        public function terug(evt:MouseEvent):void 
        {
            trace("knop ingedrukt");
            Main(parent).filmAan = false;
            this.parent.removeChild(this);    
        }
    }
}

1 个答案:

答案 0 :(得分:1)

发现它!它很简单:

package
{
import flash.display.MovieClip;
import flash.events.MouseEvent;
import fl.video.*;

public class video01 extends MovieClip
{
    public function video01()
    {
        videoPlayer.source = "video/video01.flv";
        trace("movieclip 1 geladen");
        btn_terug.addEventListener(MouseEvent.CLICK, terug);
    }

    public function terug(evt:MouseEvent):void 
    {
        trace("knop ingedrukt");
        Main(parent).filmAan = false;
        this.parent.removeChild(this);  
    }
}
}