Get url variable to flash

Hi, i’m getting an url variable to flash using some javascript code.

Everything works fine and i get the variable to my dynamic text field but only on the root. if i put the text field on a movie clip it don’t work anymore. Any clue on how to fix it?

i’m getting the variable with

<param name="movie" value="teste.swf'+document.location.search+'" />

on the flash i just write the variable name and it works.
something like http://www.kirupa.com/nome.html?var1=alapimba

and alapimba appears on my flash file.

What can i do to fix this? :frowning: