access netStream or movieClip from a loop AS2
Posted
by conspirisi
on Stack Overflow
See other posts from Stack Overflow
or by conspirisi
Published on 2010-01-26T11:47:31Z
Indexed on
2010/04/08
9:03 UTC
Read the original article
Hit count: 361
as2
|actionscript
I've got a load of videos
var ns1:NetStream = new NetStream(nc);
container1.compMa.theVideo.attachVideo(ns1);
ns1.play("sukh_diesel.flv", 1);
//
var ns2:NetStream = new NetStream(nc);
container2.compMa.theVideo.attachVideo(ns2);
ns2.play("sukh_beneath.flv", 1);
//and 4 more, which I've left out to be concise
I want to pause them with
function pauseVid(){
this.ns1.pause();
for(i=1;i<7;i++){
this["ns"+i]pause();
}
}
the commented out line:
this.ns1.pause()
works, but when I try it in a loop it can't access it?
© Stack Overflow or respective owner