Reputation: 993
How can I get the application itself full path in actionscript?
Upvotes: 0
Views: 371
Reputation: 9897
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.))
Upvotes: 2
Reputation: 58014
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.
Upvotes: 1