Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to animate from a png tile based image file

New Here ,
Dec 17, 2010 Dec 17, 2010

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

TOPICS
ActionScript
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 18, 2010 Dec 18, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 21, 2010 Dec 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:

cattleSE.png

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

Any Help???

Thanks,

Shanz - Iceheros

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 21, 2010 Dec 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 22, 2010 Dec 22, 2010
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines