Hi!
Could someone please help me figure out how to control netstream from external swf-file? I’m loading and external videoplayer to my fla-project. So I have following files:
myproject.fla -> myproject.swf
in that project i’m importing videoplayer video.swf, that uses external as-file as code. So that would be video.as.
How can I control the video playback from myproject.swf?
This is how I import the file:
var container:Sprite = new Sprite();
addChild(container);
var ldr:Loader = new Loader();
var urlReq:URLRequest = new URLRequest("video.swf");
ldr.load(urlReq);
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
function loaded(event:Event):void
{
tausta_mc.videocontent_mc.addChild(ldr.content);
}
This is where I get my problem:
tausta_mc.kyltit_mc.ihmisetnappi_mc.addEventListener (MouseEvent.CLICK,do_videopois);
function do_videopois(event:Event):void
{
tausta_mc.videocontent_mc.removeChild(ldr.content);
}
When I remove the child, the sound continues to play. I know it would stop by stopping the NetStream, but I don’t know how to control variables from the external as file of the child object. Can anyone help me please? I have been stuck with this problem for two days now…