Flex external resources


I have a Flex project up and running. It consist of multiple module and compiling is working fine.

As it will be hosted online, I have some kind of external resources.

In many of the Flex component (let say Image), there's a "source" attribute.
If I populate that "source" attribute with an absolute path (eg : "/images/my_image.jpg"), intelliJ IDEA inspect that as an error because it doesn't recognise the path.

Is there any way to "add" an external library of web resources?

I've tried create a module with a content root pointing to my local folder (eg :  c:\web\images\") without sucess.


Comment actions Permalink

Paths are either absolute or relative to any of source folder (in latter case it must not start with slash). So if you have c:\web\images\my_image.jpg file then to get code green you can configure c:\web to be a source folder (i.e. 'blue' folder in IDEA UI, not only a content root, though can be also) and use it in mxml like <mx:Image source="images/my_image.jpg"/>

Comment actions Permalink

It's working now!

The issue was the first "/"


Please sign in to leave a comment.