开发者

Creating reproduceable animation actions in Adobe Flash

I'm trying to create snippets of animation that will be reproduceable.

i.e. punch, walk one cycle, squat

Eventually I want use external data to control how the character moves. For instance, reading in a text file and searching for keywords like "love" or "anger" and then creating a list of actions dependent on that data, like jump once for every "love" and walk one cycle for every "anger".

Input: text file, Output: list of commands for the character

Originally my plan was this:

1) create motion presets

2) write a script that would take in external data and call those motion presets based on the data

It turns out that motion presets are pretty limited. These motions (punch, walk, ect) recquire animating several parts of the character, so motion presets don't work well.

It occured to me that all actions capable with the Flash GUI are probably possible to script in ActionScript. Instead of using motion presets, I could have code snippets that would be called based on the input.

Question 1: Is that true? Or are there some things you can't script? (like drawing perhaps)

Question 2: If so, is there a way to record your actions in the GUI to a script? I have limited experience in Maya, but this is something that is possible with that software. You can open up a scripting window, use the GUI, and all the commands you executed show up in the window.

Any advice in general for creating these reproduce开发者_如何学运维able actions?

Thanks so much for your help!!


Usually it is considered good practice to leave the code out of Flash CS , following that you could have a MovieClip with various frames for your actions , link your MovieClip to an external class and create an action method()

   public function action( value:String ):void
   {
       gotoAndPlay( action );
   }

Of course you would need to add stop() statements at the beginning and end of your actions, and name your frame labels according to the action.

Then you should be able to call this method from an event listener that redirects the action depending on specific keywords.

Another approach would be to create MovieClips for each specific action and call a specific MC according to a specific keyword.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜