-
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?
thanks.
-
Designer, Programmer, Musician
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.
Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|