<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - fms - 2 - docs - 00000052.html</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-25T12:02:36</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/fms/2/docs/00000052.html#90049" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/fms/2/docs/00000052.html#90038" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/fms/2/docs/00000052.html#89876" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/fms/2/docs/00000052.html#89875" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/fms/2/docs/00000052.html#89825" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/fms/2/docs/00000052.html#90049">
		<title>fms/2/docs/00000052.html</title>
		<link>http://livedocs.adobe.com/fms/2/docs/00000052.html#90049</link>
		<description>Yes, when you call application.rejectConnection(client) inside an application.onConnect() handler, the application.onDisconnect() handler also fires. &lt;br&gt;&lt;br&gt;Jody</description>
		<dc:creator>tech_writer_00</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2008-11-25T10:47:42</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/fms/2/docs/00000052.html#90038">
		<title>fms/2/docs/00000052.html</title>
		<link>http://livedocs.adobe.com/fms/2/docs/00000052.html#90038</link>
		<description>It is not cliear to me if application.onDisconnect event is fired also when I do something like:&lt;br /&gt;&lt;br /&gt;application.rejectConnection() inside the application.onConnect() function.&lt;br /&gt;&lt;br /&gt;This is trivial for me as I have to increase/decrease users number.</description>
		<dc:creator>daffi</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-11-25T02:47:07</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/fms/2/docs/00000052.html#89876">
		<title>fms/2/docs/00000052.html</title>
		<link>http://livedocs.adobe.com/fms/2/docs/00000052.html#89876</link>
		<description>PS: You can use &quot;name&quot; instead of &quot;username&quot; -- that wasn't the issue. &lt;br /&gt;&lt;br /&gt;The issue was that you weren't passing null as the second parameter in your call to Client.call(). The syntax for Client.call() is &lt;br /&gt;&lt;br /&gt;clientObject.call(methodName, [resultObj, [p1, ..., pN]])&lt;br /&gt;&lt;br /&gt;If you want to pass optional parameters, you must pass in some value for the resultObj parameter,  if you do not want a return value, pass null. &lt;br /&gt;&lt;br /&gt;http://livedocs.adobe.com/flashmediaserver/3.0/hpdocs/00000260.html#72355</description>
		<dc:creator>tech_writer_00</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-11-20T18:51:25</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/fms/2/docs/00000052.html#89875">
		<title>fms/2/docs/00000052.html</title>
		<link>http://livedocs.adobe.com/fms/2/docs/00000052.html#89875</link>
		<description>Try this, it works for me. In the client FLA file, I have an input text field called nameText, a dynamic text field called statusText, and a button called connectButton. &lt;br&gt;&lt;br&gt;// Server-side script&lt;br&gt;&lt;br&gt;application.onConnect = function(client, username){&lt;br&gt;	client.username = username;&lt;br&gt;	trace(client.username + &quot;: onConnect&quot;);&lt;br&gt;	return true;&lt;br&gt;}&lt;br&gt;&lt;br&gt;application.onDisconnect = function(client){&lt;br&gt;    for (var i = 0; i &lt; application.clients.length; i++){&lt;br&gt;        application.clients[i].call(&quot;userDisconnects&quot;, null, client.username);&lt;br&gt;    }&lt;br&gt;	trace(client.username + &quot;: onDisconnect&quot;);&lt;br&gt;}&lt;br&gt;&lt;br&gt;// Client-side script&lt;br&gt;&lt;br&gt;nc = new NetConnection(); &lt;br&gt;&lt;br&gt;nc.userDisconnects = function(username) {&lt;br&gt;	statusText.text = username + &quot;: disconnected&quot;;&lt;br&gt;}&lt;br&gt;&lt;br&gt;nc.onStatus = function(info:Object){&lt;br&gt;	statusText.text = info.code;&lt;br&gt;}&lt;br&gt;&lt;br&gt;connectButton.onPress = function() {&lt;br&gt;	nc.connect(&quot;rtmp://localhost/testapp&quot;, nameText.text);&lt;br&gt;};&lt;br&gt;&lt;br&gt;Hope that helps -- and I'll update the code in the Server-side ActionScript Language Reference, too!&lt;br&gt;Jody</description>
		<dc:creator>tech_writer_00</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2008-11-20T18:42:09</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/fms/2/docs/00000052.html#89825">
		<title>fms/2/docs/00000052.html</title>
		<link>http://livedocs.adobe.com/fms/2/docs/00000052.html#89825</link>
		<description>Hi,&lt;br /&gt;&lt;br /&gt;I am working on a disconnection script for my game. I have managed to get a unique id to the server and the client fine, the problem is that when the application.onDisconnect = function is called(when client disconnects) i have added a call back to each of the clients using this code:&lt;br /&gt;&lt;br /&gt;for (var i = 0; i &lt; application.clients.length; i++){&lt;br /&gt;        application.clients[i].call(&quot;userDisconnects&quot;, clientObject.name);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;on the client i have added a netConnection.userDisconnects as a function:&lt;br /&gt;&lt;br /&gt;nc.userDisconnects = function(name) {&lt;br /&gt;        console.text += &quot;\nPlayer &quot;+name+&quot; has disconnected&quot;;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This function does get called on disconnections but it doest seem to get the variable passed from the server, it is undefined. I have got the server tracing the clientObject.name correctly. It just doesnt pass the variable.&lt;br /&gt;&lt;br /&gt;Any ideas? Could this be a security thing?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Chris</description>
		<dc:creator>wardy277</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-11-19T09:30:04</dc:date>
	</item>
	</rdf:RDF>

