Copy link to clipboard
Copied
I want to dynamically replace symbols in the scenes. Using URLRequest and Loader classes, I am loading the external file. I could succeed to create multiple Bitmap instances on the stage using my actionscript 3.0. However, I am only able to create and add new symbols to the stage with my code. But if I have an existing fla file and I want to change all existing instances of a particular symbol in library by an external file, I am not able to do it. Is there a way?
In short, I want to achieve programmatically the same effect of - importing a symbol in library, with a symbol with same name already existing in library. Please help.
Copy link to clipboard
Copied
If you mean you want to revise an fla using Actionscript that is not possible as far as I know.
Copy link to clipboard
Copied
Thanks Ned! Well.. I am more looking to have the SWF file generated to have the images picked up from my local folder. if the original FLA file does not change, it's fine with me.
On searching more, I could see an approach of creating a FLA with empty movieclip symbols... name every instance of this empty MC on stage. Then the loaded external image is added to every instance of this MC and MC_instance.addChild() for all instances of the MC will change the image and the SWF will have the new image file in it.
However this means, I need to name all instances and not miss any instance on stage in my actionscript.I need to have empty MC and not one having a image object already... which can be an issue especially in a large FLA file and in future maintenance if I change the FLA file over the period of time. But is there a better way.. can I change the attribute of the MC class inn library itself runtime using actionscript..., so that any instance created from that symbol in library will automatically be applied with that change during SWF creation?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now