Flash + Jquery menu item highlight
Hi,
Am having trouble getting around the following problem.
Ideal situation/setup:
A page containing 1 Flash movie and a separate div containing a few hyperlinks.
These hyperlinks each have a unique class name like so:
- <ul>
<li><a href="" class="randomname1"></a></li>
<li><a href="" class="randomname2"></a></li>
<li><a href="" class="randomname3"></a></li>
<li><a href="" class="randomname4"></a></li>
</ul>
The Flash movie itself will contain 4 buttons.
Clicking on one of these buttons should make the Flash communicate with Jquery/JS and tell it to highlight the specific classname
Thoughts:
I do know that Flash will need to communicate with JS, so i figure it will need to use "externalinterface" to do so.
What i am more interested is how i can write a script in Jquery that will highlight the specific classname and how it can do it 'realtime' as there is no pageload when a button in Flash is clicked and the specific classname needs to be highlighted.
I was thinking of using the following to 'update' the classnames, but then how do i write it in such a way that the classname is dynamic?
- function updateLinks(){
$('.randomname1').css('background','red');
}
setInterval(updateLinks, 1000)
Hope the above is understandable and i really do hope a solution is possible as well.
Maybe i am looking at it the wrong way and a much easier/simpler solution is available
Thank you in advance