[fmx] javascript popups from within a dynamic text field - possible?

Hi & thanks for reading my post,

I am trying to make a dynamic text box with a javascript popup menu command on bits of the text. I have looked through many tutorials and searched this forum and have not found what I am looking for so I had to ask…

at the moment my code for the text in flash is:

_root.glossaryTerm = “circuit”;
tempURL = “javascript:showGlossary(’” + _root.glossaryTerm + “’)”, “”;
_root.txtSpeech = "Electricity can only travel is there’s a complete " + tempURL

and javascript on a html page is:

<script language=“JavaScript”>
function ShowGlossary(glossaryTerm){
url=‘glossary/gloss_’ + glossaryTerm + ‘.htm’;
features = “fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width=400,height=400”;
glossary = window.open( url, “glossary”, features );
glossary.focus();
}
</script>

I get actionscript errors on the tempURL becuase there are too many quoteation marks, not sure how to overcome this problem…i dont even know if what i am doing is possible. I have made the text box on the stage do HTML tags but i cant set the tempURL up right.

If anyone has any ideas or knows if this is even possible with dynamic text it’d be appreciated. I have a workaround which just involes me putting the text directly on the screen it’s just that I wont always be able to do that…basically if it can be done this way it’d be grand!

many thanks for reading this far and extra thanks to anyone to can help me out with my problem,

Matt.