My app allows a user to take a snapshot of a website and it then saves this 
snapshot as a jpg. However what I want is for the user to be able to name this 
jpg BEFORE it is saved eg if they type in yahooimage into a textinput component 
in my app (imagenameentry) and then click a button to create the image it will 
be automatically saved as yahooimage.jpg.
 
At the moment I've just got the file saving as userimage.jpg but I tried 
editing a bit of my code which creates the file to this:-
 
var file:File = 
File.applicationDirectory.resolvePath('assets/images/'imagenameentry.text'.jpg');
 
This never worked and throws a syntax error but if I use:-
 
var file:File = 
File.applicationDirectory.resolvePath('assets/images/userimage.jpg');
  
Then it saves but as I say I want the image to be nameable like in the top 
example so that whatever the user enters in the imagenameentry box will be set 
as the name of the image. What am I doing wrong here and is there another way 
to do this?


Reply via email to