0

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

Proyb2
  • 995
  • 6
  • 13
  • 35

2 Answers2

2

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.))

alxx
  • 9,897
  • 4
  • 26
  • 41
1

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.

JD Isaacks
  • 56,088
  • 93
  • 276
  • 422