I believe it's a timing issue. It may take an extra frame to actually
initialize... Try running an onEnterFrame from onLoadInit to check the size
continually until it's greater than 0.

function onLoadInit(_mc:MovieClip) {

_mc.onEnterFrame = function(){
trace(this._width);
trace(this._height); //this == _mc
}

 _mc.play();

 host._visible=true;

};

hope that works... :)


On 6/20/07, natalia Vikhtinskaya <[EMAIL PROTECTED]> wrote:

Hi to all

I should load swfs with different sizes in host mc ( I have empty mc on
the
stage with this name)  . A window for showing them has smaller size. So I
should scale these swfs.

I thought that I can catch size of loading swf  in  onLoad Init function
and
than scale host mc.



function onLoadInit(_mc:MovieClip) {

            trace(host._height)

            trace(_mc._width)

   _mc.play();

   host._visible=true;

};

But it is always show size 0; Can anybody help me with this problem?
Thanks.
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to