Skip to main content
Participant
February 24, 2011
Question

How to remove flickering in a animation done by loading different image files

  • February 24, 2011
  • 2 replies
  • 1265 views

Hello Everyone,

I have done a character animation by loading multiple images one after another at runtime or dynamically by accessing files from there path directly.

But the problem I am facing is, I am getting a white bg or delay when the images change, it kind of feels like the images are flickering. How can I get rid of this flicker.

Thank you.

Iceheros

This topic has been closed for replies.

2 replies

Participant
March 4, 2011

I am using a timer to change the images that are loader through the loader().

Can I use something else other than the timer to load the images at a progressive succession

Enter frame or any other way to remove the flickering of the images.

All my images are local in a folder.

Thanks

Iceheros

Inspiring
February 24, 2011

When loading images from a server during runtime you can never be sure that there will be no delay.

What you could do is write a function, that checks with a progress Event how much of the next picture is loaded and base the percentage of the current pictures alpha channel on this figure.

Say the progressEvent from your Loader returns a number like 0.1....1.0 (10%...100% of the next picture are loaded)

Then in an eneterframe you could use that number to modify the current Pictures alpha (like img.alpha = 1.0- progress);

A clear disadvantage is, that the tweens will always be different (depending on picture size/network traffic)

Kenneth Kawamoto
Community Expert
Community Expert
February 24, 2011

That may be just too much for Flash to handle. The only way is to download everything first before playing them back, but an "animation" means at least 10 - 15fps, I don't think Flash can show succession of bitmaps that fast for a very long time.

You can generate a movie file from a series of images in the server and it may be a better option.