dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: I need help with sprites!!

Hybrid View

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Posts
    5

    I need help with sprites!!

    Ok, I've got all these sprites that I want to make into a movie clip, and I know how to do that. But there's a problem. When I cut the sprites out of the sprite sheet they all have a black background behind them. Is there an easy way to get rid of this background without having to manually erase it, because that would take so long and be extremely tedious and boring

  2. #2
    Junior Member
    Join Date
    Jun 2003
    Location
    California
    Posts
    19
    If the sprites are small 'pixellated' ones, like from a 8 or 16-bit game, this is what I do...

    Save all the different sprites as separate bitmaps, and name sucessive ones in order (walk1, walk2, walk3 etc.)

    Import the first one, flash will ask you if you want to import the rest in the sequence, hit yes.

    you will now have all the bitmaps in the library, as well as have them all in separate frames in the timeline.

    Go to each frame, select the picture, and go Modify > Trace Bitmap

    When you use trace bitmap, set the "Color Threshold" value to 0, which will keep the picture's color, and the "Minimum Area" value to 1 pixels. This will keep the colors where they are supposed to be, and not blur them (will keeep them square like pixels) Set the "Curve Fit" value to Pixels, and the "Corner Threshold" value to Many Corners. Hit enter.

    Flash will now convert the picture into a vector image, which is much smaller (filesize-wise). You can now delete the bitmap from the library...

    then click the background (it will select the entire color, which will be "shaded" with little dots), and press the delete key on your keyboard. That should do it, no more boxes around your sprites! you can select individual background-colored 'pixels' and delete them too, as they may be surrounded with other colors and therefore not be selected. this will make your sprite 'transparent' and the background will show through those little pixel holes...

    *Warning* if the sprites have a black outline to begin with and you put them on a black background, deleting the background will also delete the outline, as it will select the whole color... so if you have an 8-bit character with white pants and no outline, if you put him on a white background, import him, and trace bitmap and delete the background, he will have no legs, as they will be selected along with the background since they're the same color...

    Hope that answers your question! Thats the only way I know of to do it, another way is to import the whole spritesheet and delete the background, but if it's large your computer may choke up... so you'll have to do each separate image, sorry if it's tedious
    Ironclaw's movies r0x0rz all the oth3rz!! Anyone who says otherwise
    should be repeatedly poked wth sharp pointy sticks <http://ironclaw.cjb.net>

  3. #3
    Junior Member
    Join Date
    Jun 2003
    Location
    California
    Posts
    19
    Did that help?

    ...
    ...
    ...

    At all?

    Set this post as resolved if it did (at the bottom of the page)
    Ironclaw's movies r0x0rz all the oth3rz!! Anyone who says otherwise
    should be repeatedly poked wth sharp pointy sticks <http://ironclaw.cjb.net>

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