• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Dynamic Publishing

New Here ,
Feb 02, 2012 Feb 02, 2012

Copy link to clipboard

Copied

I seem to have struck a wall with my current project and would appreciate any insight I can get to be put towards the right direction. I will try to explain my scenario in the best way that I can, however, if I fail to do so in some areas, let me know and I will do my best to reiterate. Here goes...

I am trying to push a dynamic variable into the publish method of the NetStream class. The variable is instantiated dynamically and is called in the ActionScript source. To test fluidity and correctiveness of the instantiation and parsing of said variable, I call it to a text field. The text field displays the information derived, as it should. However, when I try to call the said variable into the publish method of the NetStream class, nothing appears to happen on the server end of FMS aside from a randomly generated name and a status of "idle". When I turn the variable into a static variable, it parses fine and publishes on to the server, however the dynamic way of going about it is bringing me to a wall. I hope to have explained this in a way thats understandable and will provide more if needed. Any ideas would be amazing.

Views

713

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 10, 2012 Feb 10, 2012

Copy link to clipboard

Copied

I am not still not clear what exactly you are trying to do. Is it possible to post the code snippet and explain what is your use case?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 06, 2012 Apr 06, 2012

Copy link to clipboard

Copied

LATEST

myXML = new XML(e.target.data);

    var userOne:String = myXML.session.user1[0];

    aT.text = userOne;

   

    var userTwo:String = myXML.session.user2[0];

    ////////////////////////////////////////////

   

    //connect to the Flash Media Server

    var client_nc:NetConnection = new NetConnection();

    client_nc.connect("XXXADDRESSXXX");

    var cam_ns:NetStream = new NetStream(client_nc);

   

    cam_ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

   

    function netStatusHandler(event:NetStatusEvent):void

    {

        switch (event.info.code)

        {

            case "NetConnection.Connect.Success":

            //attach our camera video and audio to the net stream

            cam_ns.attachCamera(mycam);

            cam_ns.attachAudio(mycam_audio);

           

            //publish to our Flash Media Server as a

            //live stream called user_1

            cam_ns.publish(userOne, "live");

           

            //bring in user_2's video/audio

            var in_ns:NetStream = new NetStream(client_nc);

            in_ns.play(userTwo);

           

            //attach user_1's published audio and video

            //so we can see them in the larger chat window

            live_feed.source = "XXXADDRESSXXX" + userTwo;

            //live_feed.attachAudio(in_ns);

           

            cam_feed.source = "XXXADDRESSXXX" + userOne;

            //cam_feed.attachAudio(mycam_audio);

           

            break;

        }

    }

I am trying to push the data called from the XML into a stream as the name

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines