views:

200

answers:

1

Hi. i wrote an swf application using action script 2, i want to be able to know the file name of the current running swf file.

i know that in php i have __FILE__ to get current running php file, is there something like that in flash?

+1  A: 

Have a look at the stage.loaderInfo.url variable for AS3 and this._url or _root._url (if you're not in root already) for AS2

Matti
when i try to trace(stage.loaderInfo.url) using adobe flash it returns undefined.
ufk
Are you running AS2 or AS3? That should work in an ActionScript 3 project.
Myk
working with action script 2. i should have noted that before, updating main post. thanks
ufk