Can Flash recognize the html page its in?

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?

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:

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.

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?

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.

You could pass along a variable, for example $PHP_SELF to the swf using FlashVars :slight_smile:

http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary579.html :slight_smile:

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

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.

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