Do I understand it right,
you want to embedd 2 swf files into a html page and being able to communicate between them ?
Consider a scenario where you have 100s of functions defined in 1 module and another module having another big set of functions .
Now you want to pass some data from module 1 to module 2 function.
This can be easily done by using ExternalInterface which uses concept of PageBus.
You can also call module 2 directly from module 1 by taking instance of module 2 in module 1, but if this module 2 is very big then taking instance will unnecesssarily consume memory.
Using pagebus is a smarter way.
Why would you want to use EI and not some other technique? Data gets
marshalled going through EI and will be slower than using some other
SWF-based sharing technique.
For local connection I will have to take instance of that module, which will unncessarily increase swf size
Consider a case of complex project wherein there are 100 modules passing data amongst each other.
Each module having number of functions
Wii it be a correct way to take instance of modules?
Instead writing a common JS file would resolve my problem, everytime I will have subscribe and publish messages on pagebus.Few lines of code (4-5) for intermodule every communication.No instance nothing.
Taking instance is the only approach for direct intermodule communication.
Read more about pagebus at