Loading an external image (from file system) to fla library as MovieClip symbol using ActionScript.
Hi everyone,
I am new to actionscript and Flash.
I have been working on code updation project wherein initially we had an image and text as movieclips in fla library. The image and the text are read by the actionscript program which then creates an animation.
For Example:
// Picture
// *******************************************************
// _imageMC: Name of the Movie Clip in the libary which
// contains the picture.
var _imageMC:String = "polaroid";
This is later on used by another actionscript class as follows to finally create the animation.
var _mcPolaroid:MovieClip = this._mcBg.attachMovie(this._polaroid, "polaroid_mc", this._mcBg.getNextHighestDepth());
Now the problem here is when one needs to update the image or text, one needs to go and open the fla file andmanually change the image attached to the movieClip (polaroid).
I want to ease the updation process by giving the url of the image in an XML file. Read the image url from the xml and load this image in the library of the fla as movieclip. This, i think, will result in less code change and improve the updation of the final animation image.
The problem i am facing is not been able to figure out how can i change the image (after fetching its URL) to a movieclip and then load it in the library?
Thank you kindly in advance,
Varun
