Flex: Load images and swf's dynamically
- by Lizzan
I'm building a slide-show like application in Flex and I'm trying to load images dynamically. The images are in a folder outside the application folder. This is the folder structure:
/Bildvisare-debug/
Bildvisare.html
Bildvisare.swf
/Images/
01_02_01_01_B.jpg
01_02_01_01_T.JPG
I'm reading the image names from an XML file and get them with a path of ../Images/01_03_01_01_B.jpg. In my mxml-file I've got an SWFLoader named picture and I try to load the images with the following code:
this.picture.source = images[currentImg]; //E.g. ../Images/01_03_01_01_B.jpg
this.picture.load();
The problem is that the images never show up, I only get the icon for a missing image. Can anyone help?