I only have very limited control over a flash application. The only thing I can do is modify some links in an XML that it reads from.
I want to execute JS code based on the selected item in flash. I can link to something like: currentpage.html#some_anchor, but is there any way for me to detect the URL change from jQuery?
As alopix mentioned, you can use the HTML5 event, onhashchange, for IE8+, Chrome 5+ and Firefox 3.6+.
Since you’re already using jQuery, you might want to take a look at this plugin by Ben Alman, which makes an implementation of the event available for unsupporting browsers. This makes it as simple as:
You can also use ExternalInterface.call() to invoke a JavaScript function from Flash, which is probably a lot simpler for what you need, but doesn’t help much if you don’t have access to the Flash code.