Hi List, I'm currently wrangling with a problem, that seemed fairly straightforward originally... I have a chat application, to which I need to introduce a new feature that allows the Chat Admin to switch the user that has the floor. This is done by setting a flag in the chat so, which tells all the currently connected users which of them has the floor. So far, so good. But the user who has the floor, also needs to appear in the camera view for all users, whereas in the original application you only had the Admin's camera active. My first idea was to simply switch the publisher - so if the Admin was originally published as "adcam" stream, now the current floor user is published there instead, and so forth. But that didn't seem to work - it generated a "BadName" error. So then I tried to close the stream before republishing, but that doesn't seem to work either, and I'm not entirely sure why. I was tried to sending NetStream.close() and then I tried NetStream.publish(false), but without success. I suspect that maybe the client that started the process should also close it, but I'm not sure. My second idea was to have them all published under their own usernames, and switching to the floor user by playing the appropriate netstream. But for some reason, I can only get "adcam" to publish, even though the other streams are attempting to be played. The relevant code is this: function setStream(newStream:String){ stream = newStream } function publishCam(newStream){ _global.tt("publish cam") setStream(newStream) if (Camera.names.length && parent.enableCam){ cam = Camera.get() startCam() _global.tt ("publishing", stream) ns.publish(stream, "live") } } function startCam(){ _global.tt("start cam") broadcastMessage ("toggleCamMenu", "start") broadcastMessage("attachVideo", cam) ns.attachVideo(cam); } The Xray trace (_global.tt) is showing the right stream name, but it doesn't get published. So my questions are - can you see what's wrong with this code, and which of the two approaches do you think would be a better design? I should mention that this particular project is Flash7 / FlashComm Server (not FMS). Thanks, Karina Karina Steffens | Neo-Archaic new concepts, timeless design <http://www.neo-archaic.net/> www.neo-archaic.net _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com