Did you search the archives, because the answer is in there somewhere? Officially, you can't get the URL of the enclosing page. But, you can use ExternalInterface to execute some JavaScript to get it for you.
I'm a bit rusty on this specific topic, however I believe that there may be ExternalInterface issues if the swf is hosted on a different domain than the enclosing page. cuddlygunchi wrote: > > > Hello, > > How can I find inside my flex app the url that is serving it. > > Eg. if my app is being accessed as http://mysite.com/myapp.html, > <http://mysite.com/myapp.html,> I > would like to have this url in a string inside my app at runtime so > that I can change the behavior of my app depending on where it is being > served from. > > The requirement is there because I have 3 environments for > dev/test/prod qualified by their urls and I would like to have the same > flex swf deployed on these that would behave differently for different > envs. > > Many Thanks, > Aman > -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: <http://www.dot-com-it.com> My Podcast: <http://www.theflexshow.com> My Blog: <http://www.jeffryhouser.com>

