[Flashcoders] Find size of the bounding box of a particular frame of a loaded SWF
All, I'm working on an application that loads a variety of external SWFs. Once each SWF loads, if I test it's _height and _width properties, I get the height and width of the largest frame within that clip. However, what I'd like to get is the _height and _width of a particular frame. Is that possible? 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
RE: [Flashcoders] Find size of the bounding box of a particular frame of a loaded SWF
When you say frame - you need to think of that differently. A frame is not a physical object, but instead an instance of the stage being rendered in time (or something like that :) ) - check for the width and height of an object instance in that frame, like a background movieclip or something. Frames don't have heights and widths that I am aware of. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of matt stuehler Sent: Wednesday, April 18, 2007 10:11 AM To: Flashcoders mailing list Subject: [Flashcoders] Find size of the bounding box of a particular frame of a loaded SWF All, I'm working on an application that loads a variety of external SWFs. Once each SWF loads, if I test it's _height and _width properties, I get the height and width of the largest frame within that clip. However, what I'd like to get is the _height and _width of a particular frame. Is that possible? 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
Re: [Flashcoders] Find size of the bounding box of a particular frame of a loaded SWF
Jason, Thanks for the clarification - that's an important point. I should have been more specific in my original post. Essentially, we have a number of SWFs created by FlashPaper. I'm loading those SWFs into a container movie clip. I then want to scale and center the container clip on the main stage. This requires that I know the width and height of the container. The problem is that the SWFs contain multiple frames, and the content in each frame varies in size. What I'd like to be able to do is this: container_mc.gotoAndStop(1); // this shows the first frame of the SWF var w = container_mc._width; var h = container_mc._height; // use w and h to scale and position container_mc When the user clicks Next: container_mc.gotoAndStop(2); // this shows the next frame of the SWF var w = container_mc._width; var h = container_mc._height; // use w and h to rescale and reposition container_mc The trouble is that container_mc._width container_mc._height always return the same value, even though the content on each frame LOOKS like it's a different size. It's as though FlashPaper adds a transparent background to each frame, which is why every frame returns the same size. Is this the case? If anyone with FlashPaper experience could shed some light, it'd be greatly appreciated. Cheers, Matt Stuehler On 4/18/07, Merrill, Jason [EMAIL PROTECTED] wrote: When you say frame - you need to think of that differently. A frame is not a physical object, but instead an instance of the stage being rendered in time (or something like that :) ) - check for the width and height of an object instance in that frame, like a background movieclip or something. Frames don't have heights and widths that I am aware of. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of matt stuehler Sent: Wednesday, April 18, 2007 10:11 AM To: Flashcoders mailing list Subject: [Flashcoders] Find size of the bounding box of a particular frame of a loaded SWF All, I'm working on an application that loads a variety of external SWFs. Once each SWF loads, if I test it's _height and _width properties, I get the height and width of the largest frame within that clip. However, what I'd like to get is the _height and _width of a particular frame. Is that possible? 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] Find size of the bounding box of a particular frame of a loaded SWF
Yeah - you'd have to know what the content instance name is in each frame in Flashpaper and get the Width and Height on that. But frames themselves don't have width or height. I've never used Flashpaper other than messing with it so I don't know anything about specific specs on what it's timeline looks like. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ 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] Find size of the bounding box of a particular frame of a loaded SWF
You might be able to loop through (each frame as it's presented) the Flashpaper's timeline movie clip object and look for instances of MovieClip and then get the collective width max and height max - that way, you wouldn't have to know how the Flashpaper timeline is set up. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of matt stuehler Sent: Wednesday, April 18, 2007 11:32 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Find size of the bounding box of a particular frame of a loaded SWF Jason, Thanks for the clarification - that's an important point. I should have been more specific in my original post. Essentially, we have a number of SWFs created by FlashPaper. I'm loading those SWFs into a container movie clip. I then want to scale and center the container clip on the main stage. This requires that I know the width and height of the container. The problem is that the SWFs contain multiple frames, and the content in each frame varies in size. What I'd like to be able to do is this: container_mc.gotoAndStop(1); // this shows the first frame of the SWF var w = container_mc._width; var h = container_mc._height; // use w and h to scale and position container_mc When the user clicks Next: container_mc.gotoAndStop(2); // this shows the next frame of the SWF var w = container_mc._width; var h = container_mc._height; // use w and h to rescale and reposition container_mc The trouble is that container_mc._width container_mc._height always return the same value, even though the content on each frame LOOKS like it's a different size. It's as though FlashPaper adds a transparent background to each frame, which is why every frame returns the same size. Is this the case? If anyone with FlashPaper experience could shed some light, it'd be greatly appreciated. Cheers, Matt Stuehler On 4/18/07, Merrill, Jason [EMAIL PROTECTED] wrote: When you say frame - you need to think of that differently. A frame is not a physical object, but instead an instance of the stage being rendered in time (or something like that :) ) - check for the width and height of an object instance in that frame, like a background movieclip or something. Frames don't have heights and widths that I am aware of. Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of matt stuehler Sent: Wednesday, April 18, 2007 10:11 AM To: Flashcoders mailing list Subject: [Flashcoders] Find size of the bounding box of a particular frame of a loaded SWF All, I'm working on an application that loads a variety of external SWFs. Once each SWF loads, if I test it's _height and _width properties, I get the height and width of the largest frame within that clip. However, what I'd like to get is the _height and _width of a particular frame. Is that possible? 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] Find size of the bounding box of a particular frame of a loaded SWF
Hi Matt, try to make a clip from each of your frames (ie frame1_mc, frame2_mc, etc.) then test the width of the specific frame/clip (var myWidth:Number = myLoadedClip.frame1_mc._width;) Gilles Le 18 avr. 07 à 16:10, matt stuehler a écrit : All, I'm working on an application that loads a variety of external SWFs. Once each SWF loads, if I test it's _height and _width properties, I get the height and width of the largest frame within that clip. However, what I'd like to get is the _height and _width of a particular frame. Is that possible? 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