I\'m beginner in Cocos2d. I have a sprite, and I want to ignore touch on transparent area of that sprite.
I\'m aware of this answer Cocos2d 2.0 - Ignoring touches to
This answer is more diffuse than you might expect, as I will not give you a code example, but this is how I'd implement this:
You have the location of the sprite's bounding box (corner of the sprite, including the transparency area if applicable), and the position of the touch on screen. Using this information, you can work out the location of the touch inside of the sprite. In other words, you can find the pixel touched, independant of the game screen.
Now that you have that pixel location (x and y), open the image (presumably a PNG), and get the RGB[A] value for that pixel. Each PNG has a transparency key. This is the alpha channel If the interior-pixel colour of the PNG at (x;y) == transparency key then that pixel is transparent
If you can get the alpha value for the pixel in question, if it is equal to 0 then the pixel is transparent.
edit: semantics ("alpha channel")