| problem | |
| adobe flex4 AS3.0, filestraem (air) How to write a file where the application is located | the mystery "fileWriteResource" hidden error | how to write files in applicationDirectory (where is not allowed) [tested in windows only] --- > page by dennis | |
| solution | |
| How to write a file where the application is located in the follow example, the variable "filename" is String and has as value the the file name without path, i.e.: "sample.txt" the follow code doesn't work, produces an error "fileWriteResource" that is not even thrown! var newFile:File=File.applicationDirectory.resolvePath(filename); use the follow code: var newFile:File=File(File.getRootDirectories()[0]).resolvePath(File.applicationDirectory.nativePath+File.separator+filename); //I am not kidding... it is working | |
Flexache, is the pain you feel in your brain when you coding on Adobe’s Flex Builder, Flash builder with Flex SDK and Actionscript in general. The pain is starting from the eyes, as you can’t believe what you see and is getting deep in your head as you can’t fix. In this blog I‘ll give you painkiller to get out of a lot strange troubles showing solutions and techniques in Flex.
Showing posts with label air. Show all posts
Showing posts with label air. Show all posts
Thursday, 28 April 2011
flex, air, How to write a file where the application is located
Thursday, 21 April 2011
flex error message: If the program is already running, close it before attempting to run.
| problem |
| adobe flex4 AS3.0 air Launching an air application from Flex 4 IDE, it crashes because of a bug, but the widow of the application is not created so… Trying to launch the application again you get the error If the program is already running, close it before attempting to run. You cannot close the application… how to kill this invisible application? --- > dn |
| solution |
| kill the process adl.exe |
how to get the command line arguments of the flex air application
problem |
adobe flex4 AS3.0 air how to get the command line arguments of the air application --- > dn |
solution |
You have to listen to invoke event of the air application. Then, this event gives an InvokeEvent object. This object has the arguments array, in this arrays are the command line arguments stored... see the follow Listener as example: protected function Handler_InvokeEvent(event:InvokeEvent):void { lb_test.text= event.arguments[0]+' '+ event.arguments[1]; loadConfigFile(); } |
Subscribe to:
Posts (Atom)