I have created a class and I would like each object of this class to be related to a movieclip which I would be able to move around the scene.
But I have to admit I don’t really know how to do that.
The best would be that each of my objects have a movieclip called “graphical_representation”
myobject1 = new myclass(…);
myobject1.graphical_representation._x = 10;
myobject1.graphical_representation.onRollover = function ()
When I’ve created my class, I’ve extended it from MovieClip like this :
class myclass extends MovieClip
but, after that, I don’t know where I should define the movieclip itself.
Actually, I’m going to draw inside the movieclip using the moveTo and lineTo functions and also using the objects parameters.
This part is ok, I know how to do it.
But for this, I really need to know where and how to create my movieclip for each object of my class.
I looked for solutions almost everywhere on the web and on the forums, but, here, I think my problem is more an understanting issue.
Would anyone explain me how to start with this?
By the way, my code will be in AS2.
Is the prototype function ok or should I avoid it?
Thanks a lot for any answer which I’m sure will be very useful.