How to make image fade in and out in a loop?
Ive got this image and i set its alpha to 1. So if its at 1 then it fades out and then it fades back in again and then out and so on.
Hurt.alpha -= 0.01;
if ( (Hurt.y < 0 ) && (Hurt.x < 0 ) )
{
Hurt.alpha -= 0.03;
Hurt.alpha -= 0.03;
if ( (Hurt.y < 0 ) && (Hurt.x < 0 ) )
{
Hurt.alpha += 0.03;
}
}
im not sure but the part where it fades out works but doesnt fade back in again.
Some help
using Flashdevelop with starling
