NetStream.send()

Hi
I used NetStream.send("
Sender ", " parm " ) function to send text .How to define
the function
Sender in client file using AS3.

Sends a message from the server to all subscribing clients is
the short answer.
The long, and awesome, answer can be found here:
http://livedocs.adobe.com/flashmediaserver/3.0/hpdocs/help.html?content=Book_Part_33_cs_as d_1.html

Similar Messages

  • NetStream.send not working in Flash Player 11.2 Beta with Cirrus, Please confirm if it is a bug

    Title
    NetStream.send not working in Flash Player 11.2 Beta with Cirrus, Please confirm if it is a bug or feature
    Description
    Problem Description:
    NetStream.send can not send data to peerstreams when using with cirrus. Conflict with documents.
    Sorry for tag the build as 11.0.1.3 while the bug is actually on 11.2 beta since the bug report system didn't have 11.2 beta yet.
    If you are not responsible for 11.2 beta bug fix, please help a hand to handle this bug to 11.2 team.
    This bug is "killing" to your application, so we really appreciate your help. Thanks.
    ==Publisher==
    nc.connect("rtmfp://");
    var ns:NetStream = new NetStream(nc, NetStream.DIRECT_CONNECTIONS);
    ns.publish("sendtest");
    ...//after connection success.
    ns.send("clientfunction", "ok"); // this line cannot reach subscribers. even if subscribers have client object correctly.
    ==Subscriber==
    nc.connect("rtmfp://");
    var ns:NetStream = new NetStream(nc, cirrusid);
    var client:Object = new Object();
    client.clientfunction = clientfunction; // target function
    ns.client = client;
    ns.play("sendtest");
    Steps to Reproduce:
    1. compile the code in the attachment to SendTestExample.swf (not be able to paste it here)
    2. run it under flash player 11.2.202.19 beta
    3. run it under flash player 11
    Actual Result:
    HeartBeat is:
    Start HeartBeat:
    send hello
    send hello
    send hello
    which means NetStream.send was not able to call "clientfunction" as expected.
    Expected Result:
    Start HeartBeat:
    send hello
    in client function: hello
    send hello
    in client function: hello
    send hello
    in client function: hello
    which can call into the clientfunction as flash player 11 did.
    Any Workarounds:
    I can not find it out since it's an api level bug. But this can be very important for lots of applications which rely on send to do rpc.
    Test Configuration
    IE8, Firefox under Windows 7
    Also have problem under Windows XP (but not well tested on this platform)
    App Language(s)
    ALL
    OS Language(s)
    ALL
    Platform(s)
    Windows 7
    Browser(s)
    Internet Explorer 8.0
    ==Attachment==
    package {
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.events.NetStatusEvent;
        import flash.events.TimerEvent;
        import flash.media.Video;
        import flash.net.NetConnection;
        import flash.net.NetStream;
        import flash.text.TextField;
        import flash.utils.Timer;
        import flash.utils.setTimeout;
        public class SendTestExample extends Sprite
            public static var statusArea:TextField;
            var ncServer:NetConnection = new NetConnection();
            var nsServer:NetStream;
            var ncClient:NetConnection = new NetConnection();
            var nsClient:NetStream;
            var timer:Timer = new Timer(1000);
            public function SendTestExample() {
                ncServer.addEventListener("netStatus", onNCStatusServer);
                ncServer.connect("rtmfp://p2p.rtmfp.net","99f72ccbed0948d7589dc38a-3ce1b2616680");
                statusArea = new TextField();
                status("status");
                statusArea.x = 0;
                statusArea.y = 0;
                statusArea.border = true;
                statusArea.width = 200;
                statusArea.height = 350;
                addChild(statusArea);
            function onNCStatusServer(event:NetStatusEvent):void {
                status("Step 1:");
                status("server: " + event.info.code);
                status("id: " + ncServer.nearID);
                switch (event.info.code) {
                    case "NetConnection.Connect.Success":
                        nsServer = new NetStream(ncServer, NetStream.DIRECT_CONNECTIONS);
                        nsServer.addEventListener(NetStatusEvent.NET_STATUS, onNSStatusServer);
                        nsServer.publish("sendtest");
                        ncServer.removeEventListener(NetStatusEvent.NET_STATUS, onNCStatusServer);
                        ncClient.connect("rtmfp://p2p.rtmfp.net","99f72ccbed0948d7589dc38a-3ce1b2616680");
                        ncClient.addEventListener("netStatus", onNCStatusClient);
                    case "NetStream.Publish.BadName":
                        //status("Please check the name of the publishing stream" );
                        break;
            function onNCStatusClient(event:NetStatusEvent):void {
                status("Step 2:");
                status("client: " + event.info.code);
                status("id: " + ncClient.nearID);
                switch (event.info.code) {
                    case "NetConnection.Connect.Success":
                        nsClient = new NetStream(ncClient, ncServer.nearID);
                        var c:Object = new Object();
                        c["clientfunction"] = clientfunction;
                        nsClient.client = c;
                        nsClient.play("sendtest");
                        ncClient.removeEventListener(NetStatusEvent.NET_STATUS, onNCStatusClient);
                        //setTimeout(sendHello, 5000);
                    case "NetStream.Publish.BadName":
                        //status("Please check the name of the publishing stream" );
                        break;
            protected function onNSStatusServer(event:NetStatusEvent):void {
                status("nsserver: " + event.info.code);
                if (event.info.code == "NetStream.Play.Start") {
                    status("Start HeartBeat:");
                    this.timer.addEventListener(TimerEvent.TIMER, function (e:Event):void {
                        sendHello();
                    this.timer.start();
            protected function sendHello():void {
                status("send hello");
                nsServer.send("clientfunction", "hello");
            protected function status(msg:String):void
                statusArea.appendText(msg + "\n");
                trace("ScriptDebug: " + msg);
            protected function clientfunction(event:Object):void {
                status("in client function: " + event);

    Thanks for reporting. I can reproduce the bug in house. We will investigate.
    Calise

  • Netstream.send only text messages or any type?

    In Netstream.send() documentation it says: " ... arguments
    — Optional arguments that can be of any type."
    In the documentation to the Netstream class it says "You can
    also use NetStream objects to send text messages to all subscribed
    clients (see the NetStream.send() method)."
    I tried to send a Rectangle with Netstream.send:
    Code on Sender:
    var rect = new Rectangle(1,2,5,5);
    nc.call("serverShowRect",null, rect);
    Code on Flash Media Server: (FMS 2.0.4)
    STREAM_NAME = "myStream";
    Client.prototype.serverShowRect= function(msg)
    myStream = Stream.get(STREAM_NAME);
    myStream.send("@setDataFrame","onRectangle",msg);
    Code on Client:
    function onRectangle(infoObject:Object):void {
    trace ("Rectangle received.");
    trace ("tracing properties:");
    var key:String;
    for (key in infoObject) {
    trace(key + ": " + infoObject[key]);
    try {
    var rect:Rectangle = infoObject["rectangle"] as Rectangle;
    trace("Rect as rect:" +rect);
    catch (error:Error){
    trace(error.message);
    The function onRectangle() ist called ok. The infoObject's
    properties can be shown by trace. But I cannot convert infoObject
    into an Rectangle. var rect will be either null or I get an
    type-conversion error.
    Does anyone know how to send other data than Strings using
    Netstream.send()? Or can one actually only send Strings using FMS2

    You should receive an email receipt with every purchase that you make in iTunes on the computer or in iTunes, the App Store or the iBookstore on an iOS device. I always get a receipt via email. You are not getting them?
    If you are asking if Apple will send you a detailed purchase history, the answer to that is no since you can access that information in your account in iTunes on your computer. Click on Account under the Quick links on the right side of iTunes, enter your password at the prompt, and then click on "See all" to the right of Purchase History in the next window.

  • Netstream.send() privacy settings

    I'm using Netstream.send() to transfer a file between two users.
    A previous discussion can be found here:
    http://forums.adobe.com/thread/890122?tstart=0
    It works well except of flash settings issue.
    When trying to access a camera or mic the Flash ask the user for permissions automatically.
    When trying to send a file, the Flash player doesn't show the privacy popup.
    If the user doesn't set his privacy to Allow, the file transfer fails.
    There are two issues:
    1. The privacy settings popup isn't shown automatically.
    2. The privacy popup ask permissions to access the camera and mic and doesn't say anything about data transfer.
    Am I missing something or are the above real issues?
    Thanks

    the P2P access dialog will only show when using RTMFP Groups (NetGroup or a group NetStream).  if you're just doing NetStream.send() on a 1-to-1 (NetStream.DIRECT_CONNECTIONS and new NetStream(netConnection, peerID)) P2P connection, then there is no P2P access dialog.
    if you're doing groups and the P2P access dialog isn't showing up, there are a few possible causes:
      1) for some reason you at one point selected "Deny" *and* checked "Remember"; in that case, Flash Player won't present the dialog and will behave as though you clicked "Deny"
      2) Flash Player's window or region in the browser page is too small for the P2P access dialog.  if the P2P access dialog can't be presented because the window is too small, it will behave as though you clicked "Deny"
      3) there is a known bug in Flash Player when using wmode=direct (which you would use for Stage Video) where, when you set wmode=direct, the P2P access dialog won't be displayed, and the behavior will be as though you clicked "Deny".  this issue will be fixed in a future release of Flash Player. to work around this, set wmode to a different value.

  • NetStream.send() with datareliable=false

    Does NetStream.send() and setting NetStream.datareliable = false make the flash player use UDP? Or does it just use TCP for 1 second and then stop?
    Thanks

    the dataReliable flag doesn't control whether you're using TCP or UDP. if you're using RTMP, you're using TCP because that's what RTMP goes over. if you're using RTMFP, you're using UDP because that's what RTMFP goes over.
    if you're using RTMP, the videoReliable, audioReliable, and dataReliable flags have no effect because TCP is fully reliable all the time.
    those flags only have meaning for RTMFP connections. when video/audio/dataReliable is set to true, RTMFP sends the corresponding message with full reliability, retransmitting it if necessary. if a reliable flag is false, RTMFP will not retransmit the corresponding message, and the message will only remain in the transmission queue for 1 second (so depending on network congestion/throughput, the message might not be transmitted at all).
    messages of different types are sent with different priority in RTMFP. audio is highest priority, then NetStream.send() (data), then video. all RTMFP Groups modes (multicast, posting, directed routing, object replication) are lower priority than video.  priority matters when bandwidth is tight.

  • Optimizing chunks size for filesending with NetStream.send() method

    Hi,
    I would like to implement a p2p filesending application. Unfortunately object replication is not the best solution for this so I need to implement it myself.
    The process is the following:
    Once the user has selected the file for sending, I load it to the memory. After it is completed I cut the file's data into chunks and send these chunks with the NetStream.send() method  - to get the progress of filesending -.
    How can I optimize the size of the chunks for the fastest filesending method or what is the best size for a chunk?

    Hi there
    Please submit a Wish Form to ask for some future version of Captivate to offer such a feature! (Link is in my sig)
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Timing of NetStream.send() calls

    Hello,
    we use NetStream.send() calls to remote control clients
    subscribed to a live stream. We observed that the live video &
    audio stream can get out of sync with the remote calls sent via
    NetStream.send(). In bad cases the remote calls where executed 4
    seconds before the audio/video signal was shown.
    My idea is that NetStream.send() events are created when the
    stream "arrives" at the Flash Player, while the Audio/Video Data
    might be buffered. Can anybody confirm this implementation detail
    of FMS 3.0?
    Any help on this is greatly appreaciated,
    Juergen

    Thanks for reporting. I can reproduce the bug in house. We will investigate.
    Calise

  • Typed objects p2p through netstream.send()

    Can type information be preserved when sending objects using the netstream .send method? I notice when debuggin on the other side that all the objects come through as just that, instances of the object class.
    Could you have a custom object instance, say Person, and send that via rtmfp to the other side and preserve the fact that it is a Person?
    Sean

    Hello. Yes you can preserve the type of the objects when they are sent with NetStream.send(). Just add [RemoteClass] metadata to the class which type you want to preserve.
        [RemoteClass]
        public class NetStreamMessage
              public var id:Number;
              public var data:Object;
              public function NetStreamMessage(data:Object)
                   this.data = data;
        var message:NetStreamMessage = new NetStreamMessage("some message");
        publishNetStream.send("handleMessageReceived",message);

  • Sending metaData with netStream.send is not working

    I'm trying to send metaData from client to FMS server when recording Webcam video and have implemented sending of metaData as stated on Adobe's help page at: http://help.adobe.com/en_US/FlashMediaServer/3.5_Deving/WS5b3ccc516d4fbf351e63e3d11a0773d5 6e-7ff6.html
    However when I play the recorded video  from FMS, my custom metaData properties trace "undefined". I can trace  default metaData properties such as duration or videocodecid  successfully, but not my custom properties such customProp, width or height. Here is part of my code that is related to the issue:
    private function  ncNetStatus(event:NetStatusEvent):void {              
         if  (event.info.code == "NetConnection.Connect.Success") {   
              ns = new NetStream(nc); 
             ns.client = this; 
              ns.publish(webcam_test, "record");   
    private function netStatus(event:NetStatusEvent):void {  
         if  (event.info.code == "NetStream.Publish.Start") {  
              sendMetadata();     
    private function sendMetadata():void {
          trace("sendMetaData() called...");
         myMetadata = new  Object(); 
         myMetadata.customProp = "Welcome to the Live feed of  YOUR LIFE"; 
         ns.send("@setDataFrame", "onMetaData",  myMetadata);
    public function  onMetaData(info:Object):void { 
         trace('videocodecid:  ',info.videocodecid); //returns 2
         trace('customProp:  ',info.customProp); // returns undefined
    And here is my trace result:  
    NetConnection.Connect.Success
    NetStream.Publish.Start
    sendMetaData() called...
    NetStream.Record.Start
    Stopped webcam recording... 
    NetStream.Record.Stop
    NetStream.Unpublish.Success
    NetStream.Play.Reset
    NetStream.Play.Start
    videocodecid: 2 
    customProp: undefined 

    Here is the working code which I have tried at my end. You can see the highlighted line in which the second parameter is 0 which means it will play only recorded stream:
    package {
        import flash.display.MovieClip;
        import flash.net.NetConnection;
        import flash.events.NetStatusEvent;
        import flash.events.MouseEvent;
        import flash.events.AsyncErrorEvent;
        import flash.net.NetStream;
        import flash.media.Video;
        import flash.media.Camera;
        import flash.media.Microphone;
        import fl.controls.Button;
        import fl.controls.Label;
        import fl.controls.TextArea;
        public class Metadata extends MovieClip {
            private var nc:NetConnection;
            private var ns:NetStream;
            private var nsPlayer:NetStream;
            private var vid:Video;
            private var vidPlayer:Video;
            private var cam:Camera;
            private var mic:Microphone;
            private var clearBtn:Button;
            private var startPlaybackBtn:Button;
            private var outgoingLbl:Label;
            private var incomingLbl:Label;
            private var myMetadata:Object;
            private var outputWindow:TextArea;
            public function Metadata(){
                setupUI();
                nc = new NetConnection();
                nc.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
                nc.connect("rtmp://localhost/publishlive");
             *  Clear the MetaData associated with the stream
            private function clearHandler(event:MouseEvent):void {
                if (ns){
                    trace("Clearing MetaData");
                    ns.send("@clearDataFrame", "onMetaData"); 
            private function startHandler(event:MouseEvent):void { 
                displayPlaybackVideo(); 
            private function onNetStatus(event:NetStatusEvent):void { 
                trace(event.target + ": " + event.info.code); 
                switch (event.info.code) 
                    case "NetConnection.Connect.Success": 
                        publishCamera(); 
                        displayPublishingVideo(); 
                        break; 
                    case "NetStream.Publish.Start": 
                        sendMetadata(); 
                        break; 
            private function asyncErrorHandler(event:AsyncErrorEvent):void { 
                trace(event.text); 
            private function sendMetadata():void { 
                trace("sendMetaData() called") 
                myMetadata = new Object(); 
                myMetadata.customProp = "Welcome to the Live feed of YOUR LIFE, already in progress."; 
                ns.send("@setDataFrame", "onMetaData", myMetadata); 
            private function publishCamera():void { 
                cam = Camera.getCamera(); 
                mic = Microphone.getMicrophone(); 
                ns = new NetStream(nc); 
                ns.client = this; 
                ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus); 
                ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); 
                ns.attachCamera(cam); 
                ns.attachAudio(mic); 
                ns.publish("myCamera", "record"); 
            private function displayPublishingVideo():void { 
                vid = new Video(cam.width, cam.height); 
                vid.x = 10; 
                vid.y = 10; 
                vid.attachCamera(cam); 
                addChild(vid);  
            private function displayPlaybackVideo():void { 
                nsPlayer = new NetStream(nc); 
                nsPlayer.client = this; 
                nsPlayer.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus); 
                nsPlayer.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler); 
                nsPlayer.play("myCamera",0); 
                vidPlayer = new Video(cam.width, cam.height); 
                vidPlayer.x = cam.width + 100; 
                vidPlayer.y = 10; 
                vidPlayer.attachNetStream(nsPlayer); 
                addChild(vidPlayer); 
            private function setupUI():void { 
                outputWindow = new TextArea(); 
                outputWindow.move(250, 175); 
                outputWindow.width = 200; 
                outputWindow.height = 50; 
                outgoingLbl = new Label(); 
                incomingLbl = new Label(); 
                outgoingLbl.width = 150; 
                incomingLbl.width = 150; 
                outgoingLbl.text = "Publishing Stream"; 
                incomingLbl.text = "Playback Stream"; 
                outgoingLbl.move(30, 150); 
                incomingLbl.move(300, 150); 
                startPlaybackBtn = new Button(); 
                startPlaybackBtn.width = 150; 
                startPlaybackBtn.move(250, 345) 
                startPlaybackBtn.label = "View Live Event"; 
                startPlaybackBtn.addEventListener(MouseEvent.CLICK, startHandler); 
                clearBtn = new Button(); 
                clearBtn.width = 100; 
                clearBtn.move(135,345); 
                clearBtn.label = "Clear Metadata"; 
                clearBtn.addEventListener(MouseEvent.CLICK, clearHandler); 
                addChild(clearBtn); 
                addChild(outgoingLbl); 
                addChild(incomingLbl); 
                addChild(startPlaybackBtn); 
                addChild(outputWindow); 
            public function onMetaData(info:Object):void { 
                outputWindow.appendText("Custom Prop : " + info.customProp);  
                trace("Custom Prop : " + info.customProp);
                trace("Videocodecid : " + info.videocodecid);
                trace("Creation Date : " + info.creationdate);
    Hope this solves your query and if still you have the issue then please tell the version of FMS and Player you are using.
    Regards,
    Amit

  • NetStream : send text data

    hi,
    I try to do a really simple chat with NetStream. I would like to send a text on my netstream (I don't want to use camera, only text !)
    I run a red5 server and I use flex 4.5
    As I my new, I don't understand what is the best way to do this. I try code to send video streaming and it works but I can't send text.
    Is somebody have a really simple example to do this ?

    //Simple solution,
    import flash.events.*
    public var chat_so:SharedObject;
    public var nc:NetConnection;
    public var username:String;
    public function createConnection():void
        nc = new NetConnection();
        nc.objectEncoding = ObjectEncoding.AMF0;
        nc.addEventListener( NetStatusEvent.NET_STATUS, netStatusHandler );
        nc.connect( "rtmp://path_to_red5/oflaDemo",username);
    //Then in the netStatusHandler you would need something like this....
    public function netStatusHandler( event:NetStatusEvent ):void
        switch( event.info.code )
            case "NetConnection.Connect.Success":
                 connectComponents()
            break;
            case "NetConnection.Connect.Rejected":
            break;                   
    //This sets up a SyncEvent handler...
    public function connectComponents():void
        SharedObject.defaultObjectEncoding  = flash.net.ObjectEncoding.AMF0;
        chat_so = SharedObject.getRemote("chat_so", nc.uri, false);
        chat_so.addEventListener( SyncEvent.SYNC, usersSyncHandler_chat );
        chat_so.connect( nc );
    //This fires when the sharedObject is updated...
    public function usersSyncHandler_chat( event:SyncEvent ):void
            var results:Object = event.target.data;
            for( var a:String in results )
            if (  results[ a ] != undefined )
                 //this will add a message to a text component...
                chatCanvas.htmlText += "" + results[ a ];
                chatCanvas.validateNow();
                chatCanvas.verticalScrollPosition = chatCanvas.maxVerticalScrollPosition;
    //this button or key listener function will send a message by updating a sharedObject on all clients...
    public function sendMessage():void
          //grab message from an input text component.
          var msg:String = chatInputTxt.text;
          //send the msg...
          chat_so.setProperty("textValue", username + ": " + msg );
          //clear text from chatInputTxt.text
          chatInputTxt.text = "";
    HTH

  • How to send object by NetStream?

    Hi, I have question about using Cirrus in real time game developed. I want to create a game in which each player will be able to move a character using the arrow keys. And here comes my question.How do I continuously transfer an object or variable via NetStream. Should I use the send() method (when a player is in motion), or maybe it's possible to send and receive an object using publish() and play().
    I spent a lot of time looking for solutions on the internet, but with no succes. Everything that I've found was about transmission of audio and video (attachAudio() and attachVideo()), I need a method such as attachObject(), which could continuously send for example player's position.
    I found P2PGameLibrary on Tom Krcha's site (www.flashrealtime.com). Unfortunately, it is in the  .swc file and when I use FlashDevelop to open it, it shows only the model of classes and methods. If I could see the entire code, I could study it and maybe it would solve my problem.
    If someone could give an example of how to send objects/variables by NetStream, I would be grateful.
    swO_orn

    Thanks for fast answer.
    Yes I have build a simple chat p2p using only NetGroup, and sending messages by method post(). The one "bad thing" I nothiced is delay. I got about 500ms. That's too much for real time games.
    I have watch some tutorials on Tom Krcha's blog and they said I should build full mesh of direct connections of all users to make P2P game.
    Let's say I want to have 6 players sending and receiving info in game. What's the best way to transfer data between them? NetGroup.post() or NetStream.send() or maybe another?
    PS: Please give me an example how to receive data in NetStream if data was transfered by send() method.
    Doc says :
    send(handlerName:String, ... arguments):void
    How do I start handler on receiver app?

  • How to send data back to publishing stream

    Hi,
    Environment: ActionScript3.0, FMS, Flash Project created in Flash Develop
    How to send data back to publishing stream? I need to send data back to publishing stream.
    Using NetStream.send() we can send data to subscribers but is it possible to send data from subscriber back to publisher using any NetStream method.
    One other solution to this is remoteSharedObject, but if it is possible with NetStream class then let me know.
    Thanks

    There are a number of ways to extract data from CRM On Demand including:
    * Export - manual process, generate CSV file containing CRM On Demand data
    * List/Analytics - manual process, export the contents of a report of list to a CSV
    * Web Services - programmatic, develop an application that queries for data within CRMOD
    * Integration Events - programmatic, use workflow to trigger event creation and then poll for events to know when an operation occurs on a record (i.e. Insert of new Account record)
    As for getting that data into another system, that will depend on the system and the methods available for inserting data that it makes available.
    Hope this helps.
    Thanks,
    Sean

  • Handling NetStream

    I'm trying to publish live webcam feed, but I noticed something odd going on.
    After a connection has been made to FMS a user can press a button to start streaming. The button will simply create a netstream and attach audio/video devices to the net stream and start publishing.
    If that user wants to stop publishing I have a differernt button that assigns my netstream to null.  The reason why I do this is because I don't want the user to drop the connection to the server, just stop publishing.
    What's weird is I think the way I'm handling netstream is causing odd things to happen in the Admin Console. If I have 2 users waiting to listen to a stream; I will have 2 clients subscribed to the stream.  When a new user comes in and wants to publish the live stream it doubles the clients already subscribed and gives them another client id that is handling the stream.  If the publisher then decides to stop publishing then it only removes 1 of the duplicated clients from the stream.
    Here's an attempt at a visual of the admin console
    Before Publishing:
    AAAAAA   rtmp   bytesIn  bytesOut  <-- Viewer
    AAAAAB   rtmp   bytesIn  bytesOut  <-- Viewer
    After a user starts publishing:
    AAAAAA   rtmp   bytesIn  bytesOut  <-- Viewer (Client ID made when a connection was made), no longer appears to be used
    AAAAAB   rtmp   bytesIn  bytesOut  <-- Viewer (Client ID made when a connection was made), no longer appears to be used
    AAAAAC   rtmp   bytesIn  bytesOut  <-- Publisher
    AAAAAD   rtmp   bytesIn  bytesOut  <-- Duplicated Viewer that is playing the stream
    AAAAAE   rtmp   bytesIn  bytesOut  <-- Duplicated Viewer that is playing the stream
    After user stops publishing:
    AAAAAA   rtmp   bytesIn  bytesOut  <-- Viewer (Client ID made when a connection was made), no longer appears to be used
    AAAAAB   rtmp   bytesIn  bytesOut  <-- Viewer (Client ID made when a connection was made), no longer appears to be used
    AAAAAC   rtmp   bytesIn  bytesOut  <-- Publisher
    AAAAAE   rtmp   bytesIn  bytesOut  <-- Duplicated Viewer that was playing the stream

    No edge-orgin is set up.
    Inside my main.asc when a stream is started I call application.broadcastmsg() to alert all users a stream is being published.
    UPDATE:
    I changed a lot of my code around and I got everything working now.
    For my publishing side:
    I'm publishing a stream and using ns.close() to close the stream.  I'm no longer using application.broadcastmsg() either anymore, I'm using netstream.send().
    For my client side:
    I've changed the code to use Video instead of FLVPlayback. I  tie my netstream to my video and have my netstream send functions listening.
    New problem I'm having though is on my client side is I can't get a hold of my Video because of the following:
    package {
         public class mainform {
              var video:Video;
              var cc = new CustomClient();
              ns.client = cc;
    class CustomClient {
         public  function started():void {
              How can I get ahold of my video?
         public function stopped():void {
              How can I get ahold of my video?

  • Using netStream.time on rtmp live stream (broadcaster!=receiver)

    I am trying to synchronize a live stream (which is
    broadcasted from the flash player plugin) with some scripted
    actions. The problem is, that the displayed frames of the rtmp
    stream do not correlate to the netStream.time property on the
    receiver side. In fact, i do not understand at all, how the
    property is rendered on the receiver, since i can not recognize any
    dependencies to e.g. bufferLength.
    Does anybody now, how it is calculated? I tried with Red5 and
    Wowza and they seem to behave similar. I guess, FMS would not make
    any difference (if so: lease let me know!), since i assume that the
    property is rendered during the encoding process i.e. by the
    plugin.

    Hello Jay,
    thank you for your answer! NetStream.send() seems to be at
    least a possibility to solve my problem with a workaround.
    I just want to synchronize the time information of the up-
    and downstream: both should have the same time information when
    they show the same visual content (which i called "frame" in the
    former post).
    What i would suppose the netstream.time to be is that if i
    shake my camera on upstream.time=10.0 then downstream.time should
    equal 10.0 when this camera shaking is played back. This is the
    behaviour that i am used to from streaming prerecorded FLVs. But
    with live streams things work out diffferently.
    In fact my downstream.time is bigger than upstream.time. And
    i can not imagine how this can be. If i streamed up for let's say
    20 seconds and i start the downstream after about 10 seconds, i
    would expect my downstream.time to start with 10 seconds and then
    increase continually. But against this, my downstream.time starts
    with something above 20. How can this be? Or back to my initial
    question: how is the downstream.time rendered?
    This behaviour seems not to be dependent on the
    downstream.bufferTime.
    With netStream.send() i could send the upstream.time
    information via the upstream to render an offset for
    downstream.time on receiver side. This should work (have to check
    it), but is a workaround, no "clean" solution.

  • Send images by local p2p

    Hello,
    i'm trying to send an image though my p2p local connection but so far it doesnt work, as far as i know the send to all neighboors method will let me send objects but this objects can only have string data. any ideas? Im thinking in converting my bytearray to base64 string send it and then decode it and use it in my destination application, does anyone know a better way as base 64 takes its time and depending on the file size it can get really slow.
    Thanks!

    sendToAllNeighbors can send any AMF serializable object, including ByteArray (or Object, with ByteArray properties, if you want).
    so can (NetGroup.) sendToNearest, sendToNeighbor, post, writeRequestedObject, and NetStream.send.
    you might need to set the NetConnection's defaultObjectEncoding to AMF3 (flash.net.ObjectEncoding.AMF3) to be able to use ByteArray (since that doesn't exist in AMF0).

Maybe you are looking for

  • Move data from a pc to my mac

    I have a VAIO laptop. I need to move some files onto my Mac. I have a cross over cable but it doesn't fit in a port on the laptop? The only ports I see are usb's and a printer port. There is an ethernet port. I have that plugged into my router. I als

  • How can i transfer a playlist from iPad to windows 7

    how can i transfer a playlist from iPad to windows 7 Thank you

  • Calling webservice from Adobe interactive form

    Hi, I have created RFC based webservice and  Adobe form. I have imported the wsdl into my data connection and mapped my fields accordingly. I have created a pdf and i m trying to call the webservice , initially it pops up 'A webservice is being calle

  • Font display issues

    Upgraded to Lion on an iMac, now I have strange font display issues across applications and in browsers and specifically with numbers, somethimes letters.

  • Got Error  ora-28545 when trying to  establish  connect sqlserver frm orcle

    1) Able to configure ODBC DRIVER CONFIGURATION 2) EDITED LISTNER.ORA FILE SID_LIST_LISTENER01 = (SID_LIST = (SID_DESC = (SID_NAME= MDB) (ORACLE_HOME = C:\app\Administrator\product\11.2.0\dbhome_4) (PROGRAM = hsodbc) (SID_DESC = (SID_NAME = PLSExtProc