Detect local playback

If you want to know if the swf is running locally (in Flash's IDE) or in a webpage you can use this one liner:
isLocal = _url.indexOf("file") == 0;
isLocal will become boolean true or false.
Leave a comment
Name
Email (optional)
Your email will only be used to show your Gravatar and to send you replies to this article (if you opt to receive them). You won't get ANY other messages at all!
Comment
No HTML allowed
Notify me via email
 
 
Share

Valid HTML 4.01 Strict