FlashExtensions Home | FlashInterface Products Page

 

Call / Receive Method Example

The call method allows you to invoke synchronous calls to public methods and properties of a registered control and receive a return value. Registering an item with an Flash ID allows its properties and functions to be accessible through FlashInterface. In this example, you can type in the caller window and the receiver will receive the text through a synchronous call.

Load Flash 8 SWF | Load Flash 9 SWF Load Flash 8 SWF | Load Flash 9 SWF
FlashInterface caller
FlashInterface receiver

Sample Code for Receiver


import flx.external.FlashInterface;
FlashInterface.publish(_root);

FlashInterface.register("output", txtOutput);

Sample Code for Caller


import flx.external.FlashInterface;
FlashInterface.call("flash_receive_property.output.text", txtInput.text);