I'm trying to load an image and center it within a movie clip already on the stage.
image_mc._x= Stage.width/2 - image_mc._width;
image_mc._y= Stage.height/2 - image_mc._width;
I know it's something simple and there are forums dedicated to this topic but I can't seem to view the code examples that the helpers are using.
Thanks in advance for any suggestions.
You can't manipulate a dynamically loaded object until it has loaded, and the way to know an object is loaded is to use the MovieClipLoader class along with an event listener to detect when loading is complete. The loadMovie function does not work with event listeners.
Thanks for the advice Ned......how would one use said class?
If you look up MovieClipLoader.addListener in the AS2 help documentation there is a fairly complete example there that you should be able to follow. You can see how the adjustments to the loaded file are dealt with in the onLoadInit function. The primary loading method that gets called is loadClip(), and that is included in the example.