asdg>> technotes>> loadVariables() fails when called via asfunction

Version: Flash 5 and later
Date Added: August 22, 2001
Last Updated: December 31, 2002

In the Flash Player, attempts to load variables into a text field via an asfunction call in the same text field fail, as shown in the demo below:



One way to workaround the problem is to load the vars into another clip and use that clip's data handler to set the value of the original field, as shown below:



Side note: I generally advocate the separation of data handling (logic) from printing content to screen (output). In my scripts, I normally have a clean, separate function that updates the screen...it pays off here and elsewhere.

Thanks to jamie dyer for pointing out the bug.