Flash8 onPress only non-transparent area in PNG movieclip?
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: onPress only non-transparent area in PNG movieclip?

  1. #1
    Member
    Join Date
    Oct 2008
    Posts
    37

    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.

  2. #2
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    946
    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.
    Hi Object, Listen, i wish to return you something, but only if what you are saying is true, else, forget it, ROLL_OVER the floor, i will check for someone else at the stage, while eating a no.visible cookie.

  3. #3
    Member
    Join Date
    Aug 2012
    Posts
    52
    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
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com