Okay, some more problems:
First one is the combining arrow keys, like pressing down and right moves diagonally right. I tried this:
else if (Key.isDown(Key.DOWN)) && (Key.isDown(Key.RIGHT))
{ _y -= -3; }
or this:
else if ((Key.isDown(Key.DOWN)) && (Key.isDown(Key.RIGHT)))
{ _y -= -3; }
and replaced && with and. Either it doesn't work, or there's an error.
==========
Another one: how do I compare values of x,y coordinates? I'm making Simba bounce back when hit by that ball. Like something this:
If ballX >= SimbaX then Simba X -= 10
end if
If ballX <= SimbaX then SimbaX -= -10
end if
(kinda like a VB condition)
I've been trying, but I can't.
======
Last one.
How to get values from dynamic text?
I want to put a life bar that represents Simba's overall health percentage. I got the idea from the preloader, but it doesn't work. I created frame 'actions', then put this code:
getPercent = Math.round(number(_root.life)/100);
this.lifebar._width = getPercent*100;
Doesn't work. I'm sure I put var name for the dynamic text as 'lifebar', but doesn't work.
Umm... if you have a little more time, how to compare values from two dynamic text?
Thanks!