Skip to main content
Participating Frequently
April 16, 2006
Question

movieclip loader question

  • April 16, 2006
  • 2 replies
  • 544 views
Hi,
I just used the movie clip loader class to load a swf dynamically, and oddly, the width and height are zero even as i'm looking at the loaded clip too large for the area i'm loading it into. Is there any way around this?

thanks
e
This topic has been closed for replies.

2 replies

Participating Frequently
April 16, 2006
sorry for the confusion...i'm using both, but only for debugging...when onLoadInit is called, the values of the empty movie clip i'm trying to load the swf into are 353x39 when they should be 1024x768...when onLoadComplete is called the width and height are both 0...the reason i'm using onLoadComplete is because i want to scale the movie down to the correct size once it's loaded...i could scale it earlier, but either way my values are incorrect...

hope that's more clear...

thanks
Inspiring
April 16, 2006
I replicated your setup. When I scale the loaded swf in the onLoadComplete handler it traces the scaled _width and _height correctly. You might want to zip all your files and post a link to the zip.
Participating Frequently
April 16, 2006
are you sure...it's 100% oop...using design patterns...
Inspiring
April 16, 2006
Are you getting the _width and _height in the onLoadInit handler?
Participating Frequently
April 16, 2006
yes, but unfortunately, the width and height at that point a very different from what i need them to be when onLoadComplete is called...i suppose i could just hard code the values since i know what they will be in the end, but that defeats the purpose...after the movie is fully loaded i scale it to fit in an area on the stage...my scale values are completely out of whack (infinity) because when onLoadComplete is called...the values are 0 instead of 1024x768...is this a bug...did i just find a bug? if not...why does my empty movie clip have values of 353x39

confused obviously

e
Inspiring
April 16, 2006
Now I'm confused. Are you using the onLoadInit or onLoadComplete handler. The onLoadComplete is the wrong one...