seamless loop af video

Se ktrager's brugerprofil
Indmeldt: 22-07-2009
Indlæg: 32
Er offline

Hej flash forum...
Har loaded noget film med med nedenstående as. kan bare ikke hitte ud af hvordan jeg får klippet til at loope når det når til ende..? Nogen ideer?

var video;
var nc;
var ns;

nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.client = this;
video = new Video(320,240);
video.x = 100
video.y = 200
addChild(video);
video.attachNetStream(ns);
ns.play("test.flv")

Kommentarer

Se ktrager's brugerprofil
Indmeldt: 22-07-2009
Indlæg: 32
Er offline

har fundet ud af det ser sådan ud, hvis andre skulle få brug for det:

var video;
var nc:NetConnection;
var ns:NetStream;
nc = new NetConnection();
nc.connect(null);
ns = new NetStream(nc);
ns.client = this;

ns.addEventListener(NetStatusEvent.NET_STATUS,netStatusf);

function netStatusf(e:NetStatusEvent) {
if (e.info.code == "NetStream.Play.Stop" && Math.abs(durationNum-ns.time)<.1) {
ns.play("film/film1.f4v");
}
}
var durationNum:Number;
function onMetaData(iObj:Object):void {
durationNum = iObj.duration;
}

video = new Video(287,263);
video.x = 231.1;
video.y = 140.5;
addChild(video);
video.attachNetStream(ns);
ns.play("film/film1.f4v");