PDA

View Full Version : Size problem loading external swf


Didier Prophete
04-13-2007, 08:15 AM
So, I am trying to load an external 720px by 540px swf movie (with MovieClipLoader), but after being loaded, its size gets set to a few thousand pixels by a few thousand.

The loaded movie has a huge size (something like 20000x20000 but this seems to be pretty random and changes to other big numbers when I load other movies) with the 'real' content only occupying the top left corner (square 720x540). I really don't get it.

(and of course, to make things even more confusing, if I open the external swf directly in my browser, everything works fine)


The code I use is pretty standard. Something like this:

_root.createEmptyMovieClip("my_mc", 1000);
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener({onLoadInit: done});
mcl.loadClip("/path/to/my/swf", "my_mc");

done: function() {
trace(my_mc._width); // around 20000
trace(my_mc._height); // around 20000
}


ps: For refrence, I did find somebody with a 'similar' problem. The guy posted on a UK board last year but didn't really get anywhere:
http://www.flashgroup.net/forum/archive/index.php?t-5654.html