Skip to main content
Known Participant
September 24, 2009
Question

Is it possible to add images from folder into library without using import to library option?

  • September 24, 2009
  • 1 reply
  • 737 views

How can we import images using AS3 code so that when they are imported once will remain in the library forever..

Is my question is clear?

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
September 24, 2009

As far as I know you cannot import files dynamically using AS3 and have them permanently placed in the file from that point forward.  AS3 importing is a run time activity, which means the swf file is already compiled.  To try to have the images permanantly stored as part of a run-time activity would mean you are trying to get the compiled file to act like a source file and recompile itself.

AnkurwahiAuthor
Known Participant
September 24, 2009

Thanks for ur reply.

Kindly tell me what is the best way for this problem.

There is one xml file from which i fetch some images.When those images are fetched i want to generate new swf  on button clicking which consists of all the images in its library which are fetched previously  .I dont want that swf should use the xml images.I want to embed those images into the new swf .How can I do that.

because after the movie(swf) is created it should be one independant file which should not use the xml path and images folder so that i can convert that into dat or mpeg format.

Thanks.

Regards

Known Participant
September 25, 2009

@Ankurwahi:

I am not sure, if I get it correct, but you should try the Embed metadata

tag.

e.g.

[Embed(source="image.jpg")]

private var Img:Class;

>

Hope this helps.

--

Chetan Sachdev

http://twitter.com/cksachdev