Re: [Flashcoders] using Bitmap for hitArea
Thanks Leandro. I took an initial look at this, but got scared off by the fact that this is going to make mouseUp/Down/Enter/Leave and click detection really complicated, much more complicated than anything I've ever had to deal with before. There will be follow-up questions, but first I need to start a new thread. Leandro Ferreira wrote: BitmapData.hitTest: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=1410.html Leandro Ferreira On Mon, Jun 22, 2009 at 19:21, Andrew Sinning wrote: If I draw a circle using the Graphics and Shape classes, and then add the shape to a sprite, I can use the sprite for the hitArea of another sprite and it works just fine. Everything within the circle is a hit, everything outside of it is a miss. However, if I create a sprite containing a Bitmap drawn from this same circle and try to use this sprite for the hitArea, the entire rectangle becomes the hit area. I've played around with different alpha-levels, using white and black, and using the opaqueBackground setting. Nothing seems to work. Am i missing something or is this a known limitation? I'm using AS3 under Flash CS3. Thanks! ___ 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
Re: [Flashcoders] using Bitmap for hitArea
BitmapData.hitTest: http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=1410.html Leandro Ferreira On Mon, Jun 22, 2009 at 19:21, Andrew Sinning wrote: > If I draw a circle using the Graphics and Shape classes, and then add the > shape to a sprite, I can use the sprite for the hitArea of another sprite > and it works just fine. Everything within the circle is a hit, everything > outside of it is a miss. > > However, if I create a sprite containing a Bitmap drawn from this same > circle and try to use this sprite for the hitArea, the entire rectangle > becomes the hit area. I've played around with different alpha-levels, using > white and black, and using the opaqueBackground setting. Nothing seems to > work. Am i missing something or is this a known limitation? > > I'm using AS3 under Flash CS3. > > Thanks! > ___ > 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] using Bitmap for hitArea
If I draw a circle using the Graphics and Shape classes, and then add the shape to a sprite, I can use the sprite for the hitArea of another sprite and it works just fine. Everything within the circle is a hit, everything outside of it is a miss. However, if I create a sprite containing a Bitmap drawn from this same circle and try to use this sprite for the hitArea, the entire rectangle becomes the hit area. I've played around with different alpha-levels, using white and black, and using the opaqueBackground setting. Nothing seems to work. Am i missing something or is this a known limitation? I'm using AS3 under Flash CS3. Thanks! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders