« LocalConnection, BrowserInvocation, PseudoThreading? | Main | Flex 3 vs Flex 4 State Management »
360|Flex Teaser – Using LocalConnection
| By Rich Tretola | May 7, 2009 | |
| 6,462 views |
Here is a portion of what I will be covering within my Indianapolis 360|Flex presentation titled “Building an AIR Video Recording Spy Camera with Motion Detection” on Tuesday May 19. 2009 at 4:00 pm.
I will demonstrate how to use LocalConnection to offload some intensive video rendering to a secondary AIR application. However this concept is not possible without first knowing how to use LocalConnection within AIR applications.
So what is LocalConnection?
- LocalConnection is a channel that allows multiple instances of the Flash Player to communicate with each other.
Here is what I will cover in the presentation.
- How to make the connection between AIR applications
- How to maintain the connection between AIR applications
The first image below shows an application titled Primary (LocalConnection Sample)

Primary with no connection
The second image show the same application now connection to a second AIR application titled Slave (LocalConnection Sample)

Primary connected to Slave through LocalConnection
So how is this done? You will have to come to my session to see how I am doing it. If you can’t make the session, I will post some information on this blog after 360|Flex.
Hope to see you there.
Topics: 360Flex, Adobe AIR | 6 Comments »









May 7th, 2009 at 11:38 am
Hey,
Do you have any idea if is possible to connect to a Java VM?
VELO
Reply to this comment
May 7th, 2009 at 12:39 pm
Yes, through Merapi. However at this time, there is no way to start the JVM for the user. Perhaps a future version of AIR will allow this.
Reply to this comment
May 12th, 2009 at 5:39 am
You may be interested in some localConnection code I’ve done. It demos a AIR app passing data chunks to a Flex app.
http://kennethsutherland.com/2009/04/07/localconnection-–-air-flex-and-back-if-you-want/
Check it out, source code is included.
Reply to this comment
July 22nd, 2009 at 2:00 pm
Hello forum. My name Şenol. I made a new web page.
I’ve created 3 flex app.
App Filter, app demand report, app google map.
Companies will be listed in the App Filter SAMPLE ISTANBUL CITY
App demand reports LIST REQUEST
app google map. GOOGLE MAP LOCATION companies to DEMO you write comments
Reply to this comment
October 30th, 2009 at 10:54 pm
Kenneth’s example helped out tremendously.
Thank you for sharing the info all.
Reply to this comment
March 11th, 2010 at 3:57 pm
I found an issue with wildcards not working with flex apps, after a numerous tries, i found out that the domain can not be a wildcard for an air app talking to a flex app.
My domain is https:// so i had to add myConnection.allowDomain(‘app#MyAppName:_myConnectionName’);
This is how I solved it. Hope this helps others in their efforts.
Reply to this comment