Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Loading external symbols using actionscript3.0 and replacing existing symbol in fla file with the same

New Here ,
Oct 21, 2014 Oct 21, 2014

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.

TOPICS
ActionScript
289
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 21, 2014 Oct 21, 2014

If you mean you want to revise an fla using Actionscript that is not possible as far as I know.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2014 Oct 21, 2014
LATEST

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.

refer  http://www.danfergusdesign.com/classfiles/oldClasses/VCB331-richMedia1/exercises/loadingExternalFile...

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines