Skip to main content
Serifaz
Known Participant
September 30, 2020
Question

How to load assets dynamicly

  • September 30, 2020
  • 2 replies
  • 352 views

I'm making a simple multiplayer game with animate.
I would like to create a patch system so I can distribute patches to clients.

I would like to do this by having a passworded archivives that can be accessed by AS.

I know how to edit and load zip file data but how can I load something in the archive say an asset / ana file

into memory so it can be displayed.

I want to essentially do something like below

loader.load(new URLRequest("asset.ana"));

addChild(loader);

when I try this though it says it does not understand the file type of .ana

I tried looking up how to do it but havnt found anything.

if there is any api documentation or info on how to load assets into memory like a movieclip 

please let me know.

NOTE: I don't want to load external swfs I want to load the MCs and buttons and so on dynamicly

    This topic has been closed for replies.

    2 replies

    kglad
    Community Expert
    Community Expert
    September 30, 2020

    that's not going to work.

     

    you might be able to use the bytearray class to do something similar to what you want but i'm not sure you can do exactly what you want, and if it can be done it would require advanced understanding of as3.

    Serifaz
    SerifazAuthor
    Known Participant
    October 4, 2020

    could you give me an example of how I would load assets from a byte array.

    also is it possible to load assets, such as a picture into the library at runtime.Or is there any way to load those assets at runtime?