创建一个空影片剪辑并将其附加到舞台上,我想只使用 actionscript 2 播放一个 flv .. 我听到音频,但没有视频。
import flash.display.*;
import flash.filters.*;
import flash.geom.*;
import flash.net.*;
import mx.utils.*;
import flash.external.ExternalInterface;
_root.createEmptyMovieClip("vidsurface",_root.getNextHighestDepth());
vidsurface.beginFill(0x000000, 100);
vidsurface.moveTo(0, 0);
vidsurface.lineTo(100, 0);
vidsurface.lineTo(100, 100);
vidsurface.lineTo(0,100);
vidsurface.lineTo(0,0);
vidsurface._visible=true;
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
vidsurface.attachVideo(ns);
ns.play("http://nicolasguy.free.fr/flv/cpe.flv");
ns.onStatus = function(info:Object)
{
trace("NetStream.onStatus called: ("+getTimer()+" ms)"+" "+info.code);
}