|
Comments
|
Today's Top SOA Links
Flex Integrating Remote Shared Objects with Flex and Flash Communication Server
In this project, a remote shared object on a Flash Communication Server contains data that changes frequently
By: Michael Labriola
Mar. 1, 2006 05:00 PM
Example 2: flexFCS_02.mxml (additions are highlighted) <?xml version="1.0" In this version, I added three important blocks of code:
Second, the SharedRemote component has an id of my_remote1. The service property is set to {my_fcs}, the id of the FCSService component. This allows any FCSService component to have multiple shared remote objects defined. The SharedRemote component also defines event handlers for the failed and status messages. If an end user encounters a problem with the shared object, an alert box displays on the screen. Finally, the initializeApplication handler calls my_fcs.connect(Œrtmp://yourServerName/random' ). The name, random, is the name of the application created when you placed the main.asc file into the random folder on your FCS. When you invoke the connect method, you attempt to make a connection initially through RTMP to FCS. In reality, you actually have several protocols/port combinations which will be tried before a connection occurs. While this concept is outside the scope of this article, please read "Tunneling Macromedia Flash Communications Through Firewalls and Proxy Servers" for more information. If you run the application at this point, you will see a DataGrid, much like the previous example. If an alert box appears, ensure that your Flash Communication Server is running and that you placed the main.asc file in the proper directory as explained in the "Flash Communication Server" section.
The Good Stuff Add the highlighted code below to Example 2 (flexFCS_02.mxml) or, open the solution file, flexFCS_03.mxml, which contains all of the changes. The flexFCS_03.mxml file is included in the fcs_flex_sample.zip that you downloaded in the Requirements section of this article. Reader Feedback: Page 1 of 1
Your Feedback
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||