Skip to main content
New Participant
December 18, 2010
Question

How to animate from a png tile based image file

  • December 18, 2010
  • 2 replies
  • 1491 views

Hi all,

I would like to know is there any way to animate from a tile based .png image file? I have multiple images in 1 png file having slight changes in each image, which if cropped and put into layers one over the other, will give the feel of animation or a character moving or walking etc...

I want to know can we do that kind of animation in flash as we do it in C++ or Java and how can we do it.

Any help will be highly appreciated.

Thank you

Shanz - Iceheros

This topic has been closed for replies.

2 replies

New Participant
December 21, 2010

I want to use action script to externally call/access  the png file with url request and url loader and animate the images from the tile based png image file.

Anybody know how to do this in flash with as3.

Here is the image for example:

i want to animate this images and call it externally and access each tile 1 after another.

Any Help???

Thanks,

Shanz - Iceheros

December 21, 2010

Yeah, you can do that. You use Loader to load an image though, not URLLoader. For animating from a sprite map like you show, you would use the copyPixels method of the BitmapData class, to copy a chunk from the map to an individual image displayed on the stage.

New Participant
December 23, 2010

Thank you dmennenoh,

i tried the copyPixels code.

but now i am not able to make the bitmap transparent.

a white background is visible where i have defined / created a rectangle.

do you know how i can get rid of it.

Thanks.

Shanz - Iceheros

Ned Murphy
Brainiac
December 18, 2010

If you place the tiles in sequential frames rather than one atop another, it should animate by itself.