building an actor class directly into a symbol?

can this be done? i have been following flashy todds tutorials and i was wondering if i could put the actionscript for box2d actor inside a symbol. for example i would have a symbol called crate that i want to be a box with a texture. but i want the location of the box to be where it is on the stage rather than hard coded. is it possible to build it all into a symbol?
There are some ways to create a "leveleditor" where you can place flash symbols on stage to represent box2d items. I wouldn't recommend putting the code in a Symbol though, there are other ways to achieve what you want to do.

Take a look at WCK
unfortunatly im working on a game for whirled http://www.whirled.com and the security that flash runs on there doesnt allow calls to stage or components to be used. they have there own alternative for stage but components wont work so neither will wck
I believe you could do this by creating an Actor class that extends MovieClip, then place the clip on the stage and set the base class to this Actor class, or a subclass of actor for specific ones. Actor would then need to add some type of physics representation to the b2World. This could either be defined inside that class with code, or you could create classes for each type of b2Shape and set their linkage in the same way and make them children of the actor, positioning them how you want. Then when the Actor is constructed it gets all of the children and calls some function to get the shapes generated, adds them to a b2Body it creates which is added to the world. You can get the width/height of each clip to set the sizes of the shapes, but I don't know what you'd do for density, etc...

It's a bit of a hack, but if you're not using tons of different linkage classes it should be pretty painless.

Original thread: https://box2d.org/forum/viewtopic.php?t=3037