# How to detect if the movie is a projector or inside a web page

**URL:** <https://forum.kirupa.com/t/how-to-detect-if-the-movie-is-a-projector-or-inside-a-web-page/41943>\
**Category:** Uncategorized\
**Created:** [February 3, 2004, 5:36pm UTC](https://forum.kirupa.com/t/how-to-detect-if-the-movie-is-a-projector-or-inside-a-web-page/41943 "2004-02-03T17:36:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalvi](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dalvi](https://forum.kirupa.com/u/dalvi)\
**Post date:** [February 3, 2004, 5:36pm UTC](https://forum.kirupa.com/t/how-to-detect-if-the-movie-is-a-projector-or-inside-a-web-page/41943/1 "2004-02-03T17:36:07Z")

</div>

I found myself with this problem:

**How to detect if the movie is a projector or inside a web page.**

Does anyone have a clue?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 11, 2004, 11:29am UTC](https://forum.kirupa.com/t/how-to-detect-if-the-movie-is-a-projector-or-inside-a-web-page/41943/2 "2004-02-11T11:29:32Z")

</div>

Thank you!

The solutions is not perfect but I noticed that when movie runs inside html file, the \_url string is allways unescaped. When it runs as a projector, or simply in flash player, the path is escaped.

file:///D|/Work/detect/release%5Fdetect.swf swf played inside Flash player  
file:///D|/Work/detect/release%5Fdetect.exe

file://D:\Work\detect\release\_detect.swf webpage from disk  
[http://mydomain/detect/release\_detect.swf](http://mydomain/detect/release_detect.swf) webpage from domain

This was for simple AS inside .fla file

The following is for AS 2.0 classes:

file:///D|/Work/detect/detect.exe .exe projector  
file:///D|/Work/detect/detect.swf swf played inside Flash player  
file:///D|/Work/detect/detect.swf from authoring

file://D:\Work\detect\detect.swf webpage from disk  
[http://mydomain/detect/detect.swf](http://mydomain/detect/detect.swf) webpage from domain

Diferences are 3 (/// instead of //, | instead of :, / instead of )  
The only reliable one is /// instead of //

I surely would preffer a cleaner solution, for detecting exe/swf-authoring/web, but this will do.

Thank you again!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 11, 2004, 1:03pm UTC](https://forum.kirupa.com/t/how-to-detect-if-the-movie-is-a-projector-or-inside-a-web-page/41943/3 "2004-02-11T13:03:06Z")

</div>

You’re welcome!
