next up previous contents
Next: Protecting your applications Up: Data exchanging between Action Previous: The updateData method   Contents


getArray, putArray, getObject, putObject

These four methods provide an easier way to exchange arrays and objects between the Action Script and FFish Script.

In the game score sample, you need to declare a score object.

To get the value of the variables in Action Script

score = FlashPlayer.getObject("score",
    "playerName", "score");

To update the value of the variables in Action Script

FlashPlayer.putObject("score", score);

As you can see, the methods provide a way to transfer arrays or objects by only one call. However, you must declare the arrays or objects in Action Script explicitly before data exchanging.

However, we recommend you to use synchronous FFish script objects directly in Action script if you have Flash 8. The synchronous objects will return values directly to Action script, and you need not transfer any data between FFish script and Action script.



Copyright ©2000-2007 Shanghai TopCMM Software Technologies. All Rights Reserved.