Can anybody help with this problem. In main swf I load "pages" – swfs
in "host" mc.
host=this.createEmptyMovieClip("host", 1);
When I change page current page (host) and menu move and I delete
menu and host mc with this function in _root..
deleteMenu=function(){
curPage="";
destX=1100;
menu.onEnterFrame = function() { // this menu in _root
this._x += (destX-this._x)/6;
host._x+=(destX-host._x)/6;
if (Math.abs(this._x-destX)<1){
this._x=destX;
host.removeMovieClip(); //host in _root
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
This works fine but not with swf where I have video.
Swf with video has scripted video. I attach mc with name
"videoPlayer"." videoPlayer" has this code inside:
var nc:NetConnection=new NetConnection();
nc.connect(null);
var ns:NetStream=new NetStream(nc);
ns.setBufferTime(3);
ns.onStatus=function(info){
if (info.code=="NetStream.Buffer.Full"){
bufferClip._visible=false;
}
if (info.code=="NetStream.BufferEmpty"){
bufferClip._visible=true;
}
if (info.code=="NetStream.Play.Stop"){
ns.seek(0);
}
}
theVideo.attachVideo(ns);
ns.play(_parent.currVideo);
var videoInterval=setInterval(videoStatus,10);
var amountLoaded:Number;
var loadBar_w=loader.loadBar._width;
var duration:Number;
var scrubInterval;
ns["onMetaData"]=function(obj){
duration=obj.duration;
}
function videoStatus(){
amountLoaded=ns.bytesLoaded/ns.bytesTotal;
loader.loadBar._width=amountLoaded*loadBar_w;
loader.scrub._x=ns.time/duration*loadBar_w;
if (withinNSecondsOfEnd(0.4)){
ns.seek(0);
playButton.status="pause";
playButton.gotoAndStop("pause");
ns.pause();
}
}
After attaching this videoPlayer my function deleteMenu() in _root
does not work. I tested and see that enterFrame function does not
work at all. I can not move host or any other mc in _root using
enterFrame. What is wrong?
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders