I am aware that I can share simple Objects using LocalConnection, but this does not (in my limited testing) appear to work with NetConnection or NetStream.
In short, I wish to have a single SWF that acts as a NetConnection proxy for other SWF files in the HTML page. The client SWFs require direct access to NetStream objects on the proxys NetConnection.
Is this at all feasible, or will each client SWF require its own NetConnection?
I am开发者_开发问答 aware that I could build the entire application in flash and utilize a single NetConnection internally, but this is NOT what I want to do.
Thanks!
That depends on what you want to do with it. NetConnections can stream videos and there is no way to have this shared between different swfs on the same page. On the other hand, they can also be used for simple loading of data. This will likely be small enough to pass through a LocalConnection without issues, but it depends on the size of the data.
You will need to have the NetConnection complete any load before being able to send it through a LocalConnection. The NetConnection will be inaccessible to the other swf's, but it will allow you to load the data and then send it.
Remember: LocalConnections will serialize objects and will not keep the class data when it arrives at its target location.
精彩评论