RE: [Flashcoders] Finding the height and width of the VISIBLE area ofamasked SWF

2007-04-19 Thread Michael Hood
Why not place a movie clip, behind the bottom-most background layer (or,
make it invisible) that is the same size as the desired size(or visible
height  width) you wish the swf to be read as, by the main stage (assuming
that is what you are trying to do)? 

That way, if your swf is really 800 X 600, you can have the main stage call
the swf to see what the desired size is of the incoming swf, (400 X 300)
and do with that information whatever it is you are trying to do.  (I dunno
if that makes any sense?)

Heck, I'm not even sure if what you are attempting to do can be done that
way, or not - I'm still trying to get a handle on ActionScript, myself!  I
sure wish they would stop re-writing/updating ActionScript it long enough
for the slower of us to catch on! :-P   

Also, what about _lockroot?  If it's a matter of your ext. swfs being
re-sized because they are being imported onto the stage, perhaps using
_lockroot might prevent that (although, I am not sure if that actually
controls the stage size of the swf ,or not).  
 
  Michael Hood
 Internal Applications Dev ADMS/ CMS/ Armory


 [Original Message]
 From: Hershell Bryant [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Date: 4/18/2007 3:21:39 PM
 Subject: RE: [Flashcoders] Finding the height and width of the VISIBLE
area ofamasked SWF

 To center the visible part on stage, center the mask on stage.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of matt
 stuehler
 Sent: Wednesday, April 18, 2007 2:30 PM
 To: Flashcoders mailing list
 Subject: [Flashcoders] Finding the height and width of the VISIBLE area of
 amasked SWF

 All,

 It looks like this has been asked before, but I couldn't find an answer.

 I'm creating a Flash app that loads several SWFs.

 Those SWFs contain use masks.

 I'd like to be able to find the VISIBLE height and width of those
 SWFs; however _width and _height return the size of ALL the masked
 content.

 In other words, if the SWF has a stage size of 400x300, and a mask of
 400x300, but the total size of the SWF is 800x600 (e.g., b/c of
 off-stage content, or stuff that's not visible thru the mask), then
 _width returns 800, and _height returns 600.

 I can see why that's sometimes useful, but in this particular
 application, I need to know the VISIBLE size.

 For example, I'd like to be able to center the VISIBLE part of the SWF
 on the stage.

 Is there any way to figure that out?

 Cheers,
 Matt Stuehler
 ___
 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


___
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


Re: [Flashcoders] Finding the height and width of the VISIBLE area ofamasked SWF

2007-04-19 Thread matt stuehler

All,

I've come up with a solution - it's not perfect, but it's pretty
robust and reliable.

If anyone is following this thread and would like more detail, send me an email.

Cheers,
Matt Stuehler

On 4/19/07, Michael Hood [EMAIL PROTECTED] wrote:

Why not place a movie clip, behind the bottom-most background layer (or,
make it invisible) that is the same size as the desired size(or visible
height  width) you wish the swf to be read as, by the main stage (assuming
that is what you are trying to do)?

That way, if your swf is really 800 X 600, you can have the main stage call
the swf to see what the desired size is of the incoming swf, (400 X 300)
and do with that information whatever it is you are trying to do.  (I dunno
if that makes any sense?)

Heck, I'm not even sure if what you are attempting to do can be done that
way, or not - I'm still trying to get a handle on ActionScript, myself!  I
sure wish they would stop re-writing/updating ActionScript it long enough
for the slower of us to catch on! :-P

Also, what about _lockroot?  If it's a matter of your ext. swfs being
re-sized because they are being imported onto the stage, perhaps using
_lockroot might prevent that (although, I am not sure if that actually
controls the stage size of the swf ,or not).

  Michael Hood
 Internal Applications Dev ADMS/ CMS/ Armory


 [Original Message]
 From: Hershell Bryant [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Date: 4/18/2007 3:21:39 PM
 Subject: RE: [Flashcoders] Finding the height and width of the VISIBLE
area ofamasked SWF

 To center the visible part on stage, center the mask on stage.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of matt
 stuehler
 Sent: Wednesday, April 18, 2007 2:30 PM
 To: Flashcoders mailing list
 Subject: [Flashcoders] Finding the height and width of the VISIBLE area of
 amasked SWF

 All,

 It looks like this has been asked before, but I couldn't find an answer.

 I'm creating a Flash app that loads several SWFs.

 Those SWFs contain use masks.

 I'd like to be able to find the VISIBLE height and width of those
 SWFs; however _width and _height return the size of ALL the masked
 content.

 In other words, if the SWF has a stage size of 400x300, and a mask of
 400x300, but the total size of the SWF is 800x600 (e.g., b/c of
 off-stage content, or stuff that's not visible thru the mask), then
 _width returns 800, and _height returns 600.

 I can see why that's sometimes useful, but in this particular
 application, I need to know the VISIBLE size.

 For example, I'd like to be able to center the VISIBLE part of the SWF
 on the stage.

 Is there any way to figure that out?

 Cheers,
 Matt Stuehler
 ___
 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


___
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


Re: [Flashcoders] Finding the height and width of the VISIBLE area ofamasked SWF

2007-04-19 Thread Ian Thomas

You could probably do it by blitting the contents of the clip to a
BitmapData and then using getColorBoundsRect().

Ian

On 4/19/07, matt stuehler [EMAIL PROTECTED] wrote:

All,

I've come up with a solution - it's not perfect, but it's pretty
robust and reliable.

If anyone is following this thread and would like more detail, send me an email.

Cheers,
Matt Stuehler

___
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