0
votes

How can I get the application itself full path in actionscript?

2
Actionscript or Flex app? server side or client installed application directory? - Glycerine
I build a flex app, the code is in actionscript for client desktop - Proyb2
It will get the C:\program files\ location. - Proyb2

2 Answers

2
votes

If you're using AIR, stage.loaderInfo.url will return app:/[SWF name].swf. Combine that with File.applicationDirectory.nativePath and voila.

Update: For in-browser app, Application.application.url or stage.loaderInfo.url should be enough (full url with params (not flashvars, url params if any - ...swf?param1=1.))

1
votes

If you are using Flex the root class Application for Flash Player and WindowedApplication for AIR.

Has a url property which returns:

The URL from which this Application's SWF file was loaded.