Just a small hand here, the performance actually is quite ok on my pc? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christian Giordano Sent: donderdag 9 februari 2006 10:23 To: flashcoders Subject: [Flashcoders] 32bit gradient mask performances
Hi guys, I recently wrote a class to handle this kind of effects in animation context, so applied to movieclips NOT bitmaps, but when the masks I handle start to be bigger the performance sucks. It's obvious but I'm just wondering if there is a better way that the one I'm using. Here my procedure: - draw with draw api a gradient fill in a movieclip (mask_mc), 0x00ffffff to 0xffffffff - create a new BitmapData (mask_bd) to copy the content of the gradient mask - draw mask_mc in mask_bd - create a new BitmapData (image_bd) to contain the movieclip to be masked - draw the movieclip in image_bd - create a new BitmapData (picture_bd) to contain the final result - copy image_bd to picture_bd using mask_bd as mask Of course doing this operation every frame with large images sucks, is there a way to skip some steps? Here the actual result: http://nuthinking.com/f8/gradient_mask.html thanks a lot, chr -- ___________________________________________________________________ { Christian Giordano's site and blog @ http://cgws.nuthinking.com } _______________________________________________ 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