As3 Error #2126 Netconnection Object Must Be Connected
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up AS3 error 2126 NetConnection object must be connected up vote 0 down vote favorite i had this working previously but has stopped working and i cant remember changing anything I am getting the following error ArgumentError: Error #2126: NetConnection object must be connected. at flash.net::NetStream/ctor() at flash.net::NetStream() at Classes::AccessCamera/UICompleteHandler() Cannot display source code at this location. Debug session terminated. here is my code fo playing the video: var conn:NetConnection = new NetConnection(); var stream:NetStream = new NetStream(conn); var media:MediaPromise = event.data; trace(media.file.url + " - " + media.relativePath + " - " +media.mediaType); parent.addChild(video); conn.connect(null); //attach a stream to the video-object video.attachNetStream(stream); stream.client = new MobileClient(); //play the stream stream.play(media.file.url); I am stuck on this and cant figure it out any help would be greatly appreciated. actionscript-3 flash stream netstream netconnection share|improve this question asked Feb 4 '14 at 13:17 Lonergan6275 3122525 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted You're supposed to connect NetConnection instance before passing it to NetStream instance. See example at http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html for more info. share|improve this an
ElementsAdobe Dreamweaver Adobe MuseAdobe Animate CCAdobe Premiere ProAdobe After EffectsAdobe IllustratorAdobe InDesignView all communitiesExplore Menu beginsMeet the expertsLearn our productsConnect with your peersError: You don't have JavaScript enabled. This tool uses JavaScript and much of it will not work correctly without it enabled. Please turn JavaScript back on and reload this page. Please enter a title. You can not post a blank message. Please type your message and try again. More discussions in Adobe Media Server All CommunitiesAdobe Media Server 6 Replies Latest reply on Nov 4, 2006 1:42 PM by thedavid ArgumentError: Error #2126: NetConnection object must be connected. thedavid Oct 30, 2006 12:34 AM I have a windows xp computer http://stackoverflow.com/questions/21553631/as3-error-2126-netconnection-object-must-be-connected and a windows 2003 server computer connected with a single network cable. I am running Flash Media Server on the server computer. My Flex Builder 2 application can connect to the Flash Media Server on the other computer, but I always get the following error when trying to use NetStream: nc.connect("rtmp://pb.local:1935/flexmediaservertest"); nsPublish = new NetStream(nc); .... ArgumentError: Error #2126: NetConnection object must be connected. What might be https://forums.adobe.com/thread/86874 causing this error? I have the same question Show 0 Likes(0) 3077Views Tags: none (add) This content has been marked as final. Show 6 replies 1. Re: ArgumentError: Error #2126: NetConnection object must be connected. Melvin_Draco Oct 30, 2006 6:29 AM (in response to thedavid) do you watch the onStatus event? Try something like this: nc = new NetConnection(); nc.onStatus = function(info) { // trace("Level: " + info.level + " Code: " + info.code); if (info.code == "NetConnection.Connect.Success") { //trace("--- connected to: "+this.uri); nsPublish = new NetStream(nc); } else if (info.code == "NetConnection.Connect.Failed" || info.code == "NetConnection.Connect.Closed") { trace("--- No connection to app"); } }; nc.connect("rtmp://pb.local:1935/flexmediaservertest"); Like Show 0 Likes(0) Actions 2. ArgumentError: Error #2126: NetConnection object must be connected. thedavid Oct 30, 2006 5:40 PM (in response to Melvin_Draco) Thanks for the reply. I'll try that and let you know what happens. Like Show 0 Likes(0) Actions 3. ArgumentError: Error #2126: NetConnection object must be connected. thedavid Oct 31, 2006 5:54 AM (in response to thedavid) After banging my head against the computer for 3 days, I finally got my application working, but not with Flex Builder 2. I got it workin with Flash 8. There must b
i want to stream mp3 file located at FMS. The problem is how to do this in AS3 as i m using flash cs3. i done bit http://www.justskins.com/forums/mp3-streaming-using-as3-127645.html but i m getting the error; Mine code is as follow: import flash.net.*; var conn = new NetConnection(); conn.connect("rtmp://192.168.0.106/wss"); var myStream = new NetStream(conn); myStream.play("mp3:rec"); The Error is: ArgumentError: Error #2126: NetConnection object must be connected. at flash.net::NetStream/flash.net:NetStream::construct() at flash.net::NetStream$iinit() at temp_fla::MainTimeline/temp_fla::frame1() Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Connect.Failed at temp_fla::MainTimeline/temp_fla::frame1() Text Text... Thread Tools Show Printable Version Email this Page… Subscribe as3 error to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode October 10th,08:30 AM #1 MP3 streaming using AS3 hi i want to stream mp3 file located at FMS. The problem is how to do this in AS3 as i m using flash cs3. i done bit but i m getting the error; Mine code is as follow: as3 error #2126 import flash.net.*; var conn = new NetConnection(); conn.connect("rtmp://192.168.0.106/wss"); var myStream = new NetStream(conn); myStream.play("mp3:rec"); The Error is: ArgumentError: Error #2126: NetConnection object must be connected. at flash.net::NetStream/flash.net:NetStream::construct() at flash.net::NetStream$iinit() at temp_fla::MainTimeline/temp_fla::frame1() Error #2044: Unhandled NetStatusEvent:. level=error, code=NetConnection.Connect.Failed at temp_fla::MainTimeline/temp_fla::frame1() TextText shrimusic Guest December 7th,06:59 AM #2 Re: MP3 streaming using AS3 On Oct 10, 12:30 am, "shrimusic"