Moveing with KEYS

You seem to like the tertiary operator, Lost, but here it’s not really useful as you don’t do anything when the condition is false.

Key.isDown(Key.LEFT) ? yourClip.easeTo(slideSpeed, 0) : null;

longer than

if (Key.isDown(Key.LEFT)) yourClip.easeTo(slideSpeed, 0);

:stuck_out_tongue:

I got used to that method of if statement with Javascript, so I tend to use it a lot in Flash (I am so happy it works).

The problem with
[AS]if (Key.isDown(Key.LEFT)) yourClip.easeTo(slideSpeed, 0);[/AS]

Is that I tend to hit the code auto-format button a lot on the actions panel. And when I do that, it automatically puts the curly brackets in, and spaces it just the way the if statement should be, so it beings to make me angry, so I would rather just null out the else.

I didn’t even know there was an auto-format button :-\

Yep, its in the actions panel, it looks like rows of text with a white white faded background on the top half and no background on the bottom half.

Right next to the checkmark for Check Syntax.

Therse also Find, Replace, and Insert Target Path, and Show Code Hint.

I rarely use any of them, except sometimes I use the auto-format JUST IN CASE, but I am usually good with that.

so… to continue this i need to make like this effect but bu keys…
now i can handle it with keys but how to do this ?
when you click in the name of city or place, it’s move and zoom to the target.
here is the Link then click on Target Baghdad :skull:

thanx