var s:Sprite = mysprite; s.graphics.lineStyle(1); s.graphics.drawRect(0,0,s.width, s.height)
that would work to get the bounds(rectangle) If you just want an outline of the actual sprite itself, you may consider using a 1pixel outer glow filter. On 9/14/07, Jon Bradley <[EMAIL PROTECTED]> wrote: > > > On Sep 14, 2007, at 12:32 PM, Troy Gilbert wrote: > > You're missing his point: he's got a shape (probably created in Flash) > exported as an SWF, but its just an outline, and he wants to fill it. > > The answer: sorry, can't do it. You can't modify vector information > exported out of Flash as an SWF. The vectors are all stored in MorphShapes > which cannot be created at the ActionScript level and are relatively opaque. > > > The only way you'd be able to do this would be to render the shape to a > bitmap then do a flood fill (and hope that your shape is closed). So, > something like this: > > > > > Or read in a shape as an SWF file and figure out where the shape data is > stored - parsing it out of a ByteArray. > > > I'm working on trying to figure that out right now. Taking some serious > diving in to the SWF spec to see how things are written into the file. It > *should* be entirely possible to regenerate saved vector data from an SWF > file (filling it back in once you have the path data). > > > If I have success with reading vector data out of an SWF then I'll be a > happy camper... > > > - j > > > -- Arpit Mathur Lead Software Engineer, Comcast Interactive Media --------------------------------------- post your flex tips on http://flextips.corank.com