Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to detect width & height of Container MovieClip

Status
Not open for further replies.

firegambler

Technical User
Sep 25, 2002
455
0
0
AT
Hi,

I am trying to make a container MovieClip in which I would like to load another Movie.
The loaded Movie would have to know, what size the container would have in order to set the position of some images dynamically.

Is there a way to get the ClipHolder's width and height?
I tried to use _parent._width on the main timeline of the loaded movie to retrieve the values but the results I got were always weird...

thanks in advance!

 
You cannot access a container's width & height, until what's loading into it has been fully loaded...

The method is then usually something along these lines...

Set the container'sa alpha to 0.
Load the content, and monitor the loading with some preloading code.
Once you get the width & height, when the preloading is over, position the container clip on stage, based on it's width & height.
Set the container's alpha back to 100.

Regards. FLASH HELP - OPENED FOR BUSINESS!
TO GET YOUR OWN FREE WEBSITE HOSTING
 
Hi Oldnewbie, thanks for your answer!

So do I interpret your answer correctly when saying that from within the loaded movie I can not find out the size of the container the movie was loaded to?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top