<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: NetConnection, SharedObject, &#038; NetStream&#8217;s client Property in ActionScript 3</title>
	<atom:link href="http://jessewarden.com/2006/07/netconnection-sharedobject-netstreams-client-property-in-actionscript-3.html/feed" rel="self" type="application/rss+xml" />
	<link>http://jessewarden.com/2006/07/netconnection-sharedobject-netstreams-client-property-in-actionscript-3.html</link>
	<description>A blog on software development, technology, games &#038; movies.</description>
	<pubDate>Sun, 20 Jul 2008 16:37:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Ismael</title>
		<link>http://jessewarden.com/2006/07/netconnection-sharedobject-netstreams-client-property-in-actionscript-3.html#comment-17709</link>
		<dc:creator>Ismael</dc:creator>
		<pubDate>Tue, 09 Oct 2007 23:05:17 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1033#comment-17709</guid>
		<description>Hi
Good to know you were successful to port your client actionsctipt 2.0 to 3.0
I'm been trying to port a simple connection code from 2.0 to 3.0 and I keep getting connection failed in 3.0 whilst it connects fine in 2.0

My 2.0 client-side code:
//==================
var VideoNC:NetConnection;

VideoNC = new NetConnection;
VideoNC.onStatus = function(info) {
		
	trace(info.code);
		if (info.code == "NetConnection.Connect.Success") {
			
			trace("connected");
		} else if (info.code == "NetConnection.Connect.Closed") {
			

		}
	}			

	VideoNC.connect("rtmp://10.211.55.6/learningObjects/");
//This is my local FMS server on my parallels desktop
//==================

I get connection success info code with this

My AS 3.0 client-side code
//==================
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.events.*;

var connection:NetConnection;
var stream:NetStream;

connection = new NetConnection();

connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);

function netStatusHandler(event:NetStatusEvent):void {
	
	trace(event.info.code);
	if (event.info.code == "NetConnection.Connect.Success") {
		//connection.connect(); 
		trace("connect to");
	}

}

connection.connect("rtmp://10.211.55.6/learningObjects/");
//==================

I get connection Failed

My main.asc file in my FMS app folder is:
//==================
application.onAppStart = function () {

	trace("load new app");
}

application.onConnect = function (client) {	

	trace("connect "+client.ip);

	application.acceptConnection(client);

        return true;

}

application.onDisconnect = function(client) {

	trace("disconnect "+client.ip);

}
//==================

Do you have any ideas?
Thanks</description>
		<content:encoded><![CDATA[<p>Hi<br />
Good to know you were successful to port your client actionsctipt 2.0 to 3.0<br />
I&#8217;m been trying to port a simple connection code from 2.0 to 3.0 and I keep getting connection failed in 3.0 whilst it connects fine in 2.0</p>
<p>My 2.0 client-side code:<br />
//==================<br />
var VideoNC:NetConnection;</p>
<p>VideoNC = new NetConnection;<br />
VideoNC.onStatus = function(info) {</p>
<p>	trace(info.code);<br />
		if (info.code == &#8220;NetConnection.Connect.Success&#8221;) {</p>
<p>			trace(&#8221;connected&#8221;);<br />
		} else if (info.code == &#8220;NetConnection.Connect.Closed&#8221;) {</p>
<p>		}<br />
	}			</p>
<p>	VideoNC.connect(&#8221;rtmp://10.211.55.6/learningObjects/&#8221;);<br />
//This is my local FMS server on my parallels desktop<br />
//==================</p>
<p>I get connection success info code with this</p>
<p>My AS 3.0 client-side code<br />
//==================<br />
import flash.net.NetConnection;<br />
import flash.net.NetStream;<br />
import flash.events.*;</p>
<p>var connection:NetConnection;<br />
var stream:NetStream;</p>
<p>connection = new NetConnection();</p>
<p>connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);</p>
<p>function netStatusHandler(event:NetStatusEvent):void {</p>
<p>	trace(event.info.code);<br />
	if (event.info.code == &#8220;NetConnection.Connect.Success&#8221;) {<br />
		//connection.connect();<br />
		trace(&#8221;connect to&#8221;);<br />
	}</p>
<p>}</p>
<p>connection.connect(&#8221;rtmp://10.211.55.6/learningObjects/&#8221;);<br />
//==================</p>
<p>I get connection Failed</p>
<p>My main.asc file in my FMS app folder is:<br />
//==================<br />
application.onAppStart = function () {</p>
<p>	trace(&#8221;load new app&#8221;);<br />
}</p>
<p>application.onConnect = function (client) {	</p>
<p>	trace(&#8221;connect &#8220;+client.ip);</p>
<p>	application.acceptConnection(client);</p>
<p>        return true;</p>
<p>}</p>
<p>application.onDisconnect = function(client) {</p>
<p>	trace(&#8221;disconnect &#8220;+client.ip);</p>
<p>}<br />
//==================</p>
<p>Do you have any ideas?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JesterXL</title>
		<link>http://jessewarden.com/2006/07/netconnection-sharedobject-netstreams-client-property-in-actionscript-3.html#comment-3623</link>
		<dc:creator>JesterXL</dc:creator>
		<pubDate>Thu, 02 Nov 2006 18:45:23 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1033#comment-3623</guid>
		<description>2 things.

First, you need to set the client property to a class that has the methods.  I do it to the class using the SharedObject, like this:

users_so.client = this;

Secondly, the methods on the class that the SharedObject is accessing must be public. If they are protected or private, you'll get an exception.


</description>
		<content:encoded><![CDATA[<p>2 things.</p>
<p>First, you need to set the client property to a class that has the methods.  I do it to the class using the SharedObject, like this:</p>
<p>users_so.client = this;</p>
<p>Secondly, the methods on the class that the SharedObject is accessing must be public. If they are protected or private, you&#8217;ll get an exception.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arocker</title>
		<link>http://jessewarden.com/2006/07/netconnection-sharedobject-netstreams-client-property-in-actionscript-3.html#comment-3622</link>
		<dc:creator>arocker</dc:creator>
		<pubDate>Thu, 02 Nov 2006 15:40:55 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1033#comment-3622</guid>
		<description>May I ask you about the send method.
I cant get it to work ?  problem is i always get a 
null pointer exception as mentioned above , scratch  head ....
How can I implement the callback ? Can you please give me a hint ? 
Thanx in advance :)</description>
		<content:encoded><![CDATA[<p>May I ask you about the send method.<br />
I cant get it to work ?  problem is i always get a<br />
null pointer exception as mentioned above , scratch  head &#8230;.<br />
How can I implement the callback ? Can you please give me a hint ?<br />
Thanx in advance <img src='http://jessewarden.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arocker</title>
		<link>http://jessewarden.com/2006/07/netconnection-sharedobject-netstreams-client-property-in-actionscript-3.html#comment-3621</link>
		<dc:creator>arocker</dc:creator>
		<pubDate>Thu, 02 Nov 2006 15:28:34 +0000</pubDate>
		<guid isPermaLink="false">http://jessewarden.com/?p=1033#comment-3621</guid>
		<description>Hi, 
thx, I have been trying to attach a method to the sharedObject class, which always throws a null pointer exception. Aren't AS3 classes sealed ? 
Thanx for the reminder :) 
forgot about client....</description>
		<content:encoded><![CDATA[<p>Hi,<br />
thx, I have been trying to attach a method to the sharedObject class, which always throws a null pointer exception. Aren&#8217;t AS3 classes sealed ?<br />
Thanx for the reminder <img src='http://jessewarden.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
forgot about client&#8230;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
