I am using setVariable to pass the results of an LMS query back into flash. The process works like this:
Flash sends LMS commands using fscommand to javascript via a vb handling script (DoFSCommand) - this a standard and well documented method.
Javascript handles the LMS commands and passes this onto the LMS. Some of the commands we pass require values from the LMS.
The LMS returns the values requested to javascript which then, using a setVariable function, passes them back into the flash movie.
The problem I have is that this works most of the time but on some occassions there are no values returned. This is a timing issue in flash. I know that passing values to a dynamic text field happens instantly, but I don’t want to do this. I just need the variable and value, I have read that this takes longer for some reason?!!
I have _root.watch (variable, perform some function) for all the variables I need. I have also declared and initialised the variables on frame 1 of the root timeline.
on frame 15 of the timeline I have my fscommands and my _root.watch functions (don’t ask me why, it just works if I place them further along the timeline??), I have also left an additional 15 frames to allow ‘time’ for the variables to be passed back (once again this may just be paranoia on my part!!). Even with all this, It does not work 100% of the time!
I must confess, I realise the need for _root.watch but don’t fully understand it as there are no stop(); or functions that ensure if the variable has not changed it does not allow the movie to progress, or is this built in to the watch command? My feeling is that the problem lies with the watch command.
My apologies for the verbose nature of this posting but I’m hoping it provides most, if not all, of the information required for the experts out there.
Thanks in advance.
Regards
T.