简体   繁体   中英

Flex 4 SWFLoader - Main app detecting events from remote sub app swf

I have 2 separate Flex 4 projects, same framework but running on different servers .

1) MainApp (IP:192.168.12.113:8080)

2) SubApp (IP:192.168.10.19:5080)

I need to integrate SubApp into MainApp and I have managed to do so using a SWFLoader.

//MainApp/mainapp.mxml
<s:SWFLoader id="contentLoader"
             loadForCompatibility="true"
             trustContent="true"
             source="http://192.168.10.19:5080/SubApp.swf"/> //Using url

Right now, I need the SubApp to notify the MainApp when a particular button is clicked so that the MainApp can perform some functions (Eg Open/close a sliding window). How can I go about doing it?

In addition, to clarify, is this kind of setup considered as multi-versioned remote sandbox ? Both applications are trust-able and should be able to access each other variables/functions .

Help is greatly appreciated. Thanks.

Since they are in a differant domain, they are sandboxed applications. You can use the following for your case

http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f0d.html#WS2db454920e96a9e51e63e3d11c0bf69084-7f00

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM