I have an application which takes snapshots of components and then converts the bitmap data of the snapshots into a jpeg via a jpegencoder and saves these jpegs in my images directory (assets/images). The strange thing is I can't embed these images the way I can embed others and it's almost like flex doesn't see them there in the folder when I try to embed them. For example using the app I made a jpeg called testpicture.jpg and it saved in the assets/images folder just like I wanted it to along with all the regular images I have but when I tried to embed it using the following code:-
[ Bindable][ Embed(source="assets/images/testpicture.jpg")] public var testpicture:Class;
Has anyone else encountered this problem and can you help me figure out what it is? Thanks for any suggestions
EDIT: I think I've recognised the problem. It was that my app was saving them into the bin-debug folder rather than the src folder.
The reason I want them in the src folder is so that I can embed them within the app and it seems you can't embed images that are in the bin-debug folder unless I'm mistaken. The reason I want to be able to save them directly into the src/assets/images folder is so that they will replace current images I have stored there which are embedded within the app so hopefully as they are saved these will replace the images live within the app if that makes sense.
The current line of code I have which saves the images in the bin-debug folder is this:-
var file:File = File.applicationDirectory.resolvePath("assets/images/testpicture.jpg");
Can anyone tell me how to modify this so that they save in the src folder rather than the bin-debug folder or is it possible to embed images that are in the bin-debug folder? Thanks.