Mmm...

The funiest thing is that if I want to center my loaded SWF that has instances outside the loaded SWF'stage, it gets shifted.... :'(

Is there a way to know the nomber of pixels to the left, top, bottom and right of the registration point (0,0) of a container? I could than compensate for the extras of the SWF inside of it...

Say that my container is 200px in width but I know that it has 50px extra to the left (-50px), my real width is then 150px??

A+

Nathan Derksen wrote:

Ah yes, that's a fun issue. Unfortunately, once you load an SWF inside another, there is no way that I know of to get the original published stage size. I would love to be proved wrong, though, but I have looked hard for a way to do that as well. All you can really do is keep xscale and yscale to 100, and use a fixed size mask so that anything outside of the area you have set aside for the clip is hidden (in case stuff goes outside the bounds of the stage).

Nathan
http://www.nathanderksen.com


On Feb 3, 2006, at 8:06 AM, Éric Thibault wrote:

I already do that... but the width and height of the container clip takes into account any instances outside the boundary of the loaded SWF's stage... So I'm getting the total with and height but want only the stage dimentions of the loaded SWF!

I want to align the loaded SWF'stage in the loading flash....

If it was just for me, i would not put anything outside the stage of the loaded SWF but I'm not the producer of those swf...

And having the stage dimentions would help because the loaded SWF's dimentions only takes into account the instances present on frame 1... (mc_square 100*100 at (0,0) on a stage of 300*300 results in a container clip of 100*100!)

A+

j.c.wichman wrote:

Hi,
If you use something like:
        var my_mcl:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();

        myListener.onLoadInit = function(target_mc:MovieClip) {
          trace(target_mc._width);
        };         my_mcl.addListener(myListener);
        my_mcl.loadClip(<YOUR path to SWF here eg "test.swf">, <path
to container here>_root.dummy);

It should trace the width of your clip upon load. Is that what you mean?

Greetz
Hans

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Éric
Thibault
Sent: Friday, February 03, 2006 3:11 PM
To: Flashcoders Mailing List
Subject: RE:[Flashcoders] LoadClip and centering new content

Hello again...

My problem is : how to know the stage's dimentions of a loaded SWF to center
it correctly in its container?

Here's my tests on that particular problem

1. Set _lockroot inside the loaded SWF : no effect.
2. Set Stage.scaleMode = |"noScale" : no effect.

|When I execute the loaded SWF independently, the Stage dimentions  are
OK but once loaded inside another Flash movie, the Stage's dimentions are
those of the main movie.

I was looking to include a mc with the same dimentions as the stage inside
the loaded SWF but there will be a lot of SWF and not all made by me!

I there a way to retreive this kind of information or is it impossible?

Thanks a million.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to