0
votes

I have flex library projects with resources that I need to have in every aplication directory that uses this swc. How can I build my flex library project for it?

1

1 Answers

0
votes

In the flex library write an utility class that stores all resources on the application directory. To save files here's a small code snippet that should get you on your way:

var file:File = File.applicationStorageDirectory.resolvePath("new-file.png");
var fileStream:FileStream = new FileStream();
fileStrean.open(file, FileMode.WRITE);
fileStream.writeBytes(data, 0, data.length);
fileStream.close()