Old Articles - 6 years, 3 months ago - 0 Comments
LocalConnection Tip
Ok, imagine the scenario where you have a number of movies on the page, and each movie has to have the capability of sending and recieving data from and to any of the other movies. To achieve this with LocalConnection you have to use a little bit of trickery, because LocalConnection only allows one movie to listen to any given channel at any one time, yet any number of movies can send data along that channel. I have just come across this situation with some work i am doing and my first thought was to create a unique listening channel for each movie with each of the other movies…..
I am using four movies on one page and they all need to be able to send and recieve data to each other using LocalConnection. Therefore with my original thought i would need to create 12 unique channels for each of them to be able to send and recieve to each of the others, the more movies their are on the page, the higher the number of channels will be. Instead i decided to create a relay movie, a fifth movie, which creates a unique listening channel which each of the other four movies on the page, then each of those four movies create a unique listening channel with the relay movie. So we now effectively have a relay system, where each of the four movies on the page can send and recieve data from and to the relay movie using only 8 unique channels as opposed to 12. For any of those four movies to communicate with each other they send a message to the relay movie, which in turn relays the message to each of the other movies and my problem is solved. This solution to a problem, may come in handy for those people worried about the amount of memory each channel uses on the local computer as it obviously reduces that amount by atleast half, the more channels there are, the memory that is used, thus reducing the number of channels reduces the memory usage!
Note: This is an old article!
Please be aware that the content of this article may no longer be accurate and the links contained within could be broken.
Update Notifications
You can add our RSS feed to your favorite feed reader or recieve an email when a new article is posted by entering your email address below.
FLASH EXPERTS
- Andre Michelle
- Aral Balkan
- Big Spaceship
- Chafic Kazoun
- Colin Moock
- Craig Swann
- Erik Natzke
- Grant Skinner
- Jesse Warden
- John Grden
- Keith Peters
- Lee Brimelow
- Lord Alex
- Mario Kingemann
- Matt Voermn
- Ralph Hauwert
- Richard Leggett
- Trevor McCauley
FLASH COMPONENTS
- AFComponents
- Components Network
- Extend Studio
- Flash Relief
- Flash Store
- Flashden
- Flashloaded
- Ghostwire
- Image Vue
- Jumpeye
- Page Flip Component
- Slideshowpro
FLASH VIDEO
- Akamai
- FFMPEG
- FlashComGuru
- Flashstreamworks
- FLV Player
- FLVMDI
- flvPlayerPro
- FLVTool2
- Influxis
- JW FLV Player
- Vital Stream
FLASH RESOURCES
- Actionscript.org
- Adobe Labs
- Developer Center
- Flash Interface
- Flash Player Statistics
- Flashkit
- Kirupa
- MDM Zinc
- OSFlash
- PaperVision3D
- SWXFormat
- Tweener
SPONSORS
More In Actionscript
- Adobe MAKE SOME NOISE
- Undocumented Actionscript 3
- BitmapData.loadBitmap gone in AS3
- Actionscript 3 - New Capabilities
- Flash 8 - setTimeout

