> I want to be able to get the width and height of the visible area in > ActionScript. Is this possible? The fact that the Player "knows" there is a > mask and correctly hides the outer parts indicates that it should have that > information somewhere.
Have you tried the width and height of the mask instead? (The flash.display.DisplayObject.mask property.) Mark On Sat, Jun 28, 2008 at 11:56 AM, Arka Roy <[EMAIL PROTECTED]> wrote: > Hi, > > My first post. > > I'm a newbie at Flash but was a game programmer (C/C++) for a long time. I'm > finding Flash to be highly quirky and very interesting. > > I have a question about images imported from Illustrator CS3 with masks. > > These images have artifacts outside of their visible area. > For example, it can have a picture of a dog's face, but one of the > long ears is off to the side, outside the visible region of the piece. We > cannot crop the piece for our own reasons, but the mask makes it such that > the ear sticking out is invisible in > Flash, when we turn it into a movie clip. Also, the Info panel in the Flash > IDE correctly shows the width and height of the visible area ONLY. > > However, in ActionScript when I try to get the width and height using the > DisplayObject width and height properties it returns the dimensions of the > entire image including the hidden portions. > > You can see them here: > > Visible area only > http://arkaroy.e3b.org/scraps/piece.jpg > > > Entire image with visible area masked in red > http://arkaroy.e3b.org/scraps/mask.jpg > > > I want to be able to get the width and height of the visible area in > ActionScript. Is this possible? The fact that the Player "knows" there is a > mask and correctly hides the outer parts indicates that it should have that > information somewhere. > > By the way, all mention of dimensions I've made here pertains to bounding > boxes. > > Thanks, > Arka Roy > > > > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

