This content has been marked as final. Show 5 replies
you can transmit the data in the bitmapdata object and then re-create the bitmapdata object in the receiving swf using the localconnection class.
i'd use two functions in the sending swf and two receiving functions in the receiving swf. one function would determine the bitmapdata object's dimensions and transparency of background color and send those to a receiving function that would use those data to create the bitmapdata object. the 2nd function would loop through each pixel in the bitmapdata object and determine the alpha/color at that pixel and send that to a receiving function that would set the pixel alpha/color of the receiving bitmapdata object.
@kglad: I read a post here recently indicating you can't do that with localconnection for the bitmapdata object itself...I'll try to track it down. I know there's a 40k limit on data sent with localconnection, but there was something else as well. Oh - I see you were talking about the data... well I guess its the 40k limit you'd have to workaround and send it in chunks if its too big - which (when I take the time to read things properly!) you've suggested at the individual pixel level.
here's the link:
So by sending at the individual pixel level you will keep each transmission below the 40K? Would AS3 be fast enough to handle video in this scenario? Do you think it would give a good response time?
What I am trying to build is an desktop app that has a presenter and a viewer screen (dual screen) The presenter can search documents converted to swf or images or video. They would be able to view that document them selves then push what they are viewing to the viewer screen. Also i would add annotation tools. The reason for the second screen instead of a monitor mirror is because we wouldn't want them to see the interface just the content.
Would there be a possible another way to do that. My thought was to use the bitmap data class to create a representation of what the presenter was viewing. I would use mProjector or AIR to make dual full Screen probably. Any ideas would help.
I guess you could attempt it by sending instructions to load and play the same media between the swfs by localconnection (which would be more practical/possible than trying to send the bitmap data but even so it would be difficult to synchronise the two swfs I think). Particularly for video it would be a struggle to achieve synchronisation.. that's gut feel as I've never tried it but
I've seen another comment on here recently asking about synching 2 videos where the answer was that it is only practical for short duration videos (and that was in the same swf... although presumably you could get the actionscript for the instructions to run at pretty much the same time between the swfs because they're both running on the same machine...using a timed approach with the same system clock ).
It seems like overkill (because its on the same machine ) but it sounds like what you need is flash media server or red5.