<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Flex Prodigy</title>
	<atom:link href="http://devflex.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://devflex.wordpress.com</link>
	<description>Its never late to make a right move!</description>
	<lastBuildDate>Fri, 12 Feb 2010 16:08:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='devflex.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Flex Prodigy</title>
		<link>http://devflex.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://devflex.wordpress.com/osd.xml" title="Flex Prodigy" />
	<atom:link rel='hub' href='http://devflex.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Flex +WebORB+PHP = RIA</title>
		<link>http://devflex.wordpress.com/2010/02/12/flex-weborbphp-ria/</link>
		<comments>http://devflex.wordpress.com/2010/02/12/flex-weborbphp-ria/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 16:08:36 +0000</pubDate>
		<dc:creator>dev</dc:creator>
				<category><![CDATA[Dev Flex]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[webORB]]></category>

		<guid isPermaLink="false">http://devflex.wordpress.com/?p=30</guid>
		<description><![CDATA[hi folks,                    here I am going to share an awesome concept of flex interaction with back end technology. WebORB can be considered as midleware server. WebORB is a service infact a library which exposes PHP classes,functions for Flex. And Flex can make direct calls to those functions. WebORB works much similar as Flourine FX [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devflex.wordpress.com&amp;blog=10045527&amp;post=30&amp;subd=devflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>hi folks,</p>
<p>                   here I am going to share an awesome concept of flex interaction with back end technology. WebORB can be considered as midleware server. WebORB is a service infact a library which exposes PHP classes,functions for Flex. And Flex can make direct calls to those functions. WebORB works much similar as Flourine FX for .Net integration with Flex. Using WebORB, you can implement remoting, messaging etc in Flex, which provides you an another choice for backend Integration.</p>
<p>Currently I am working on a BIG project, where I am using WebORB for interaction with PHP, and I am just loving it. I am creating a multilingual Flex UI for a dynamic project. And I&#8217;ll be posting my artical on Multilingual Flex UI soon.</p>
<p>For now lets explore webORB for PHP integration.</p>
<p>For this first of all you need to download webORB library for PHP server. and you can download that from this <a title="webORB for PHP" href="http://www.themidnightcoders.com/products/weborb-for-php/download.html" target="_blank">link</a></p>
<p>once you download this library , you can put the files in any php server and can run the admin console to explore the webORB working with flex.</p>
<p>here is the code snipt of flex remoting:</p>
<p>var remoteObject:RemoteObject = new RemoteObject();<br />
    remoteObject.destination = &#8220;loginService&#8221;;  // PHP class name<br />
    remoteObject.endPoint = &#8220;<a href="http://localhost/weborb/index.php">http://localhost/weborb/index.php</a>&#8220;;<br />
    remoteObject.getUserInfo.addEventListener(&#8220;result&#8221;,onResult);<br />
    remoteObject.addEventListener(&#8220;fault&#8221;, onFault);<br />
    remoteObject.getUserInfo(&#8220;dev&#8221;,&#8221;pwd&#8221;);</p>
<p>upto now we are done with flex-php connection. make sure you have index.php class in your webORB setup.</p>
<p>Now you can see, we are calling php function getUserInfo() directly using Flex Remote Object, by using remote object you can send and recieve any number of value objects.</p>
<p>Main advantage of following this approach is, you dont need to implement data parsing while recieving data XMLs, here you can transfer objects directly and can make your data model more efficient and dynamic.</p>
<p>In many articles you will find a long story of implementing webORB in flex, but as per me, this one is the best and quick approach to get things done in webORB.</p>
<p>Note: for this, you dont need to configure or use any service.xml or remoting.xml or any other xml file. you are doing things inside AS only.</p>
<p>thats it for now will get back with lot more soon.</p>
<p>Cheers</p>
<p>dev.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devflex.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devflex.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devflex.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devflex.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devflex.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devflex.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devflex.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devflex.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devflex.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devflex.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devflex.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devflex.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devflex.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devflex.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devflex.wordpress.com&amp;blog=10045527&amp;post=30&amp;subd=devflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devflex.wordpress.com/2010/02/12/flex-weborbphp-ria/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ea46140330e6d992e24f7fa7358d00d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dev</media:title>
		</media:content>
	</item>
		<item>
		<title>Flash Media Server 3.5</title>
		<link>http://devflex.wordpress.com/2009/10/27/flash-media-server-3-5/</link>
		<comments>http://devflex.wordpress.com/2009/10/27/flash-media-server-3-5/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 07:47:18 +0000</pubDate>
		<dc:creator>dev</dc:creator>
				<category><![CDATA[Dev Flash]]></category>

		<guid isPermaLink="false">http://devflex.wordpress.com/?p=25</guid>
		<description><![CDATA[Reading Server Directory using FMS 3 and Flash CS3 Hi everyone !  you might be aware about power of Adobe Flash using FMS and Flash remoting ! Let me explain a bit about implementing FMS and Remoting on server side, which will enable you to explore server directory just like other server technologies. This is just [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devflex.wordpress.com&amp;blog=10045527&amp;post=25&amp;subd=devflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Reading Server Directory using FMS 3 and Flash CS3</strong></p>
<p>Hi everyone !  you might be aware about power of Adobe Flash using FMS and Flash remoting !</p>
<p>Let me explain a bit about implementing FMS and Remoting on server side, which will enable you to explore server directory just like other server technologies. This is just a another post you can find similar stuff anywhere on net, but I am taking the chance to share what I learnt.</p>
<p>Okay for this you need to have Flash CS3, FMS installed on your system OR any remote server access to implement FMS stuff.</p>
<p><strong>FMS configuration</strong></p>
<p>First of all lets prepare a ASC file for our FMS which will enable our Client to connect and read our Server.</p>
<p>here is the sample code:  dev_streams.asc</p>
<p>load(&#8220;NetServices.asc&#8221;);</p>
<p>application.onAppStart = function() {<br />
  NetServices.setDefaultGatewayUrl(&#8220;<a href="http://localhost/flashservices/gateway">http://localhost/flashservices/gateway</a>&#8220;);<br />
  // Comment the previous line, and uncomment the following line if you are running<br />
  // ColdFusion using the default built-in Web server running on port 8500.<br />
  //NetServices.setDefaultGatewayUrl(&#8220;<a href="http://localhost:8500/flashservices/gateway">http://localhost:8500/flashservices/gateway</a>&#8220;);<br />
  var ncFlashRemoting = NetServices.createGatewayConnection();<br />
  this.frservice = ncFlashRemoting.getService(&#8220;dev_streams.DirectoryUtilities&#8221;, this);<br />
  this.ncAdmin = new NetConnection();<br />
  this.ncAdmin.onStatus = function(info) {<br />
    if(info.code == &#8220;NetConnection.Connect.Success&#8221;) {<br />
      var key = &#8220;Adaptor:_defaultRoot_/VirtualHost:_defaultVhost_/AppsDir&#8221;;<br />
      this.call(&#8220;getConfig&#8221;, application, key, &#8220;/&#8221;);<br />
    }<br />
  };<br />
  this.ncAdmin.connect(&#8220;rtmp://localhost:8500/admin&#8221;, &#8220;a1&#8243;, &#8220;a1&#8243;);<br />
  this.files_so = SharedObject.get(&#8220;files&#8221;);<br />
};</p>
<p>application.onResult = function(value) {<br />
  var application_path = application.name.split(&#8220;/&#8221;);<br />
  var path = value.data + &#8220;\\&#8221; + application_path[0] + &#8220;<a href="//\\streams\\">\\streams\\</a>&#8221; + application_path[1];<br />
  this.file_interval = setInterval(this.frservice, &#8220;getFiles&#8221;, 5000, &#8220;\\&#8221;, path);<br />
  this.frservice.getFiles(&#8220;\\&#8221;, path);<br />
};</p>
<p>application.getFiles_Status = function(info) {<br />
  for(var item in info) {<br />
    trace(item + &#8221; &#8221; + info[item]);<br />
  }<br />
};</p>
<p>application.getFiles_Result = function(files) {<br />
  this.files_so.lock();<br />
  var key;<br />
  var previous_data;<br />
  var update;<br />
  for(var i = 0; i &lt; files.length; i++) {<br />
    key = &#8220;file&#8221; + files[i].PATH.split(&#8220;<a href="//\\&quot;).join">\\&#8221;).join</a>(&#8220;_&#8221;) + &#8220;_&#8221; + files[i].NAME.split(&#8220;.&#8221;)[0];<br />
    previous_data = this.files_so.getProperty(key);<br />
    update = false;<br />
    if(previous_data == null) {<br />
      update = true;<br />
    }<br />
    else {<br />
      for(var item in previous_data) {<br />
        if(previous_data[item] != files[i][item]) {<br />
          update = true;<br />
        }<br />
      }<br />
    }<br />
    if(update) {<br />
      this.files_so.setProperty(key, files[i]);<br />
    }<br />
  }<br />
  var keys = this.files_so.getPropertyNames();<br />
  if(keys == undefined) {<br />
    this.files_so.unlock();<br />
    return;<br />
  }<br />
  var remove;<br />
  for(var i = 0; i &lt; keys.length; i++) {<br />
    remove = true;<br />
    for(var j = 0; j &lt; files.length; j++) {<br />
      key = &#8220;file&#8221; + files[j].PATH.split(&#8220;<a href="//\\&quot;).join">\\&#8221;).join</a>(&#8220;_&#8221;) + &#8220;_&#8221; + files[j].NAME.split(&#8220;.&#8221;)[0];<br />
      if(key == keys[i]) {<br />
        remove = false;<br />
        break;<br />
      }<br />
    }<br />
    if(remove) {<br />
      this.files_so.setProperty(keys[i], null);<br />
    }<br />
  }<br />
  this.files_so.unlock();</p>
<p>};</p>
<p>Now as you can see, we have implemented Flash Remoting here on ASC file for reading server directory using CFM.</p>
<p>let me give some CFM code here: DirectoryUtilities.cfc</p>
<p>&lt;cfcomponent&gt;</p>
<p>  &lt;cffunction name=&#8221;getFiles&#8221; access=&#8221;remote&#8221; return=&#8221;array&#8221;&gt;<br />
    &lt;cfargument name=&#8221;directory_path&#8221; /&gt;<br />
    &lt;cfargument name=&#8221;main_path&#8221; /&gt;<br />
    &lt;cfset var aFiles = &#8220;&#8221; /&gt;<br />
    &lt;cfset var stData = &#8220;&#8221; /&gt;<br />
    &lt;cfdirectory action=&#8221;list&#8221; directory=&#8221;#main_path##directory_path#&#8221; name=&#8221;qFiles&#8221; /&gt;<br />
    &lt;cfset aFiles = ArrayNew(1) /&gt;<br />
    &lt;cfloop query=&#8221;qFiles&#8221;&gt;<br />
      &lt;cfif qFiles.type EQ &#8220;Dir&#8221;&gt;<br />
     &lt;cfif directory_path EQ &#8220;\&#8221;&gt;<br />
    &lt;cfset new_path = &#8220;\&#8221; &amp; qFiles.name /&gt;<br />
  &lt;cfelse&gt;<br />
    &lt;cfset new_path = directory_path &amp; &#8220;\&#8221; &amp; qFiles.name /&gt;<br />
  &lt;/cfif&gt;<br />
        &lt;cfset directory_files = getFiles(new_path, main_path) /&gt;<br />
        &lt;cfloop from=&#8221;1&#8243; to=&#8221;#ArrayLen(directory_files)#&#8221; index=&#8221;i&#8221;&gt;<br />
          &lt;cfset ArrayAppend(aFiles, directory_files[i]) /&gt;<br />
        &lt;/cfloop&gt;<br />
      &lt;cfelse&gt;<br />
        &lt;cfset stData = StructNew() /&gt;<br />
        &lt;cfset stData.name = qFiles.name /&gt;<br />
        &lt;cfset stData.path = directory_path /&gt;<br />
        &lt;cfset stData.main_path = main_path /&gt;<br />
        &lt;cfset ArrayAppend(aFiles, stData) /&gt;<br />
      &lt;/cfif&gt;<br />
    &lt;/cfloop&gt;<br />
    &lt;cfreturn aFiles /&gt;<br />
  &lt;/cffunction&gt;</p>
<p>&lt;/cfcomponent&gt;</p>
<p>upto this our server code is ready to rock!</p>
<p>Now lets prepare Client which will be connecting to FMS server for reading directory</p>
<p>here is the sample AS code: streamList.as</p>
<p>var nc = new NetConnection();<br />
nc.onStatus = function(info) {<br />
  trace(info.code);<br />
};<br />
nc.connect(&#8220;rtmp:/dev_streams&#8221;);<br />
var rso = SharedObject.getRemote(&#8220;files&#8221;, nc.uri);<br />
rso.onSync = function(list) {<br />
  files_list.removeAll();<br />
  for(var item in this.data) {<br />
    files_list.addItem(this.data[item].NAME, this.data[item]);<br />
  }<br />
};<br />
rso.onStatus = function(info) {<br />
  trace(info);<br />
};<br />
rso.connect(nc);</p>
<p>var oListener = new Object();<br />
oListener.change = function(oEvent) {<br />
  var path_array = oEvent.target.value.PATH.split(&#8220;\\&#8221;);<br />
  path_array.shift();<br />
  if(path_array[0] == &#8220;&#8221;) {<br />
    path_array.shift();<br />
  }<br />
  var path = path_array.join(&#8220;/&#8221;);<br />
  if(path.length &gt; 0) {<br />
    path += &#8220;/&#8221;;<br />
  }<br />
  path += oEvent.target.value.NAME.split(&#8220;.&#8221;)[0];<br />
 <br />
  ns.play(path);<br />
  playback_vid.attachVideo(ns);</p>
<p>};<br />
files_list.addEventListener(&#8220;change&#8221;, oListener);</p>
<p>var ns = new NetStream(nc);<br />
ns.onStatus = function(info) {<br />
  trace(info.code);<br />
};</p>
<p>Please take care about List component and video control used in this sample.</p>
<p>We will be going to explore our server for loading videos residing on FMS server and then will stream them to client.</p>
<p>so its done now, you can connect with FMS running SWF file and can stream videos from server directory <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>for details Iam giving some steps to follow..which I might be missed above..</p>
<p>here it is:</p>
<p>* Make a new DEV application directory named dev_streams.<br />
* Copy dev_streams.asc to the new directory.<br />
* Change the username and password in the connect() call in the onAppStart() method of dev_streams.asc.<br />
* Check the gateway URL on the first line of the onAppStart() method. If necessary, make any changes (adding a port, etc.) For example, if using the standalone Web server built into ColdFusion, you may need to change the port to 8500. The .asc file has a line that is commented that you can substitute for the uncommented line if you are running COldFusion at port 8500.<br />
* Make a new subdirectory of dev_streams. Call the directory streams.<br />
* Make a new subdirectory of streams. Call the directory _definst_.<br />
* Make a new subdirectory of _definst_. Call the directory archived.<br />
* Move two .flv files to the _definst_ directory, and move two files to the archived directory.<br />
* Copy DirectoryUtilities.cfc to a directory called dev_streams in the ColdFUsion Web root directory. (Make the directory if you haven&#8217;t already.)<br />
* Run streamsList.swf.</p>
<p>Thats it!!</p>
<p>Cheers!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devflex.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devflex.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devflex.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devflex.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devflex.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devflex.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devflex.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devflex.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devflex.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devflex.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devflex.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devflex.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devflex.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devflex.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devflex.wordpress.com&amp;blog=10045527&amp;post=25&amp;subd=devflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devflex.wordpress.com/2009/10/27/flash-media-server-3-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ea46140330e6d992e24f7fa7358d00d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dev</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex Chat using Blazeds</title>
		<link>http://devflex.wordpress.com/2009/10/22/flex-chat-using-blazeds/</link>
		<comments>http://devflex.wordpress.com/2009/10/22/flex-chat-using-blazeds/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 15:34:18 +0000</pubDate>
		<dc:creator>dev</dc:creator>
				<category><![CDATA[Flex using Blazeds]]></category>

		<guid isPermaLink="false">http://devflex.wordpress.com/?p=15</guid>
		<description><![CDATA[Messaging using Flex and Blaze DS The BlazeDS messaging capability is based on established messaging standards and terminology. BlazeDS messaging provides a client-side API and a corresponding server-side Message Service (BlazeDS Message Service) for creating BlazeDS messaging applications. BlazeDS messaging also enables participation in Java Message Service (JMS) messaging. There are two components available in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devflex.wordpress.com&amp;blog=10045527&amp;post=15&amp;subd=devflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2><a title="Permanent Link: Messaging using Flex and Blaze DS" rel="bookmark" href="http://devflex.wordpress.com/flex-chat-using-blazeds/">Messaging using Flex and Blaze DS</a></h2>
<div>
<div>
<p>The BlazeDS messaging capability is based on established messaging standards and terminology. BlazeDS messaging provides a client-side API and a corresponding server-side Message Service (BlazeDS Message Service) for creating BlazeDS messaging applications. BlazeDS messaging also enables participation in Java Message Service (JMS) messaging.</p>
<p>There are two components available in the Flex frame work for messaging, mx:Producer and mx:Consumer. Producer is the component which is used for producing messages to a destination and Consumer is used for subscribing to a destination and receiving messages published to that destination. Consumer also gives option to filter the messages based on user defined constraints.</p>
<p>I have created a chat application using Flex and Blaze DS. Flex application will use the publish-subscribe messaging mechanism. Flex application checks for new messages using polling mechanism.</p>
<p>This chat application is fully capable of handling dynamic user list and implements login/logout functionality. I have not included any error handling stuff to keep the code as simple as possible.</p>
<p>Thanks to Mr Sujit Reddy, who laid the base and I have extended that here.</p>
<p>We just need to create the client, the server side message handling is provided by Blaze DS. We create an mxml file, which will handle the client logic and configure a destination on the server.</p>
<p><strong>Configuring destination on the server</strong></p>
<p>Navigate to tomcat/webapps/blazeds/WEB-INF/flex under BlazeDS Setup folder and open the file messaging-config.xml. Replace the XML file content with the content below. The ID of the destination added below will be used by the components at the client side.</p>
<p><strong><em>messaging-config.xml</em></strong></p>
<p><span style="color:#666699;">&lt;?xml version=”1.0″ encoding=”UTF-8″?&gt;</span></p>
<p><span style="color:#666699;">&lt;service id=”message-service”</span></p>
<p><span style="color:#666699;">class=”flex.messaging.services.MessageService”&gt;</span></p>
<p><span style="color:#666699;">&lt;adapters&gt;</span></p>
<p><span style="color:#666699;">&lt;adapter-definition id=”actionscript” class=”flex.messaging.services.messaging.adapters.ActionScriptAdapter” default=”true” /&gt;</span></p>
<p><span style="color:#666699;">&lt;/adapters&gt;</span></p>
<p><span style="color:#666699;">&lt;default-channels&gt;</span></p>
<p><span style="color:#666699;">&lt;channel ref=”my-polling-amf”/&gt;</span></p>
<p><span style="color:#666699;">&lt;/default-channels&gt;</span></p>
<p><span style="color:#666699;">&lt;destination id=”chat-application”&gt;</span></p>
<p><span style="color:#666699;">&lt;properties&gt;</span></p>
<p><span style="color:#666699;">&lt;network&gt;</span></p>
<p><span style="color:#666699;">&lt;session-timeout&gt;0&lt;/session-timeout&gt;</span></p>
<p><span style="color:#666699;">&lt;throttle-inbound policy=”ERROR” max-frequency=”50″/&gt;</span></p>
<p><span style="color:#666699;">&lt;throttle-outbound policy=”REPLACE” max-frequency=”500″/&gt;</span></p>
<p><span style="color:#666699;">&lt;/network&gt;</span></p>
<p><span style="color:#666699;">&lt;server&gt;</span></p>
<p><span style="color:#666699;">&lt;max-cache-size&gt;1000&lt;/max-cache-size&gt;</span></p>
<p><span style="color:#666699;">&lt;message-time-to-live&gt;0&lt;/message-time-to-live&gt;</span></p>
<p><span style="color:#666699;">&lt;durable&gt;true&lt;/durable&gt;</span></p>
<p><span style="color:#666699;">&lt;/server&gt;</span></p>
<p><span style="color:#666699;">&lt;/properties&gt;</span></p>
<p><span style="color:#666699;">&lt;/destination&gt;</span></p>
<p><span style="color:#666699;">&lt;/service&gt;</span></p>
<p><span style="font-size:x-small;"><strong><em>remoting-config.xml</em></strong></span></p>
<p style="padding-left:30px;">&lt;destination id=”MySessionHandler” channels=”my-amf”&gt;</p>
<p style="padding-left:30px;">&lt;properties&gt;</p>
<p style="padding-left:30px;">&lt;source&gt;MySessionHandler&lt;/source&gt;</p>
<p style="padding-left:30px;">&lt;/properties&gt;</p>
<p style="padding-left:30px;">&lt;adapter ref=”java-object”/&gt;</p>
<p style="padding-left:30px;">&lt;/destination&gt;</p>
<p> <strong>Here is the Java code which is working as backbone for this app: MySessionHandler.java</strong></p>
<p>import flex.messaging.FlexContext;<br />
import flex.messaging.FlexSession;</p>
<p>public class MySessionHandler {</p>
<p> private FlexSession mySession;<br />
  <br />
 public MySessionHandler()<br />
 {<br />
  mySession= FlexContext.getFlexSession();<br />
  if(mySession.getAttribute(&#8220;myCounter&#8221;) == null)<br />
  {<br />
   mySession.setAttribute(&#8220;myCounter&#8221;, new Integer(1)); <br />
  }<br />
  <br />
  if(mySession.getAttribute(&#8220;userName&#8221;) == null)<br />
  {<br />
   mySession.setAttribute(&#8220;userName&#8221;, &#8220;admin&#8221;); <br />
  }<br />
 }<br />
 <br />
 public String getUserName()<br />
 {<br />
  String userName = null;<br />
  userName = (String)mySession.getAttribute(&#8220;userName&#8221;);<br />
  return userName;<br />
 }<br />
 <br />
 public void addUserName(String userName)<br />
 {<br />
  String userN = null;<br />
  userN = (String)mySession.getAttribute(&#8220;userName&#8221;);<br />
  userN = userN+&#8221;,&#8221;+userName;<br />
  mySession.setAttribute(&#8220;userName&#8221;, userN);<br />
 }<br />
 public void removeUserName(String userName1)<br />
 {<br />
  String userN1 = null;<br />
  userN1 = (String)mySession.getAttribute(&#8220;userName&#8221;);<br />
  String delimiter=&#8221;,&#8221;;<br />
  String[] arr;<br />
  arr = userN1.split(delimiter);<br />
  String userN=null;<br />
  for(int i=0;i&lt;arr.length;i++)<br />
  {<br />
   if(!userName1.equals(arr[i]))<br />
   {<br />
    <br />
    if(userN == null)<br />
    userN = arr[i];<br />
    else<br />
    userN = userN+&#8221;,&#8221;+arr[i];<br />
   }<br />
   <br />
  }<br />
  mySession.setAttribute(&#8220;userName&#8221;, userN);<br />
 }</p>
<p>}</p>
<p>Upto this..we have done with Server setup and Java backend logic. Now  we will prepare Client code for actual Flex chat which is very tricky as there are no direct way for implementing dynamic users list and there status,in Blazeds. However things are working pretty well for me..you guys can give a try with this.</p>
<p><strong>Please download the MXML file from this link:</strong></p>
<p><a title="Flex Chat using BlazeDS MXML code" href="http://advance-flex-dev.googlegroups.com/web/flexMsg.mxml?hl=en&amp;gsc=qddYLAsAAADB4rLvtmt6bB_oDk9a6OWR" target="_blank">flexChat.mxml</a></p>
<p>Thats it..!!</p>
<p> </p>
<p>Cheers&#8230;</p>
<p>dev</p>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/devflex.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/devflex.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/devflex.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/devflex.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/devflex.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/devflex.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/devflex.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/devflex.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/devflex.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/devflex.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/devflex.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/devflex.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/devflex.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/devflex.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devflex.wordpress.com&amp;blog=10045527&amp;post=15&amp;subd=devflex&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://devflex.wordpress.com/2009/10/22/flex-chat-using-blazeds/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6ea46140330e6d992e24f7fa7358d00d?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">dev</media:title>
		</media:content>
	</item>
	</channel>
</rss>
