Key Animation/Action Script

Key Animation/Action Script

Post by Heros_Dark » Wed, 25 Feb 2004 03:58:42

I have started creating several interactive Flash MX animations and I have come
across a problem I can't seem to figure out. I am try to make my animation so
when a certain key is down not only will the object move on the screen. But I
want it to move a certain way. For instance. When you hold the left arrow key
not only does the image move left but I want it to have its own animation to
make it look like it is walking left. I tried going into the instance and
putting action scripts in there that when key LEFT is down it plays the
animation of him walking. But a couple times it came up with errors and when I
figured them out and played it. It just didn't work. Here is what I put in the
instance action layer in frame 1.
if (Key.isDown(Key.LEFT)) {
Then the layer under the actions layer is the animation of the figure walking.
At the end of the animation it has a action that is,
I am not sure how clear this is but if anyone can help it would be greatly

1. script ,animation,render. I finish my script how to key frame it for animation or bake it?

2. How can I capture tab key event and cancel default action of Tab key?

The default action of tab key is to move focus.
For example,
<textarea id="ta"></textarea>
<textarea id="tb"></textarea>

Pressing Tab key when cursor is in the first textarea results in cursor
in the second textarea.
Is there a cross-browser way to capture the event of pressing Tab key
in a textarea and canceling the focus-moving action?

I tried the following code:

<textarea id="ta"></textarea>
<textarea id="tb"></textarea>
document.getElementById('ta').onkeypress = function(e){
e = e || window.event;
var code = e.keyCode || e.which;
var c = String.fromCharCode(code);
if(c == '\t'){
alert('TAB pressed'); return false;
} else return true;

And I put cursor in the first textarea and pressed Tab.
IE 7 showed no alertbox and focus moved. not ok.
Firefox 2.0 showed alertbox and focus stayed. ok.
Opera 9 showed alertbox and focus moved. not ok.

3. 3d animation software downloads | 3d animation software for adobe premeire | 3d animation software for free

4. Action buttons to control animation???

5. Using an action button to trigger an animation effect

6. Action Buttons and Animation

7. linking an action button to a custom animation

8. Changing defaults in animation actions

9. combining movie actions with other animations

10. Animation interferes with Action Settings

11. Action Settings Stop All Animations in Kiosk Slide Show

12. Restart slide animation when clicking on back action button?

13. Custom Animation (objects & sound) + action buttons+ hyperlink

14. stop action animation

15. Stop action on animation.