Skip to content

Sumit Gupta

bookmarking my life

Calling Path in ActionScript

August 28, 2009 by Sumit Gupta Action Script, Flash

If you ever want to find the Base URL of your website, you can easily find it from URL your SWF is been called. To find the base URL you can use following 2 lines

var kLastSlash:Number = _root._url.lastIndexOf(‘/’);
var baseUrl:String = _root._url.substr(0, kLastSlash+1);

now use baseUrl variable where you need.

Share this:

  • Facebook
  • Twitter
  • Reddit
  • LinkedIn
  • Pinterest
  • WhatsApp
  • Telegram
Tagged ActionScript 2.0, baseURL

Post navigation

Previous: OpenXML : New office file format
Next: Tech. Person with Bad computer

© 2025 Sumit Gupta // Powered by WordPress