flex - How do I load dynamic image assets into adobe air -
I show four random images at a time. These four images come from a set of fifty images. If this was a standard Flex project, then I would only set up the img.source property:
this.img1.source = "..//satas/img/" + randomname + ".png" ; ` Although this is not working, I am getting a broken image, another way to go about it is to load the image with a urlLoader, which will also image Not loading (surprisingly, this is a local asset)
loader = new loader (); Var urlReq: URLRequest = New URLRequest ("../ Property / IMG /" + Random Name + "." Png "); Loader.contentLoaderInfo.addEventListener (Event.Complete, Load); Loader.load (urlReq) So it is not working either, I am thinking of loading all the images in an swc and then adding swc to the project. This is not obviously great because then all the properties Loads in memory at runtime. Is there another way to do this?
I hope that I have some very simple It is coming.
If the .swc solution is the best, can someone tell me in the right direction? I have forgotten how this whole business works, because it has been since some years I have worked with Flex / Flash
Thanks in advance
The directory should be added as a "source" directory.
Then you should be aware of the fact that the property Content Sikaon will be copied to the root of your application. So when you have the image "property / interface / BG.", Then you should load a new URLRequest ( "interface / bg.png").
Comments
Post a Comment