The “correct” way, is to pass a reference of your movie clip to the instance of your class when its created.
If you’re creating a manager-style class where it needs to keep track of more than just a single instance, or track the state of a timeline, then you can pass a reference to the timeline itself, or the stage if it is to manage the stage.
A little less versatile is having the instance find its own reference. If you know where your target movie clip is, e.g. stage.arrow_mc, then if your class extends some kind of DisplayObject like MovieClip and you add your instance of that class to the display list, then your ADDED_TO_STAGE event will fire and you’ll have access to the stage which will allow you to find it. The case where stage is available in the constructor (rather than having to wait for the event) is when you drag an instance of that class from the library onto the stage in the authoring tool.
Using a non-DisplayObject/MovieClip class instance gets no stage object and no ADDED_TO_STAGE event, so init will never fire (if this was the case for you, you’d probably get an error when trying to access stage). Using a DisplayObject/MovieClip class instance but not adding it to the display list means in the constructor stage will be null and the ADDED_TO_STAGE event never fires (since its never added) so init is never called then either. So adding to the display list is critical to making this work
I finally dit it by passing the movieclip as a parameter to a function of the class instance (not the constructor).
I suppose that’s what you mean too.
function or constructor works. A function would be needed if you’re adding the instance to the stage from authoring and not creating it with new. Making it required in the constructor, for example, could let you have better assurances as to its existence helping protect from possible null references in code, but that’s not really a big deal. Either way
Creating engaging and entertaining content for designers and developers since 1998.