onPress only non-transparent area in PNG movieclip?
Is this possible? I have an irregular shape png with transparency contained in a movieclip, but when i use onPress on the movieclip it presses the whole bounding box.
ActionScript Code:
pngMC.onPress = function() {
Is there any way to make it only fire when it presses the non-transparent area of the PNG?
You have to go inside your movieclip or button, then select your PNG, press Cntrl + B to Break apart your PNG and convert it to editable bitmap, and then with the Eraser Tool, remove all the white/transparent leftovers outside your png's boundaries.
You might find it easier to use magic wand tool to do this, but this only good if you have static image from library, no good if you import dynamic image and stuff, then you need use things like getPixel(x,y) and BitmapData. many tutories on web