well, the instances can differ because the swfs to be loaded
can be any swf, so i have no chance to prepare each of them.
any other solution to get the real (stage size) dimensions?
Am 20.02.2006 19:47 Uhr schrieb "Éric Thibault" unter
<[EMAIL PROTECTED]>:
> The dimension of the loaded SWF is the space occupied by instances on
> it's first frame... try to place a rectangle at 0:0 with a dimension of
> 1024 * 768 on frame one in your loaded SWF... Does it do the trick?
>
> A+
>
> Eric Thibault
>
>
> lars wrote:
>
>> hi all. i'm trying to load a swf and scale it down to a specific size
>> before displaying it. i'm using this to do so:
>>
>> var mclListener:Object = new Object();
>> mclListener.onLoadInit = function(target_mc:MovieClip) {
>> trace("target w:"+target_mc._width);
>> trace("target h:"+target_mc._height);
>> trace("target ver:" + target_mc.getSWFVersion());
>> var newScaleRatio:Number = Math.min( 350/target_mc._width,
>> 250/target_mc._height)*100;
>> target_mc._xscale = newScaleRatio;
>> target_mc._yscale = newScaleRatio;
>> };
>>
>> var image_mcl:MovieClipLoader = new MovieClipLoader();
>> image_mcl.addListener(mclListener);
>> image_mcl.loadClip("1024768dummy.swf", _root.holder);
>>
>> the swf (1024768dummy.swf) has a size of 1024x768 pixel. when i test
>> my script it returns: 947.7 (width) and 126.95 (height)... what's wrong
>> with it? i exported the dummy as version 6 swf btw. thanks: lars
>>
>>
>> _______________________________________________
>> [email protected]
>> 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
>>
>>
>>
> _______________________________________________
> [email protected]
> 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
_______________________________________________
[email protected]
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