Hi,
i am trying to get the width of a movie i am loading.
so i load my movie:
load_container.loadMovie(this.mySWF);
and then try to trace the width:
trace(load_container._width);
but it comes out as 0??
any ideas?
Hi,
i am trying to get the width of a movie i am loading.
so i load my movie:
load_container.loadMovie(this.mySWF);
and then try to trace the width:
trace(load_container._width);
but it comes out as 0??
any ideas?
it works when movie is loaded
so get width after movie is loaded
I used it a lot for static width movies that are loaded dynamicly and I found out for me best way is to define their widths in XML
thank you, i am using xml, so i guess have to add in a attribute.
No, no need for xml!
You just heve to wait till its loaded!
path.loadMovie("myMovie.swf");
this.onEnterFrame = function(){
if (path.getBytesLoaded() == path.getBytesTotal() || path.getBytesLoaded() > 10){
trace(path._width);
delete this.onEnterFrame;
}
}
thank you works perfectly!!
welcome :rambo:
be prepared that in browsers like opera and firefox
which don’t give right return for bytes loaded and bytes total for first loading you get scrambled movieclips
testing on machine works good but on server shows some scrambling
after reloading everything works perfectly
I don’t say it wont work
I say test it in these browsers on server
i am using this in a offline application, so sould not be a problem… thank you for the information anyway.
:: Copyright KIRUPA 2024 //--