PDA

View Full Version : Moving off the timeline


GroZZleR
07-29-2008, 10:25 PM
Hey all,

Could anyone point to some articles that demonstrate how to move off of the timeline, code wise? I'm looking to create all of my object's behaviours in .as files instead of coded into the various frames on the timeline.

Anyone? Thanks.

lordofduct
07-30-2008, 12:15 AM
??

move off the timeline? What do you mean by your question?

devil_ether
07-30-2008, 12:40 AM
If you mean creating your own document classes and subsequent external as files, I found the following tutorials useful...

http://www.flepstudio.org/forum/object-oriented-programming-tutorials/

GroZZleR
07-30-2008, 02:09 AM
Thanks devil, that was pretty helpful but not quite what I mean. Let's see if I can explain this with an example.

Let's say I'm making a game and in the game is a monster. The monster does all sorts of crazy things like walk, attack, die, etc. I want to write the code for the monster's behaviour (like patrolling, attacking the player, etc) in a separate AS file and then somehow attach that to the visual elements created on the timeline rather then write all the code on the timeline.

Anyone have any articles on how to go about that sort of correlation of visual elements and logic?

Thanks guys for the help so far.

bloodstyle
07-30-2008, 02:40 PM
Don't really have an article for you, but if you mean linking .as files to specific movieclips in your library, here's how you do that; rightclick the symbol, click Linkage, tick the box that says Export for actionscript, and use the same name as your .as file for the Class field. Now that symbol will do everything your .as file tells it to.