| By Christophe Coenraets | Article Rating: |
|
| May 23, 2006 06:00 AM EDT | Reads: |
56,460 |
Some people take the dog for a walk, other go play a round of golf. Not Christophe Coenraets. His idea of a good time is to illustrate Flex and JMS integration by extending a simple "realtime feed" application that he built a while back! Web Developer's & Designer's Journal is proud to bring you each month two of the month's best tips from Adobe's intrepid Flex Hero.
Using Flex 2 with Flash Media Server
I recently built a proof of concept that included a call center integration scenario. The use case revolved around a user getting stuck while trying to complete an online process, and engaging in a real time collaboration session with a customer services representative to sort out the problem.
The nature of the collaboration between the end-user and the support representative was very rich and included the following features:
- Chat
- Videoconference / video chat
- The support representative was able to "drive" the end-user's UI
- The support representative was also able to remotely fill in the user's form. In other words, data typed in the support rep's application automatically appeared (in real time) in the user's app.
The application turned out to be really easy to implement with Flex 2:
- Features (1) and (3) were enabled by the new Message Service in Flex 2.
- Feature (4) was enabled by the Data Services in Flex 2. Using the data services, two clients can point to the same destination (the same data set). Changes made by one client are automatically reflected in the other client. No code required!
- Feature (2) was enabled by the Flash Media Server.
To run this example you will have to:
- Install FlexBuilder 2. You can download the beta here: http://labs.adobe.com/.
- Install the Flash Media Server (you can download a free developer edition here: www.adobe.com/products/flashmediaserver/
- Download the sample application code here: http://coenraets.com/apps/fms.zip
- In C:\Program Files\Macromedia\Flash Media Server 2\applications\flex_videoconference, create a directory called flex_videoconference and copy the main.asc file in that directory
- Create a FlexBuilder project and copy fms.mxml and VideoContainer.as in that project
- Run fms.mxml
Embedding HTML in a Flex Application using an IFrame
I have recently been involved in several projects where there was a need to embed HTML content in a Flex application. Depending on the specific requirements of your application, there are a couple of approaches you can use...
- The Flex Text components (Label, Text, TextArea) support basic HTML formatting through their htmlText attribute. You can find an example of this approach in the Samples Explorer where the Code Viewer uses the HTML capabilities of the TextArea to provide syntax coloring.
- You can embed a Flex application in a page that also contains traditional HTML. The Flex application can communicate with the HTML document (and the other way around) through JavaScript. You can also embed multiple Flex applications in a page. These applications can then communicate directly with each others using the LocalConnection API.
In some cases, these approaches may not go far enough: You may need a single Flex application that embeds HTML content with no restriction in terms of HTML tags and features supported.
In this case, another approach is to position an IFrame on top of a specific area of your Flex application to provide a container for the HTML content which will then appear embedded in the application. This technique may initially sound complex or cumbersome to implement, especially if the different containers of your Flex application resize dynamically and you have to keep the IFrame in sync. In the attached example, I abstracted the complexity of this approach in an IFrame component written in mxml. The IFrame component extends Canvas and is used like any other Flex container. Behind the scenes, it acts as a proxy for the actual HTML IFrame (Figure 1). For example, when the IFrame component is resized or moved it automatically asks the HTML document to resize/move the actual IFrame.
- Run the example (resize the browser window to see how the IFrame is resized accordingly): http://coenraets.com/apps/iframe/index.htm
- Download the example : http://coenraets.com/apps/iframe/iframe.zip
- View the source code: http://coenraets.com/apps/cv.jsp?descriptor=iframe/source.xml
Published May 23, 2006 Reads 56,460
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Christophe Coenraets
Christophe Coenraets currently works as a Senior Technical Evangelist at Adobe. Before joining Adobe, Christophe was an evangelist at Macromedia, focusing on Rich Internet Applications and Enterprise integration. Prior to Macromedia, Christophe was the head of Java and J2EE Technical Evangelism at Sybase, where he started working on Java Enterprise projects in 1996. Before joining Sybase in the US, Christophe held different positions at Powersoft in Belgium, including Principal Consultant for PowerBuilder, and Manager of the Professional Services organization. Before joining Powersoft, Christophe worked as a developer and architect on several retail and BPM projects. Christophe has been a regular speaker at conferences worldwide for the last 10 years.
![]() |
SShah 06/14/06 05:02:53 AM EDT | |||
Hello, i have tried this example but getting the error that NetConnection object cannot be connected.Can anyone help me resolve this issue. |
||||
![]() |
Web Developer's & Designer's Journal 05/22/06 04:16:47 PM EDT | |||
Some people take the dog for a walk, other go play a round of golf. Not Christophe Coenraets. His idea of a good time is to illustrate Flex and JMS integration by extending a simple 'realtime feed' application that he built a while back! Web Developer's & Designer's Journal is proud to bring you each month two of the month's best tips from Adobe's intrepid Flex Hero. |
||||
![]() |
Web Developer's & Designer's Journal 05/22/06 03:30:48 PM EDT | |||
Some people take the dog for a walk, other go play a round of golf. Not Christophe Coenraets. His idea of a good time is to illustrate Flex and JMS integration by extending a simple 'realtime feed' application that he built a while back! Web Developer's & Designer's Journal is proud to bring you each month two of the month's best tips from Adobe's intrepid Flex Hero. |
||||
- Whatever the Apple iPad Is, It Apparently Leaks Like a Sieve
- My Three iPhone Predictions For 2010
- Adobe Fiddles with its Web Apps
- Adaptivity “Platinum Plus Sponsor” of Cloud Expo
- UPDATE: Adobe & IE Implicated as China’s Spy Holes
- Adobe Discusses Cloud Computing
- Development of Ubuntu 10.04 LTS to Incorporate Major Changes
- Microsoft WebsiteSpark: Get New Business Leads to Grow Your Business
- Cloud Expo New York, Prague, and San Francisco Sponsors
- Streaming Media in the Cloud by Amazon and Adobe
- Apple and Emotional Discussions Around Adobe Flash Player
- What Should Be Baked into the New Apple iPad and Why
- Whatever the Apple iPad Is, It Apparently Leaks Like a Sieve
- The Transition to Cloud Computing: What Does It Mean For You?
- Reflections on Java Command Line Options
- My Three iPhone Predictions For 2010
- Adobe Fiddles with its Web Apps
- Adobe Flex Developer Earns $100K in New York City
- Adaptivity “Platinum Plus Sponsor” of Cloud Expo
- Adobe Betas Target RIAs and Cloud Computing
- UPDATE: Adobe & IE Implicated as China’s Spy Holes
- Adobe Discusses Cloud Computing
- Extending SOA to Cloud Computing
- Development of Ubuntu 10.04 LTS to Incorporate Major Changes
- Where Are RIA Technologies Headed in 2008?
- Cover Story: How to Increase the Frame Rates of Your Flash Movies
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Your First Adobe Flex Application with a ColdFusion Backend
- Adobe Flex 2: Advanced DataGrid
- i-Technology Blog: Death-Knell For "Rich Media? Hardly!
- Adobe/Macromedia - Microsoft, Look Out!
- How To Create a Photo Slide Show ...
- Adobe Flex Interface Customization - Themes, Styles, Skins
- Personal Branding Checklist
- Has the Technology Bounceback Begun?
- "Real-World Flex" by Adobe's Christophe Coenraets

























