Using classes to automatically apply code to an object.
Can I use classes to automatically apply code to an object? I'm trying to build myself a physics engine, and this seemed like a good way of going about it, if there's a way to do it.
For example, I have a side-scroller with 50 flat lines that I want the character to land on. Could I make a class of object that the main character would land on, rather than fall through, and then set certain lines to that class? I don't want to add the lines in with code, as I would like to move them around with the mouse and try different things. Just to clarify, I don't want to move them around in the swf; I just want to move them around in the fla.
Anyways, is there a way of doing this in actionscript without using code to add the main character to the stage, and would it use classes? Or should I go about building my engine in a completely different way?