Highlighted

How to load assets dynamicly

New Here ,
Sep 29, 2020

Copy link to clipboard

Copied

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

Views

78

Likes

Translate

Translate

Report

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

How to load assets dynamicly

New Here ,
Sep 29, 2020

Copy link to clipboard

Copied

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

Views

79

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 29, 2020 0
Adobe Community Professional ,
Sep 30, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 30, 2020 0
New Here ,
Oct 04, 2020

Copy link to clipboard

Copied

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?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 04, 2020 0
New Here ,
Oct 04, 2020

Copy link to clipboard

Copied

also could you tell me is there any way to just have an external library? I know I can load assets individually but can I load files into memory just by specifying a folder or anything like that?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 04, 2020 0
kglad LATEST
Adobe Community Professional ,
Oct 05, 2020

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 05, 2020 0