FN-FORUM: Flash data problem
date posted 17th January 2005 16:14
Dear Flash MX people,
I'm trying to get some text into a flash movies' dynamic text box (first
time I've tried it). Having read my action script bible, I'm none the
wiser. I wonder if you can help?
In the .fla file I have a text box on it's own layer that is there
throughout the movie. It's type is set to "Dynamic Text", instance name
"MainTitle", variable name "titleText". The movie id is "signature".
In my actions layer on frame one I have an action:-
fscommand("setMainText","");
On the web page I have a javascript function as follows:-
function signature_DoFSCommand(command,args)
{
if (command == 'killLogo')
{
document.getElementById('jbiLogo').style.display='none';
}
if (command == 'setMainText')
{
signature_SetVariable(titleText,'Test Text for Site);
}
}
My plan is to replace the "Test Text for Site" with the output of a database
query. However, I don't get any text at all appearing in the dynamic text
box when the movie runs in this test scenario.
Incidentally, the first "If" section of the DoFSCommand works fine so I know
the movie and the javascript are communicating ok on that level at least.
Any pointers would be appreciated.
Best regards,
Craig