# Can Flash recognize the html page its in?

**URL:** <https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486>\
**Category:** Uncategorized\
**Created:** [July 27, 2004, 9:03pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486 "2004-07-27T21:03:55Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaelle](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jaelle](https://forum.kirupa.com/u/jaelle)\
**Post date:** [July 27, 2004, 9:03pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/1 "2004-07-27T21:03:55Z")

</div>

I have a flash menu that I want to use on every page on a website. Ideally, I would like to somehow have my Flash movie detect the name of the html page it is part of, so that it can react accordingly. Does anyone have any ideas how this can be done?

---

<div class="post-metadata">

**Author:** ![bodyvisual](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bodyvisual/32/564_2.png) [@bodyvisual](https://forum.kirupa.com/u/bodyvisual)\
**Post date:** [July 27, 2004, 9:12pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/2 "2004-07-27T21:12:32Z")

</div>

you could _possibly_ use fscommand, but i’ve never done that, so i’m not sure. take a look at some of 2advanced’s sites to see what they do w/ hybrid sites.

:p:

---

<div class="post-metadata">

**Author:** ![jaelle](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jaelle](https://forum.kirupa.com/u/jaelle)\
**Post date:** [July 27, 2004, 9:23pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/3 "2004-07-27T21:23:13Z")

</div>

thanks for the suggestion. I’ll look into it. I was also thinking i could pass a variable into Flash. But, that’s more work than I want to do at this point. So, i’ll try and find an easier way first.

---

<div class="post-metadata">

**Author:** ![dru\_nasty](https://avatars.discourse-cdn.com/v4/letter/d/90db22/32.png) [@dru\_nasty](https://forum.kirupa.com/u/dru_nasty)\
**Post date:** [July 28, 2004, 2:57pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/4 "2004-07-28T14:57:27Z")

</div>

How do you want it to “react?” Y don’t you just have the “reaction” happen when you click on the button for the page its calling?

---

<div class="post-metadata">

**Author:** ![jaelle](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jaelle](https://forum.kirupa.com/u/jaelle)\
**Post date:** [July 28, 2004, 5:05pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/5 "2004-07-28T17:05:04Z")

</div>

I want it so that the submenu containing that page link will remain open after you go to one of the inner pages.

something like:  
if (page == about.php) {  
display company submenu  
}  
if (page == webdesign.php) {  
display services submenu  
}

etc.

---

<div class="post-metadata">

**Author:** ![Voetsjoeba](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Voetsjoeba](https://forum.kirupa.com/u/Voetsjoeba)\
**Post date:** [July 28, 2004, 5:08pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/6 "2004-07-28T17:08:10Z")

</div>

You could pass along a variable, for example $PHP\_SELF to the swf using FlashVars 🙂

---

<div class="post-metadata">

**Author:** ![lostinbeta](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@lostinbeta](https://forum.kirupa.com/u/lostinbeta)\
**Post date:** [July 28, 2004, 5:10pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/7 "2004-07-28T17:10:30Z")

</div>

[http://www.macromedia.com/support/flash/action\_scripts/actionscript\_dictionary/actionscript\_dictionary579.html](http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary579.html) 🙂

---

<div class="post-metadata">

**Author:** ![Voetsjoeba](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Voetsjoeba](https://forum.kirupa.com/u/Voetsjoeba)\
**Post date:** [July 28, 2004, 5:12pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/8 "2004-07-28T17:12:27Z")

</div>

Isn’t that the SWF URL lost, not the HTML URL ?

---

<div class="post-metadata">

**Author:** ![jaelle](https://avatars.discourse-cdn.com/v4/letter/j/4da419/32.png) [@jaelle](https://forum.kirupa.com/u/jaelle)\
**Post date:** [July 28, 2004, 5:39pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/9 "2004-07-28T17:39:04Z")

</div>

> [@lostinbeta](#):
>
> [http://www.macromedia.com/support/flash/action\_scripts/actionscript\_dictionary/actionscript\_dictionary579.html](http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary579.html) 🙂

Hey thanks! That’s very helpful. Maybe I can tack a variable onto the menu (menu.swf?category=1), and try and figure out a way to parse the URL to get that variable and go from there.

---

<div class="post-metadata">

**Author:** ![lostinbeta](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@lostinbeta](https://forum.kirupa.com/u/lostinbeta)\
**Post date:** [July 28, 2004, 7:05pm UTC](https://forum.kirupa.com/t/can-flash-recognize-the-html-page-its-in/117486/10 "2004-07-28T19:05:44Z")

</div>

> [@Voetsjoeba](#):
>
> Isn’t that the SWF URL lost, not the HTML URL ?

And that’s what I get for ‘skimming’ and not fully reading :pa:
