How to hitTestPoint with a transparent PNG?

I got a png picture in my library. It contains transparent background.
I create a MovieClip symbol with that png. (Called collisions)
I try:
collisions.hitTestPoint(player.x, player.y, true);
And it returns true even when player only touches the transparent background.
If I do the exact same thing but instead of my png picture, I put a irregular shape form, it works as usually, the transparent background not been counted.
How can I fix that?
Thanks.

convert the bitmap to a vector (select it on-stage, click modify>bitmap>trace bitmap and remove the background).

Similar Messages

  • Bug when saving transparent png

    I just saved a few pngs with transparent backgrounds and somehow the icons for those new images are being merged or overlaid with previously saved jpgs in my photo stream. When I open them, I see the picture I expect so there's no damage occurring, just funky icons. When I viewed the same images from the photo stream on my iPhone 4 and AppleTV2, the same behavior occurred with those transparent png files as well.

    Hi Ignacio,
    Well I sort of owe you guys an apology as it appears to be an iPad/iOS issue actually. Apparently I've never tried sending a transparent png to either my iPhone or iPad until learning/using Photoshop Touch (which I'm really enjoying btw).
    But to answer your questions anyway, I was opening them on my iPad/iPhone in the Photos app and on my AppleTV in the Photostream there.
    I made a quick transparent png from my Photoshop CS3 as well as downloading one from a Google search, all which had the same overlapping results.
    I grabbed a screen shot for you, and blurred out the icons of images I think you'd rather not see  ;-). Weird thing though too, which also points to this being an Apple issue, is that by accident, my first image, I saved as a png but with the background layer unlocked (being layer zero) and when I dragged it into this email, it overlaid the picture over the body of the email so that the black areas where transparent. So I dragged it out, resaved as a jpg but now I can't repeat the problem with the png, as I was going to create a screen shot of that for you as well. Either way, the icons on my desktop behave as normal and the images all open as normal. They all just get goofed up when displaying them in iOS as icons before actually opening the pictures.
    So in this capture, there are six images with overlapping icons where the intended transparent png is on top of some random image pulled from the photostream.
    Thanks again,
    Eric

  • How do I import animated gifs into Premiere with a transparent background?

    I have an animated gif that I got from the internet, and I'm trying to import it into Premiere Pro with a transparent background. The gif is of a video game character standing still and blinking. Whenever I import it, it always has a white background, so I need help on how to change that.
    I've gone into Photoshop and removed the white background frame by frame, making it transparent. I do this by using the magic wand tool to select the white background, then hit "delete" to turn it into that diamond grid, which means it's transparent. I then select File -> Save for Web. I preview every frame, and it shows that the backgrounds are transparent. I save it as a gif. But when I import it into Premiere Pro, the white background is still there.
    I've read many forums online about people trying to import images into Premiere Pro with a transparent background, but none of them have explained how to do it specifically for animated gifs. Every answer has always been "export the image as a png, that'll work", and sure enough, I exported a few frames of the gif as pngs, and those few frames had transparent backgrounds in Premiere Pro. But I don't want a png because those aren't animated sequences, those can only be still images. I need to export it as a gif so that it will remain animated, but gif files always have that dreaded white background in Premiere Pro.
    I suppose I could export every frame as a png, import each of those frames into Premiere Pro, then string all the frames together and tweak them so they'll be functionally identical to the animated gif, but that would take forever. I'm making a video project and I need numerous animated gifs to work with, so I don't want to do that with every single one of them. I'm looking for a way to simply import the gifs into Premiere Pro and be done with it. If there is any way to do this, please help me.
    -Robert

    faind on gif transparency and other cartoon animation problems : Adobe After Effects
    " The reason: GIFs don't support alpha channels. Instead, their file structure assigns a certain color value to be read as totally transparent. There aren't any degrees of transparency as you find in graphics formats that do support alpha channels.
    To use an animated gif in AE, you'd first have to create the areas of transparency, then convert the series of images into a graphics format that supports alpha channels, and there are a bunch: PICT, TIFF, TARGA or PNG, to name a few."

  • Opening Fireworks PNG-8s with alpha transparancy

    Hi all,
    I have to do some work on some files I didn't create -- a couple hundred png files. They are 8-bit, indexed files, but when viewed on the web they have 256 levels of alpha transparency. When opened in Photoshop, they have only one level of alpha transparency :(
    Turns out these are in some proprietary Fireworks format ... anyone have any ideas how I can get these into Photoshop without losing my alpha channel, hopefully without having to BUY Fireworks ... oh how I miss ImageReady ;)
    Thanks in advance.

    Photoshop doesn't work with continuous transparency in indexed color mode, only one transparent value is allowed. (ImageReady wouldn't do it, either)
    You may need to use another application to convert them to a normal RGB image with transparency.

  • How to fix black borders around transparent PNG files?

    Hello,
    Recently, iMovie has started putting black borders around transparent PNGs. How can I fix this?
    http://img19.imageshack.us/img19/4668/picture9bt.png

    gndagnor wrote:
    Any way to fix the alpha transparency when importing PNG files to iMovie 09?
    I just know the two options - wrong (8bit) png or that plugin, which in an older version destroyed transparency..
    what also make transparent-to-black is, when you 'manipulate' the imported png, esp. adding a *KenBurns Effect* - that kills transparency instantly.
    for test purposes:
    • create a new project
    • create a new png with some traansparency
    • add new png to new project - same result?
    and just to avoid EVERY problem: your sys preferences/Monitor is set to 'million colors'?

  • How to batch convert psd to png with layers

    how to batch convert psd to png with layers
    i want to convert lots of PSD files into PNGs WHILE RETAINING
    LAYERS!
    simply batching and choosing custom setting flattens the
    thing.
    how do i do that!??
    and i KNOW it can be done somehow - because i have some old
    png's i KNOW come from the same psd source. ironic, isn't it?
    besides - feature wish for adobe developers:
    A) batch conversion should include 300dpi to 72dpi and vise
    versa.
    B) batch conversion should include PSD to PNG and vice versa
    - including layers and transparency.
    C) RGB to CMYK option when converting from 72 dpi to 300dpi.
    D) batch exporting should include PNG32 which it doesnt now -
    but somehow DOES include the outdated and stupid gif-format.
    E) i'd like the Actions feature of photoshop - makes batching
    complicated procedures easly.
    F) I'd like support for the brushes of photoshop
    G) Better selecting tools for details like hair and fine
    edges.
    Important notes is that i as webdesigner often need to make
    certain aspects of my clients graphics into print material. Also
    that i use fireworks for picture editing.
    Praise for the developers of fireworks
    A) the compression facility of JPGs is AWESOME!
    B) PNG as fileformat is likewise awesome - i end up using it
    for almost all i do these days. Transparency and good file sizes. I
    have used fireworks cs3 to convert all psd and tiff and ai files to
    PNG.
    C) the vectors and styles and method of selecting and editing
    things in fireworks is FAR SUPERIOR to flash and photoshop!

    senocular wrote:
    > Save the following code in a .jsf file and run it in a
    batch. It will save
    > your batched PSDs in their original location as PNGs
    (using the same file name
    > with .png tacked on the end). You'll probably need to
    save the file in your
    > Fireworks/Configuration/Commands directory to allow the
    batch to pick it up.
    > Note that any save location you specify in the batch
    will be irrelevant. This
    > code just saves the files in their original location.
    >
    >
    >
    > var dom = fw.getDocumentDOM();
    > fw.saveDocumentCopyAs(dom,
    dom.filePathForRevert+".png");
    >
    Thanks Trevor!
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    Adobe Community Expert
    http://tinyurl.com/2a7dyp
    See my work on Flickr
    http://www.flickr.com/photos/jim_babbage/

  • Taking the transparent png files from net into Photoshop. It coming as flat not transparent. How can i do ?

    Hi,
    i want to take some transparent png files from internet into photoshop. The files originally transpernt on internet.
    Im copying that image and paste into photoshop but it won't transparent. therefore im saving the files my mac and using like that.
    But i dont want do this. Because this isn't problem in illustrator. Can anybody help me how can i use transparent png files as transparent in photoshop without save file?
    hope could explain my problem.

    If you can right click on the image and copy its utl to the clipboard you may ne able to open that in Photoshop with this old  Photoshop script.
    // OpenImageFromWeb.jsx
    // Copyright 2006-2009
    // Written by Jeffrey Tranberry
    // Photoshop for Geeks Version 3.0
    // modified by MLH
    // modified by JJMACK 2010
    Description:
    This sample script shows how to download images from a web server using the
    Socket object.
    // Note: Socket.read() parameter & behavior
    // Socket.read() will read or time out. It may not read all data fromserver. <---------------
    // Socket.read(999999) will read 999999 bytes, or timeout, or socket will be
    // closed by the server.
    // enable double clicking from the
    // Macintosh Finder or the Windows Explorer
    #target photoshop
    // Make Photoshop the frontmost application
    app.bringToFront();
    // SETUP
    var html = "";
    var request = "";
    var url = "";
    var binary = "";
    var requesthtml = "";
    var socket = new Socket;
    var domain = "www.mouseprints.net" // the domain for the file we want
    var sImg = "/old/dpr/JJMack8btiSrgb.png"; // the rest of the url for the file we want
    var port = ":80"; // the port for the file we want
    // MAIN
    var url = prompt("Enter the image's full URL http://domain/full image path",url);   // prompt for domain name
    if (url != null && url != ""){
      if ( (url.indexOf("http://") != -1)  || (url.indexOf("HTTP://") != -1)  ) {
      domainPathLength = url.length - "http://".length;
      domainPath = url.substr(7, domainPathLength);
      pathOffset = domainPath.indexOf("/");
      domain = domainPath.substr(0, pathOffset);
      sImg = domainPath.substr(pathOffset, domainPath.length - pathOffset );
      // Isolate Image name
      var Name =  sImg
      var imagePath = "";
      while (Name.indexOf("/") != -1 ) { // Strip Path
      imagePath= imagePath + Name.substr(0, Name.indexOf("/") + 1);
      Name = Name.substr(Name.indexOf("/") + 1 ,);
      //alert("domain = " +  domain + " , Image = " + sImg + " Image File Name = " + Name);
      if ( domain != "" && sImg != "" && sImg != "/" && Name.indexOf(".") != -1 ) {
      var f = File("~/" + Name); // Image file name
      f.encoding = "binary"; // set binary mode
      f.open("w");
      if (socket.open(domain + port, "binary")){
      //alert("GET " + sImg +" HTTP/1.0\n\n");
      requesthtml ="\n\nDmain:" + domain + " Port" + port + " binary\n"
      //request ="GET " + sImg +" HTTP/1.0\n\n"
      request ="GET " + sImg +" HTTP/1.0\nHost: " + domain + "\nAccept: image/gif, image/x-xbitmap, image/png, image/jpeg, */*\n\n";
      socket.write(request); // get the file
      var binary = socket.read(99999999);
      binary = removeHeaders(binary);
      f.write(binary);
      socket.close();
      else { alert("Connection to Domain:" + domain + " Port" + port + " Failed   ");}
      f.close();
      if (binary.length != 0) {
      //alert ("file length = " + binary.length );
      if(app.documents.length == 0) {
      //app.documents.add([width] [, height] [, resolution] [, name] [, mode] [, initialFill] [,pixelAspectRatio] [, bitsPerChannel] [,colorProfileName])
      app.documents.add(new UnitValue(1600,'px'), new UnitValue(1200,'px'), 72, null, NewDocumentMode.RGB, DocumentFill.WHITE, 1,BitsPerChannelType.EIGHT, "sRGB IEC61966-2.1" );
      placeSmartObject( f );
      f.remove(); // Remove temporary downloaded files
      else { alert("Invalid Image URL: " + url ); }
      else { alert("Invalid URL: " + url ); }
    else { if ( url == "" ) alert("No URL Entered"); }
    // FUNCTIONS
    function placeSmartObject(fileRef){
      //create a new smart object  layer using a file
      try {
      var desc = new ActionDescriptor();
      desc.putPath( charIDToTypeID( "null" ), new File( fileRef ) );
      desc.putEnumerated( charIDToTypeID( "FTcs" ), charIDToTypeID( "QCSt" ),charIDToTypeID( "Qcsa" ));
      desc.putUnitDouble( charIDToTypeID( "Wdth" ),charIDToTypeID( "#Prc" ), 100 );
      desc.putUnitDouble( charIDToTypeID( "Hght" ), charIDToTypeID( "#Prc" ), 100 );
      desc.putUnitDouble( charIDToTypeID( "Angl" ), charIDToTypeID( "#Ang" ), 0 );
      desc.putBoolean( charIDToTypeID( "Lnkd" ), true );
      executeAction( charIDToTypeID( "Plc " ), desc, DialogModes.NO );
      activeDocument.activeLayer.resize(100 ,100,AnchorPosition.MIDDLECENTER);
      activeDocument.revealAll();
      } catch (e) { alert("Placeing file: '" + fileRef + "' failed"); }
    // Remove header lines from HTTP response
    function removeHeaders(binary){
      var bContinue = true ; // flag for finding end of header
      var line = "";
      var httpheader = "";
      var nFirst = 0;
      var count = 0;
      while (bContinue) {
      line = getLine(binary) ; // each header line
      httpheader = httpheader + line;
      bContinue = line.length >= 2 ; // blank header == end of header
      nFirst = line.length + 1 ;
      binary = binary.substr(nFirst) ;
      if (httpheader.indexOf("Bad Request") != -1 || httpheader.indexOf("Not Found") != -1) {
      alert (requesthtml + request + httpheader);
      var binary = "";
      //alert (requesthtml + request + httpheader + "\nFile length = " + binary.length);
      return binary;
    // Get a response line from the HTML
    function getLine(html){
      var line = "" ;
      for (var i = 0; html.charCodeAt(i) != 10; i++){ // finding line end
      line += html[i] ;
      return line ;

  • GURU question - Creating a PNG with photographic (transparent) reflection

    I'm trying to create a PNG file that maintains its reflection which was captured in-camera. The end result would be that the PNG could be used over any colored background (easy for the object) and the reflection takes on the color of the background (not easy to achieve if you can't multiply the reflection over a colored background).
    The image was shot on a white background but needs to be able to fall on any color. It would be easy to use the path around the object to isolate the background to a new layer and simply set the layer to Multiply. I realize that, but these PNG files could end up being used by anyone, and they may not have Photoshop, but rather - Powerpoint. :-/
    I've developed a process that does this to a degre, but I end up with a white halo around the feathered edges of the reflection (not shown in the example above - see below).
    In the shot above, I've split the (very subtle) reflection in a layer set to Multiply, seen to the upper left along the edge. To the lower right is the same reflection with a white hazy halo bleeding into the feathered edge, and this was generated using the process below. Remember, everything is shot on a white background so the reflection has white feathered into it. I'm like this close to desirable results, but the haze has me stumped.
    Here's how I got the right side to be transparent without using Multiply, and saving as PNG. Anyone who opens the file should be able to place it over any color background, supplied to them in PNG format.
    1. Using high res JPG image, convert "Background" to Layer 0.
    2. Activate Path 1 as selection, invert selection and copy all area around product. Paste that copy to new layer.
    3. Using same selection, delete all area around product in Layer 0. Now the product is on a separate layer from the shadow and reflection.
    4. Duplicate reflection layer and invert. Turn off all other layers. Go to Channels pane, select Blue channel - Command-click channel - Copy.
    5. Return to Layers pane and add layer mask to reflection layer. Delete duplicate layer from step 4.
    6. Go to Mask pane (CS5) or Properties (CS6) and click on Mask Edge. Slide the Shift Edge parameter to +100.
    7. Run Levels on reflection layer - set the Input mid to .96 and set highlight Output Level to 250.
    8. Select background image area using mask - subtract subject from selection using path and run Exposure on reflection layer from menu command: Image/Adjust/Exposure: -0.24, -0.15, 0.70. (Using an adjustment layer for Exposure will not work. It saves to PNG with a different outcome when reopened - thanks Adobe!)
    9. Set reflection layer opacity to 60%.
    So - if anyone has any constructive input to tackle this haze issue, I'd really appreciate hearing from you. It's just about there, but not quite acceptable yet. Hoefully, my explanation is clear and easily understood.
    Thanks very much in advance!

    It was difficult, but I believe I've reached Photoshop nirvana. I have the file split in half with the left side multiplying and the right side following the process I've just finished creating. The match is dead nuts, left to right. I now have a transparent PNG with shadows and reflections that will behave in the same manner as a multiplied image, over colored backgrounds.
    Experienced PS users should be able to follow these notes, which are a modified version of what's in the OP:
    Method for Creating Transparent Photographic Reflections
    (Uses the reflection as captured in-camera - not manufactured flip reflections)
    This process begins with a high resolution JPG that already has the subject outlined with a path.
    1. Using HR JPG image, convert "Background" to Layer 0.
    2. Activate Path 1 as selection, invert selection and copy all area around product. Paste that copy to new layer.
    3. Using same selection, delete all area around product in Layer 0. Now the product is on a separate layer from the shadow and reflection.
    4. Duplicate reflection layer and invert. Turn off all other layers. Go to Channels pane, select Blue channel - Command-click channel - Copy.
    5. Return to Layers pane and add layer mask to reflection layer. Delete duplicate layer from step 4.
    6. Go to Mask pane and click on Mask Edge. Slide the Shift Edge parameter to +100.
    7. Run Levels on reflection layer - set the Input mid to .96 and set highlight Output Level to 250.
    8. Select background image area using mask - subtract subject from selection using path and run Exposure on reflection layer from menu command: Image/Adjust/Exposure: -0.95, -0.004, 1.49.
    9. Refine edge of mask - Shift Edge: -47
    10. Run levels on reflection image: Mid - 0.45
    11. Refine mask again - Shift Edge: -18
    12. Duplicate layer and refine mask to: Contrast 25, Shift -40. Change layer opacity to 25%
    13. Save PNG version.
    I'd like to thank those who contributed input to this thread!

  • How Can I make A transparent Pdf with Indesign

    Hello,
    I Have a Document in Indesing.File is a Psd document and doesn't have background. I make some designs with this file in indesign then again I want to use it in photoshop, but when I make it PDF (x3/2002) and open in photoshop white background is comming.
    Do you Have any idea fot How Can i use İndesign pdf document in photoshop without background?

    I've never seen a PDF exported from ID that didn't open with a transparent background in Photoshop unless there actually was some sort of fill. Are you sure you have used a paper-filled frame?

  • How do I export a keynote slide to pdf with a transparent background?

    I use Keynote for creating figures for a report I'm currently writing and layouting in Adobe InDesign.
    Unfortunately I have run in to a quite annoying problem.
    Because of the page-layout and background graphics in my main report, I need to be able to export the figures without the white background which comes as standard. I tried to remove the background in "Master & layout" (my Keynote is in Danish, not sure if it's called the same in English), which is suggested to bring background transparency when exporting to Quicktime movies. I doesn't seem to have any effect when exporting to pdf though.
    When importing the pdf's into InDesign the figures comes up with a white background instead of the wanted transparent.
    My choice of pdf over png is because of the vector graphics.
    Is it possible to export to pdf's with a transparent background?

    One option would be to export the slides as image files and bring them in Pages in that format.
    From the top menu bar:
    Share > Export > Images

  • How to Export with Transparent Background

    I have created a logo in Freehand 10, and I need to export it
    as an EPS with a transparent background to place in an InDesign
    document. How do I export the file with a transparent background?
    Thanks!
    -Elisha

    > Please excuse my lack of experience, but can you please
    explain what you mean
    > by "without screen image"?
    In general contents of eps files (encapsulated postscript)
    cannot be viewed with layout programs and alike. Therefore a screen
    image must be included for placing. When the document is printed to
    a postscript printer or exported as pdf the screen image is omitted
    and the postscript code is used. In this case it is not 'What you
    see is what you get' but "What you get is what you can't see'.
    In Windows the screen image has always been a opaque bitmap
    image but in mac screen image can be 'clipped'. In both platforms,
    however, the postscript output is the same i.e. without background.
    > I did try exporting as Illustrator 7, but it only came
    in as a grey box in
    > InDesign. I'm waiting on approval to purchase the
    upgrade to Illustrator CS3.
    I'm not sure if InDesign CS2 can show contents of eps files,
    both Mac and Windows. I just tried exporting eps and ai from
    FreeHand and they worked well in Windows InDesign CS3.
    Usually eps file without screen image appear as white box and
    all the images as grey boxes if Disply Performance is set to Fast
    Disply in InDesign. So check InDesign display settings.
    Also try to export eps with a screen image.
    If the logo is simple with just outline objects it can be
    copypasted into InDesign as well. In FreeHand 'copy special' and
    select the clipboard format.
    Jukka

  • How to save a clip with a transparent background?

    How do i save a clip with a transparent background to export to quicktime and then be able to import it back into my timeline and have it be able to overlay ontop of another clip? Transparent clip is for lower third

    For transparency to work, you need to save it in a format that has an alpha channel. Not sure if FCE supports the Animation codec but if it does you'll want your material as "millions of colors +". The "+" means Alpha.
    x

  • How do I paste transparent png's

    If I copy a transparent PNG image from any web browser on a mac, I can paste said image into illustrator without it losing its transparency, while trying the same on my PC results in the transparent areas of the image turning black... How does one avoid this?
    (running illustrator CC 2014)

    Are forum users usually this bitter? I really don't understand how using this workflow would be stupid, as you so eloquently put it. You don't know what I'm working on nor how, and it does surprise me that you don't see how it could be time saving... But I don't really mean to discuss process quality or speeds.
    Anyone else? If I can do it on a mac, I should be able to do it on a pc as well!

  • How can I save file in Photoshop with an transparent background as an eps

    I can save a file with a transparent background as an png and place it in a document and retain the transparent background. But my client requires eps file. Any suggestion would be appreciated.

    You could add a clipping path - look in the Paths panel menu.

  • Transparency not working on smartshape button filled with transparent (PNG) image.

    I'm using Captivate 8 and have had no problems so far importing PNG images with transparent backgrounds.....that is until I try and make a smartshape button and import a transparent PNG image as the background.
    It displays fine on screen, but whenever I preview it or publish, the white background of the image/button displays. Is this a known Captivate 8 limitation?
    Sorry if this is a repeated question....I've tried trawling through the forums and all I can see is to try different file formats for the images, such as GIF or BMP, which I've tried and nothing works.
    Any advice or suggestions?

    If it is a button, what is inserted for Rollover and Down state? I just recreated a shape button, with three different images for the states. All are in one PS-file as layers which I imported into Captivate. I kept Stretched checked in this case, because I know there is sometimes a slight change in size between states. Here are screenshots of Up, Rollover and Down state. The stroke was set to 0 for the shape, but to prevent all color contamination I also set stroke to the color of the background (light grey). In the first (Up) image you can clearly see where the stroke is due to truncation of the Question mark.
    Seems only possibility is in the creation of the PNG's? What was your work flow?

Maybe you are looking for

  • Please help me to build this query

    hi, i have two tables a and b. i am inserting data into table a. i am inserting same data into table b. but i need to eleminate any duplicate rows in table b. this work should be done using trigger. means we need to write on insert trigger while inse

  • Doubt in Cash flow Statement Query

    Hi all,     In FI module i am trying to create query 'Cash flow statement' using infocube 0figl_c01. For 'cash inflow' i restricted to debit postings for G/L account char. with two account number (200602 & 200611 as given by finance dept.) But the va

  • IPhoto '11 - Create album of photos NOT in any Smart Album

    I've searched these forums and couldn't find anything to help me out.  I'm using iPhoto '11, and have converted all my albums to smart albums, primarily using keywords.  In my old scenario, using albums, I could create a "to file" album of photos tha

  • Photoshop .jpgs not opening in InDesign

    I'm trying to place a .jpg into an InDesign frame but keep getting this message: either files does not exist, you do not have permission, or the file may be in use by another application. The file is on the computer, I can open it in PS and I've rebo

  • App Store Download pause and resume problem in MAC OS lion

    Hello, I am facing a problem in App Store Download pause and resume problem in MAC OS lion. My internet connection has a problem of disconnecting frequently because of this App store can not complete a download as its resuming download from the begin