Hi,
i’ve got a problem with smooth and clear animation in Flash. I had some experience in making websites and static games and I decided to make a platform game.
Here is my problem:
http://formax.ndl.pl/Strzelanka.html (1 mb)
There is no loader so you have to wait patiently
It’s just an example to show the problem.
onClipEvent (enterFrame)
{
//_parent.ekran._y=_parent.ekran._y+6;
if (Key.isDown(Key.DOWN))//uzyj przedmiotu
{
_parent.ekran._y=_parent.ekran._y-2;
}
else
if (Key.isDown(Key.UP))//uzyj przedmiotu
{
_parent.ekran._y=_parent.ekran._y+2;
}
if (Key.isDown(Key.LEFT))//uzyj przedmiotu
{
_parent.pod._x=_parent.pod._x-5;
}
else
if (Key.isDown(Key.RIGHT))//uzyj przedmiotu
{
_parent.pod._x=_parent.pod._x+5;
}
}
Try to move the plane forward using up arrow.
The problem is that backround is flickering. There are some strange mistakes and i can’t solve it anyway. If the resolution is small you wont realized but in 800x600 or higher it’s really frustraiting.
There’s a list of things i’ve tried:
-increase frames per sec
-using setInterval
-creating two backgrounds. Moving one and changing depths/visibilites. (buffer method)
-using smaller file as a background (even 100x100)
All this metods dosen’t work. The best results you can get when you increase frames to 120 and move background just 1 pixel at once. But it’s not perfect anyway.
I’ve tried to search through internet and i’ve found some people had the same problem but no one have solve it.
Help me please I’m desperate