<?xml version="1.0"?>
<!-- RSS generated by Radio UserLand v8.0.7 on Sun, 21 Jul 2002 05:24:11 GMT -->
<rss version="0.92">
	<channel>
		<title>Mike Chambers: Examples</title>
		<link>http://radio.weblogs.com/0106797/categories/examples/</link>
		<description></description>
		<copyright>Copyright 2002 Mike Chambers</copyright>
		<lastBuildDate>Sun, 21 Jul 2002 05:24:11 GMT</lastBuildDate>
		<docs>http://backend.userland.com/rss092</docs>
		<managingEditor>mesh@macromedia.com</managingEditor>
		<webMaster>mesh@macromedia.com</webMaster>
		<cloud domain="radio.xmlstoragesystem.com" port="80" path="/RPC2" registerProcedure="xmlStorageSystem.rssPleaseNotify" protocol="xml-rpc"/>
		<item>
			<title>stringUtils.as</title>
			<link>http://radio.weblogs.com/0106797/files/stringutils/</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Simple library that adds useful methods to the String object. You can view the documentation &lt;/FONT&gt;&lt;A href=&quot;http://radio.weblogs.com/0106797/files/stringutils/&quot;&gt;&lt;FONT face=Verdana size=2&gt;here&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face=Verdana size=2&gt;. This is provided as is, but please post any errors, corrections or suggestions in the comments below.&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;/*&lt;BR&gt;String Utility Component version 1.5&lt;/PRE&gt;&lt;PRE&gt;Mike Chambers&lt;/PRE&gt;&lt;PRE&gt;thanks to Branden Hall, Ben Glazer, Christian Cantrell, Nik Schramm&lt;BR&gt;*/&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;This allows user to check from other include files whether or not the stringUtils&lt;BR&gt;&amp;nbsp;library has been included.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;Example:&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;if(!String.stringUtilsDefined)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;trace(&quot;stringUtils.as not found&quot;);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;*/&lt;BR&gt;String.prototype.constructor.stringUtilsDefined = true;&lt;BR&gt;String.prototype.constructor.stringUtilsVersion = 1.5;&lt;/PRE&gt;&lt;PRE&gt;/**&lt;BR&gt;*&amp;nbsp;This methods trims all of the white space from the left side of a String.&lt;BR&gt;*/&lt;BR&gt;String.prototype.ltrim = function()&lt;BR&gt;{&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;var size = this.length;&lt;BR&gt;&amp;nbsp;for(var i = 0; i &amp;lt; size; i++)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;if(this.charCodeAt(i) &amp;gt; 32)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return this.substring(i);&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;return &quot;&quot;;&lt;/PRE&gt;&lt;PRE&gt;}&lt;/PRE&gt;&lt;PRE&gt;/**&lt;BR&gt;*&amp;nbsp;This methods trims all of the white space from the right side of a String.&lt;BR&gt;*/&lt;BR&gt;String.prototype.rtrim = function()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;var size = this.length;&lt;BR&gt;&amp;nbsp;for(var i = size; i &amp;gt; 0; i--)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;if(this.charCodeAt(i) &amp;gt; 32)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return this.substring(0, i + 1);&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;return &quot;&quot;;&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;/**&lt;BR&gt;*&amp;nbsp;This methods trims all of the white space from both sides of a String.&lt;BR&gt;*/&lt;BR&gt;String.prototype.trim = function()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;return this.rtrim().ltrim();&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;/**&lt;BR&gt;*&amp;nbsp;This methods returns true if the String begins with the string passed into&lt;BR&gt;*&amp;nbsp;the method. Otherwise, it returns false.&lt;BR&gt;*/&lt;/PRE&gt;&lt;PRE&gt;String.prototype.beginsWith = function(s) {&lt;BR&gt;&amp;nbsp;return (s == this.substring(0, s.length));&lt;BR&gt;};&lt;/PRE&gt;&lt;PRE&gt;/**&lt;BR&gt;*&amp;nbsp;This methods returns true if the String ends with the string passed into&lt;BR&gt;*&amp;nbsp;the method. Otherwise, it returns false.&lt;BR&gt;*/&lt;BR&gt;String.prototype.endsWith = function(s) {&lt;BR&gt;&amp;nbsp;return (s == this.substring(this.length - s.length));&lt;BR&gt;};&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&lt;BR&gt;String.prototype.remove = function(remove)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;return this.replace(remove, &quot;&quot;);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;String.prototype.replace = function(replace, replaceWith)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;sb = new String();&lt;BR&gt;&amp;nbsp;&amp;nbsp;found = false;&lt;BR&gt;&amp;nbsp;for (var i = 0; i &amp;lt; this.length; i++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(this.charAt(i) == replace.charAt(0))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;found = true;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var j = 0; j &amp;lt; replace.length; j++)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(!(this.charAt(i + j) == replace.charAt(j)))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;found = false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(found)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;sb += replaceWith;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i = i + (replace.length - 1);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; continue;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sb += this.charAt(i);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return sb;&lt;BR&gt;}&lt;BR&gt;&lt;/PRE&gt;</description>
			</item>
		<item>
			<title>Config.as</title>
			<link>http://radio.weblogs.com/0106797/files/config/</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Simple class that loads config files. You can view the documentation &lt;A href=&quot;http://radio.weblogs.com/0106797/files/config/&quot;&gt;here&lt;/A&gt;. This is provided as is, but please post any errors, corrections or suggestions in the comments below.&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;#include &quot;stringUtils.as&quot;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;Config.as v1.0&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;created by mike chambers : &lt;A href=&quot;mailto:mesh@macromedia.com&quot;&gt;&lt;a href=&quot;mailto:mesh@macromedia.com&quot;&gt;mesh@macromedia.com&lt;/a&gt;&lt;/A&gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;requires stringUtils.as which can be downloaded from:&lt;BR&gt;&amp;nbsp;&lt;A href=&quot;http://radio.weblogs.com/0106797/files/stringutils/&quot;&gt;&lt;a href=&quot;http://radio.weblogs.com/0106797/files/stringutils/&quot;&gt;http://radio.weblogs.com/0106797/files/stringutils/&lt;/a&gt;&lt;/A&gt;&lt;/PRE&gt;&lt;PRE&gt;*/&lt;/PRE&gt;&lt;PRE&gt;&lt;BR&gt;if(!String.stringUtilsDefined)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trace(&quot;Warning : The stringUtils.as file was not loaded. This library is required &quot; +&lt;BR&gt;&amp;nbsp;&amp;nbsp;&quot;by the Config.as file. Please make sure that the stringUtils.as file is &quot; +&lt;BR&gt;&amp;nbsp;&amp;nbsp;&quot;either in the same directory as the Config.as file, or is included in the &quot; +&lt;BR&gt;&amp;nbsp;&amp;nbsp;&quot;Flash MX include path.&quot;);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;if(String.stringUtilsVersion &amp;lt; 1.5)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trace(&quot;Warning : Config.as requires the stringUtils.as version 1.5 or higher. &quot; +&lt;BR&gt;&amp;nbsp;&amp;nbsp;&quot;You are using version : &quot; + String.stringUtilsVersion +&lt;BR&gt;&amp;nbsp;&amp;nbsp;&quot; Please upgrade your stringUtils.as file.&quot;);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&lt;BR&gt;/*&lt;BR&gt;&amp;nbsp;Constructor that takes the path to the config file as an argument&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;Path can be any valid relative or absolute file or url path. Although if &lt;BR&gt;&amp;nbsp;running from a browser,&amp;nbsp; Flash&apos;s security restrictions apply.&lt;BR&gt;*/&lt;BR&gt;_global.Config = function(fileName)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;this.fileName = fileName;&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;Method that allows you to set the path to the config file.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;Path can be any valid relative or absolute file or url path. Although if &lt;BR&gt;&amp;nbsp;running from a browser,&amp;nbsp; Flash&apos;s security restrictions apply.&lt;BR&gt;*/&lt;BR&gt;Config.prototype.setFileName = function(fileName)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;this.fileName = fileName;&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;Returns a string of the path to the current config file.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;If a config file has not been specified, then it returns null;&lt;BR&gt;*/&lt;BR&gt;Config.prototype.getFileName = function()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;return this.fileName;&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;Method which takes a boolean value that indicates whether&lt;BR&gt;&amp;nbsp;or not double quotes surrounding names and values should be removed.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;Default is false.&lt;BR&gt;*/&lt;BR&gt;Config.prototype.setStripQuotes(strip)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;this.stripQuotes = strip;&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;Method which takes a boolean value that indicates whether&lt;BR&gt;&amp;nbsp;or not values that contain commas should be exploded into&lt;BR&gt;&amp;nbsp;an array of values.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;If set to true, calling get() on the name will return an Array.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;If set to false, calling get() on the name will return a string.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;The default is false.&lt;BR&gt;*/&lt;BR&gt;Config.prototype.setExplodeValues(explode)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;this.explodeValues = explode;&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&lt;BR&gt;Config.prototype.onData = function(data)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;if(this.parse(data))&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;this.onConfigLoad(true);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;else&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;this.loaded = false;&lt;BR&gt;&amp;nbsp;&amp;nbsp;this.onConfigLoad(false);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;This is a convenience method that allows you to pass a string&lt;BR&gt;&amp;nbsp;representing a config file to be parsed.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;It returns true if the parsing succeeded, and false if it did not.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;Note, since the method returns immediately, you may access&lt;BR&gt;&amp;nbsp;the data in the object immediately after it has returned true.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;For example: &lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;var c = new Config();&lt;BR&gt;&amp;nbsp;var s = &quot;foo=bar\n&quot;;&lt;BR&gt;&amp;nbsp;s += &quot;name = mike\n&quot;;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;if(c.parse(s))&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;trace(c.get(&quot;foo&quot;));&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;//traces&quot;&gt;//traces&lt;/a&gt; &quot;bar&quot;&lt;BR&gt;&amp;nbsp;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;If the config object has already parsed data, then the new data will be added &lt;BR&gt;&amp;nbsp;to the config object, overwriting any duplicate values that already exist.&lt;BR&gt;*/&lt;BR&gt;Config.prototype.parse = function(data)&lt;BR&gt;{&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;var rows = data.split(&quot;\n&quot;);&lt;BR&gt;&amp;nbsp;var rLength = rows.length;&lt;BR&gt;&amp;nbsp;var tArray = new Array();&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;var rString;&lt;BR&gt;&amp;nbsp;var tName;&lt;BR&gt;&amp;nbsp;var tString;&lt;BR&gt;&amp;nbsp;var c;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;for(var i = 0; i &amp;lt; rLength; i++)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;rString = rows[i];&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;c = rString.charAt(0);&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;if(c == &quot;;&quot; || c == &quot;#&quot; || &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;c == &quot;[&quot; || c == &quot;/&quot;)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;continue;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;tArray = rString.split(&quot;=&quot;);&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;if(tArray.length != 2)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;continue;&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;tName = tArray[0].trim();&lt;BR&gt;&amp;nbsp;&amp;nbsp;tValue = tArray[1].trim();&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;//maybe&quot;&gt;//maybe&lt;/a&gt; write custom loop to strip the quotes in one pass.&lt;BR&gt;&amp;nbsp;&amp;nbsp;if(this.stripQuotes)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(tValue.beginsWith(&quot;\&quot;&quot;))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tValue = tValue.substring(1);&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(tValue.endsWith(&quot;\&quot;&quot;))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tValue = tValue.substring(0, tValue.length - 1);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(tName.beginsWith(&quot;\&quot;&quot;))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tName = tName.substring(1);&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(tName.endsWith(&quot;\&quot;&quot;))&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tName = tName.substring(0, tName.length - 1);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;if(this.explodeValues)&lt;BR&gt;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(tValue.indexOf(&quot;,&quot;) &amp;gt; 0)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;//we&quot;&gt;//we&lt;/a&gt; jsut changed tValue from a string to array;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tValue = tValue.split(&quot;,&quot;);&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;this.configArray[tName] = tValue;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;tValue = null;&lt;BR&gt;&amp;nbsp;&amp;nbsp;tName = null;&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;this.loaded = true;&lt;BR&gt;&amp;nbsp;return true;&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;Takes a string and returns the value for that name in the config file.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;For example:&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;config.ini&lt;BR&gt;&amp;nbsp;foo=bar&lt;BR&gt;&amp;nbsp;name=mike&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;var c = new Config(&quot;config.ini&quot;);&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;c.onConfigLoad = function(success)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;trace(c.get(&quot;foo&quot;));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;//traces&quot;&gt;//traces&lt;/a&gt; &quot;bar&quot;&lt;BR&gt;&amp;nbsp;&amp;nbsp;trace(c.get(&quot;name&quot;));&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href=&quot;//traces&quot;&gt;//traces&lt;/a&gt; &quot;mike&quot;&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;*/&lt;BR&gt;Config.prototype.get = function(hash)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;return this.configArray[hash];&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;Returns an associative array containing the name value&lt;BR&gt;&amp;nbsp;pairs contained within the object.&lt;BR&gt;*/&lt;BR&gt;Config.prototype.getArray = function()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;return this.configArray;&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;This method loads the config file specified in the constructor or&lt;BR&gt;&amp;nbsp;setConfigFile() method, and then parses it.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;Once it has been parsed, the onConfigLoad() method will be&lt;BR&gt;&amp;nbsp;called and passed a boolean value indicating whether the &lt;BR&gt;&amp;nbsp;file was able to be parsed.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;The onConfigLoad method should be over ridden in order to&lt;BR&gt;&amp;nbsp;allow the developer to know when the data has loaded and been parsed.&lt;BR&gt;*/&lt;BR&gt;Config.prototype.loadConfig = function()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;this.loaded = false;&lt;BR&gt;&amp;nbsp;this.load(this.fileName);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;Default values for internal variables within the object.&lt;BR&gt;*/&lt;BR&gt;Config.prototype.configArray = new Array();&lt;BR&gt;Config.prototype.stripQuotes = false;&lt;BR&gt;Config.prototype.explodeValues = false;&lt;/PRE&gt;&lt;PRE&gt;/*&lt;BR&gt;&amp;nbsp;this indicates whether or not the data has loaded. you should be&lt;BR&gt;&amp;nbsp;able to register with with a watch method.&lt;BR&gt;*/&lt;BR&gt;Config.prototype.loaded = false;&lt;BR&gt;Config.prototype.fileName = null;&lt;/PRE&gt;&lt;PRE&gt;/* Extending the LoadVars object. */&lt;BR&gt;Config.prototype.__proto__ = LoadVars.prototype;&lt;BR&gt;Config.prototype.superClass = LoadVars.prototype.constructor;&lt;/PRE&gt;&lt;PRE&gt;Config.prototype.constructor.configDefined = true;&lt;BR&gt;Config.prototype.constructor.configVersion = 1.0;&lt;BR&gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;</description>
			</item>
		<item>
			<title>Flash Remoting and Web Services : Retrieving Stock Quote Information</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/05/10.html#a72</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This is a simple Flash example that calls a Stock quote web service via Flash Remoting. You can find more info on the web service being used below at &lt;A href=&quot;http://www.xmethods.com/ve2/ViewListing.po;jsessionid=lRlMD1-IEsCVGBCh9jUloy3f(QhxieSRM)?serviceid=47221&quot;&gt;xmethods.net&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;1. Download and install the ColdFusion MX &lt;A href=&quot;http://www.macromedia.com/software/trial_download/&quot;&gt;preview release&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;2. Download and install the &lt;A href=&quot;http://www.macromedia.com/software/flash/flashremoting/#200&quot;&gt;Flash Remoting add-ons&lt;/A&gt; for Flash MX.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;3. Create a new Flash movie and enter the the following code in the first frame of the movie.&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;#include &quot;NetServices.as&quot;&lt;/PRE&gt;&lt;PRE&gt;var params = new Object();&lt;/PRE&gt;&lt;PRE&gt;//this is always 0, and is specific to the web service.&lt;BR&gt;params.LicenseKey = &quot;0&quot;;&lt;/PRE&gt;&lt;PRE&gt;//stock symbol we want information about&lt;BR&gt;params.StockSymbol = &quot;macr&quot;;&lt;/PRE&gt;&lt;PRE&gt;//create an object to catch the response from the web service&lt;BR&gt;var result = new Object();&lt;/PRE&gt;&lt;PRE&gt;//data is an object which contains properties with information about the stock.&lt;BR&gt;result.onResult = function(data)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;//loop through all of the properties and print them out&lt;BR&gt;&amp;nbsp;for(var x in data)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;trace(x + &quot; : &quot; + data[x]);&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;}&lt;BR&gt;&amp;nbsp;&lt;BR&gt;//this gets called if an error occurs.&lt;BR&gt;result.onStatus = function(error)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;//print out the error&lt;BR&gt;&amp;nbsp;trace(&quot;Error : &quot; + error.description);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;//the path to the web service&apos;s WSDL file.&lt;BR&gt;var webServiceWSDL = &quot;&lt;A href=&quot;http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl&quot;&gt;&lt;a href=&quot;http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl&quot;&gt;http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl&lt;/a&gt;&lt;/A&gt;&quot;;&lt;BR&gt;var gw = NetServices.createGatewayConnection(&quot;&lt;A href=&quot;http://localhost:8500/flashservices/gateway/&quot;&gt;&lt;a href=&quot;http://localhost:8500/flashservices/gateway/&quot;&gt;http://localhost:8500/flashservices/gateway/&lt;/a&gt;&lt;/A&gt;&quot;);&lt;BR&gt;var service = gw.GetService(webServiceWSDL, result);&lt;/PRE&gt;&lt;PRE&gt;//call a method on the web service, passing params.&lt;BR&gt;service.GetQuote(params);&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Test the movie. You should see the data from the web service print in the Output window.&lt;/FONT&gt; &lt;/PRE&gt;</description>
			</item>
		<item>
			<title>Finding more info on the CF object in ServerSide ActionScript</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/05/10.html#a70</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;&lt;A href=&quot;http://www.person13.com&quot;&gt;Joey Lott&lt;/A&gt; sent the following information to me.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;When using &lt;A href=&quot;http://radio.weblogs.com/0106797/2002/04/30.html#a28&quot;&gt;ServerSide ActionScript&lt;/A&gt; there is an object available called CF with includes methods to make database &lt;A href=&quot;http://radio.weblogs.com/0106797/categories/examples/2002/04/30.html#a27&quot;&gt;queries&lt;/A&gt; and &lt;A href=&quot;http://radio.weblogs.com/0106797/2002/05/07.html#a63&quot;&gt;http&lt;/A&gt; requests. However, it also contains a number of other properties and methods which are undocumented, but could prove to be useful. Remember though, use undocumented features at your own risk as they may be changed or removed in future versions of the product.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Below is some code that shows how to find all of the properties and methods of the CF object on the server.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;First create a file called Names.asr in the &amp;lt;cfinstall&amp;gt;/wwwroot/com/test directory and add the following code:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;function getCF()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;var cfStuff = &quot;&quot;;&lt;BR&gt;&amp;nbsp;for(i in CF)&lt;BR&gt;&amp;nbsp;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;cfStuff += i + &quot;\n&quot;;&lt;BR&gt;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;return cfStuff;&lt;BR&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Next, create a new Flash movie and add the following code:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;#include &quot;NetServices.as&quot;&lt;/PRE&gt;&lt;PRE&gt;var o = new Object();&lt;BR&gt;o.onResult = function(data)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trace(data);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;var gwURL = &quot;&lt;A href=&quot;http://localhost:8500/flashservices/gateway&quot;&gt;&lt;a href=&quot;http://localhost:8500/flashservices/gateway&quot;&gt;http://localhost:8500/flashservices/gateway&lt;/a&gt;&lt;/A&gt;&quot;;&lt;BR&gt;var gw = NetServices.createGatewayConnection(gwURL);&lt;BR&gt;var names = gw.getService(&quot;com.test.Names&quot;, this);&lt;BR&gt;names.getCF();&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Test your movie, and you should see the following output in your Output window:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;removeAttribute&lt;BR&gt;include&lt;BR&gt;getSession&lt;BR&gt;servletContext&lt;BR&gt;page&lt;BR&gt;setAttribute&lt;BR&gt;request&lt;BR&gt;response&lt;BR&gt;toString&lt;BR&gt;initialize&lt;BR&gt;wait&lt;BR&gt;getClass&lt;BR&gt;exception&lt;BR&gt;http&lt;BR&gt;hashCode&lt;BR&gt;popBody&lt;BR&gt;getAttributeNamesInScope&lt;BR&gt;pushBody&lt;BR&gt;getException&lt;BR&gt;class&lt;BR&gt;notify&lt;BR&gt;getRequest&lt;BR&gt;getAttributesScope&lt;BR&gt;release&lt;BR&gt;equals&lt;BR&gt;getPage&lt;BR&gt;getOut&lt;BR&gt;session&lt;BR&gt;getAttribute&lt;BR&gt;getServletConfig&lt;BR&gt;forward&lt;BR&gt;servletConfig&lt;BR&gt;out&lt;BR&gt;findAttribute&lt;BR&gt;notifyAll&lt;BR&gt;handlePageException&lt;BR&gt;getServletContext&lt;BR&gt;query&lt;BR&gt;getResponse&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Pretty cool, heh? If you find some good uses for some of the properties, post them in the comments. Thanks again to &lt;A href=&quot;http://www.person13.com&quot;&gt;Joey Lott&lt;/A&gt; who figured this out.&lt;/FONT&gt;&lt;/P&gt;</description>
			</item>
		<item>
			<title>Creating a Proxy for Flash using Flash Remoting and ServerSide ActionScript</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/05/07.html#a62</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This is a simple example that shows how to make a proxy using Flash Remoting and ServerSide ActionScript. The proxy will allow you to load XML and other data into Flash from domains other that the one the Flash movie was loaded from.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;1. Download and install the ColdFusion MX &lt;A href=&quot;http://www.macromedia.com/software/trial_download/&quot;&gt;preview release&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;2. Download and install the &lt;A href=&quot;http://www.macromedia.com/software/flash/flashremoting/#200&quot;&gt;Flash Remoting add-ons&lt;/A&gt; for Flash MX.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Create a file called Proxy.asr in the:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;&lt;EM&gt;&amp;lt;cfhome&amp;gt;/wwwroot/com/macromedia/proxy&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;directory.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Add the following code the Proxy.asr file&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;function getURL(url)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;var stream = CF.http(url).get(&quot;Filecontent&quot;);&lt;BR&gt;&amp;nbsp;return stream;&lt;BR&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This takes a URL as a parameter and retrieves it using CF.http(). The remote data is retrieved by calling get(&quot;Filecontent&quot;) and stored in a variable named stream. The variable and its data is then returned to the Flash movie.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Next, open Flash, and add the following code to the first frame of the movie:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;#include &quot;NetServices.as&quot;&lt;BR&gt;#include &quot;NetDebug.as&quot;&lt;/PRE&gt;&lt;PRE&gt;Result = function(){};&lt;/PRE&gt;&lt;PRE&gt;Result.prototype.onResult = function(data)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trace(&quot;Data : &quot; + data);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;Result.prototype.onStatus = function(error)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trace(&quot;Error : &quot; + error.description);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;var remoteURL = &quot;&lt;A href=&quot;http://www.macromedia.com/desdev/resources/macromedia_resources.xml&quot;&gt;&lt;a href=&quot;http://www.macromedia.com/desdev/resources/macromedia_resources.xml&quot;&gt;http://www.macromedia.com/desdev/resources/macromedia_resources.xml&lt;/a&gt;&lt;/A&gt;&quot;;&lt;/PRE&gt;&lt;PRE&gt;var gw = NetServices.createGatewayConnection(&quot;&lt;A href=&quot;http://localhost:8500/flashservices/gateway&quot;&gt;&lt;a href=&quot;http://localhost:8500/flashservices/gateway&quot;&gt;http://localhost:8500/flashservices/gateway&lt;/a&gt;&lt;/A&gt;&quot;);&lt;BR&gt;var proxy = gw.getService(&quot;com.macromedia.proxy.Proxy&quot;, new Result());&lt;BR&gt;proxy.getURL(remoteURL);&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Test the Flash movie in the authoring environment. You should see the &lt;A href=&quot;http://www.macromedia.com/desdev/articles/xml_resource_feed.html&quot;&gt;Macromedia XML Resource feed&lt;/A&gt; printed out in the debug window. If an error occurs, a description should be printed in the Debug window (or you can check the NetConnection Debugger Window &amp;gt; NetConnection Debugger).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&amp;nbsp;&lt;/P&gt;</description>
			</item>
		<item>
			<title>Example : Integrating Flash MX and Radio</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/05/05.html#a53</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This tutorial demonstrates a simple example of integrating &lt;A href=&quot;http://radio.userland.com&quot;&gt;Radio&lt;/A&gt; with &lt;A href=&quot;http://www.macromedia.com/flash/&quot;&gt;Macromedia Flash MX&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;If you have visited this site before, you may or may not have noticed that the heading at the top of all of my pages is actually a Flash 6 movie. The movie displays the title (left), data from the &lt;A href=&quot;http://www.macromedia.com/desdev/articles/xml_resource_feed.html&quot;&gt;Macromedia XML Resource Feed&lt;/A&gt; (right), and the date that the site was last updated (center). The last updated information actually comes from a Radio macro, and is a good example of a simple way to integrate data from Radio within a Macromedia Flash 6 movie.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;First, lets look at the basic HTML required to display a Flash movie within an HTML page:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;OBJECT classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; &lt;BR&gt;&amp;nbsp;codebase=&lt;BR&gt;&amp;nbsp;&quot;&lt;A href=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&quot;&gt;&lt;a href=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&quot;&gt;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&lt;/a&gt;&lt;/A&gt;&quot;&lt;BR&gt;&amp;nbsp;WIDTH=&quot;100%&quot; HEIGHT=&quot;40&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;PARAM NAME=movie VALUE=&quot;movie.swf&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;PARAM NAME=quality VALUE=high&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;lt;EMBED src=&quot;movie.swf&quot;&amp;nbsp; WIDTH=&quot;100%&quot; HEIGHT=&quot;40&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;TYPE=&quot;application/x-shockwave-flash&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;PLUGINSPAGE=&quot;&lt;A href=&quot;http://www.macromedia.com/go/getflashplayer&quot;&gt;&lt;a href=&quot;http://www.macromedia.com/go/getflashplayer&quot;&gt;http://www.macromedia.com/go/getflashplayer&lt;/a&gt;&lt;/A&gt;&quot;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/EMBED&amp;gt;&lt;BR&gt;&amp;lt;/OBJECT&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Notice that there is EMBED tag within the Object tag. The OBJECT tag is used for browsers that use the ActiveX version of the Flash player, and the EMBED tag is used for all other browsers.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;The code should be pretty self explanatory. The Flash movie to be loaded is specified in the movie attribute of the PARAM tag, and the SRC attribute of the EMBED tag. Note that you can use either relative or absolute paths to specify the Flash movie (.swf).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;In Flash 5, you could pass name / value pairs to the Flash movie by appending them to the end of the path to the Flash movie, like so:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;PARAM NAME=movie VALUE=&quot;movie.swf?foo=bar&quot;&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This technique still works in Flash 6, but has the limitation that the amount of data you can send varies depending on the browser it is running in.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Flash 6 offers a better solution, FlashVars, which allows you to send large amounts of data (i believe it is 64kb) into the Flash movie at runtime. The data is sent as a URL encoded query string of name / value pairs to the Flash movie.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Here is an example:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;OBJECT classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot;&lt;BR&gt;&amp;nbsp;codebase=&lt;BR&gt;&amp;nbsp;&quot;&lt;A href=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&quot;&gt;&lt;a href=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&quot;&gt;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&lt;/a&gt;&lt;/A&gt;&quot;&lt;BR&gt;&amp;nbsp;WIDTH=&quot;100%&quot; HEIGHT=&quot;40&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;PARAM NAME=movie VALUE=&quot;movie.swf&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;PARAM NAME=FlashVars VALUE=&quot;foo=bar&amp;amp;bim=bam%20bam&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;PARAM NAME=quality VALUE=high&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;lt;EMBED src=&quot;movie.swf&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;WIDTH=&quot;100%&quot; HEIGHT=&quot;40&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;flashvars = &quot;foo=bar&amp;amp;bim=bam%20bam&quot; &lt;BR&gt;&amp;nbsp;&amp;nbsp;TYPE=&quot;application/x-shockwave-flash&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;PLUGINSPAGE=&quot;&lt;A href=&quot;http://www.macromedia.com/go/getflashplayer&quot;&gt;&lt;a href=&quot;http://www.macromedia.com/go/getflashplayer&quot;&gt;http://www.macromedia.com/go/getflashplayer&lt;/a&gt;&lt;/A&gt;&quot;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/EMBED&amp;gt;&lt;BR&gt;&amp;lt;/OBJECT&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Notice that we have added a flashvars attributes to both the OBJECT and EMBED tags. When the Flash movie loads, the name / value pairs passed through the FLASHVARS attributes will then be available to the Flash movie on the main timeline.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;So, how do we get data from Radio to Flash? Remember that Radio macros are processed on the server side. If you look at the &lt;A href=&quot;http://127.0.0.1:5335/system/pages/prefs?page=3.1&quot;&gt;main template&lt;/A&gt; for Radio, you will see that the code that creates the HTML to display the last updated date is:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;%if radioResponder.flStaticRendering {return (searchEngine.stripMarkup(now))} else {return (&quot;&quot;)}%&amp;gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This will output the last date and time that the weblog was updated.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;In order to get that data into Flash, we need to specify it in the FlashVars attribute, and we need to URL Encode the data. Here is the code that displays the Flash movie at the top of my pages:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;OBJECT classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot;&lt;BR&gt;&amp;nbsp;codebase=&lt;BR&gt;&amp;nbsp;&quot;&lt;A href=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&quot;&gt;&lt;a href=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&quot;&gt;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0&lt;/a&gt;&lt;/A&gt;&quot;&lt;BR&gt;&amp;nbsp;WIDTH=&quot;100%&quot; HEIGHT=&quot;40&quot; &lt;BR&gt;&amp;nbsp;id=&quot;header&quot; ALIGN=&quot;&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;PARAM NAME=movie VALUE=&quot;/0106797/images/header.swf&quot;&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;PARAM NAME=quality VALUE=high&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;PARAM NAME=bgcolor VALUE=#002039&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;lt;param name=&quot;flashvars&quot; &lt;BR&gt;&amp;nbsp;&amp;nbsp;value=&quot;u=&amp;lt;%if radioResponder.flStaticRendering {&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return (string.urlencode(searchEngine.stripMarkup(now)))} &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else {return (&quot;&quot;)}%&amp;gt;&quot;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&amp;lt;EMBED src=&quot;/0106797/images/header.swf&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;quality=high bgcolor=#002039&amp;nbsp;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;WIDTH=&quot;100%&quot; HEIGHT=&quot;40&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;NAME=&quot;header&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;flashvars=&quot;u=&amp;lt;%if radioResponder.flStaticRendering { &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return (string.urlencode(searchEngine.stripMarkup(now)))} &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;else {return (&quot;&quot;)}%&amp;gt;&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;ALIGN=&quot;&quot; TYPE=&quot;application/x-shockwave-flash&quot;&amp;nbsp; &lt;BR&gt;&amp;nbsp;&amp;nbsp;PLUGINSPAGE=&quot;&lt;A href=&quot;http://www.macromedia.com/go/getflashplayer&quot;&gt;&lt;a href=&quot;http://www.macromedia.com/go/getflashplayer&quot;&gt;http://www.macromedia.com/go/getflashplayer&lt;/a&gt;&lt;/A&gt;&quot;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;lt;/EMBED&amp;gt;&lt;BR&gt;&amp;lt;/OBJECT&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;The code (for the OBJECT tag) that passes the data from Radio to Flash is:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;param name=&quot;flashvars&quot; &lt;BR&gt;&amp;nbsp;value=&quot;u=&amp;lt;%if &lt;BR&gt;&amp;nbsp;&amp;nbsp;radioResponder.flStaticRendering {&lt;BR&gt;&amp;nbsp;&amp;nbsp;return (string.urlencode(searchEngine.stripMarkup(now)))} &lt;BR&gt;&amp;nbsp;&amp;nbsp;else {return (&quot;&quot;)}%&amp;gt;&quot;&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Notice that we embed a &lt;A href=&quot;http://127.0.0.1:5335/system/pages/help?page=13.1&quot;&gt;Radio macro&lt;/A&gt; within the HTML code.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Two other things to note. First, we are storing the last updated string in a variable called u (which, btw is a bad naming convention on my part). Secondly, we URL encode the string using the radio string.urlencode function.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;There is one problem with the code above though. If there are any line returns with the OBJECT tags, Radio will place HTML formating, which will break the tags. Because of this, you must remove all line returns from the HTML code, which in essence places it all on one line.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Update : &lt;A href=&quot;http://www.scriptingnews.com&quot;&gt;Dave Winer&lt;/A&gt; sent along this &lt;A href=&quot;http://radio.userland.com/textEditingCheatSheet#automaticParagraphTags&quot;&gt;link&lt;/A&gt;, which shows how to workaround the issue of Radio inserting HTML markup into your code.&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;param name=&quot;flashvars&quot; value=&quot;u=5%2F5%2F2002;%209%3A21%3A42%20PM&quot;&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;which is a URL encoded string of the last updated date / time.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Within our Flash movie, we have a text field with an instance name of &quot;updated&quot; that will be used to display the last updated time.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Here is all of the code necessary to place the data in the field:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;updated.text = &quot;Updated : &quot; + u;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This says that the text in the updated field should be the string &quot;Updated &quot; plus the value of the variable u (which was passed in through the flashvars tag).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Pretty simple, heh? Of course, this is a very simple example, but using this technique, you could theoretically create an entire weblog in Flash that is&amp;nbsp; managed by Radio (although I am not sure that you would want to).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;If you have any comments, corrections or suggestions, please post them in the comments section.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;Update : Thanks to Greg Burch for pointing out&amp;nbsp;an error&amp;nbsp;(its flashvars and not flashvar).&lt;/FONT&gt;&lt;/P&gt;</description>
			</item>
		<item>
			<title>Getting Started with Flash Remoting and Java within ColdFusion MX</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/05/05.html#a51</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This is an addendum to the following article:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;&lt;A href=&quot;http://www.macromedia.com/desdev/mx/coldfusion/articles/startremoting.html&quot;&gt;Getting Started with ColdFusion MX and Flash Remoting article&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;that uses a Java class deployed in ColdFusion MX to create a service that can be called from Flash via Flash Remoting. Note, currently you must have ColdFusion MX installed in order to use Flash Remoting. However, we will be releasing separate versions for Java servers very soon.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This article assumes that you are familiar with Java and Java concepts.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;1. Open the above article in your web browser.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;2. Download and install the ColdFusion MX preview release.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;3. Download and install the Flash Remoting Addons for Flash MX.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;4. Create HelloWorld.java in the com.macromedia.test package. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;HelloWorld.java should contain the following code:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;--------HelloWorld.java------------&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;package com.macromedia.test; &lt;BR&gt;&lt;BR&gt;&amp;nbsp;&lt;BR&gt;public class HelloWorld&lt;BR&gt;{&amp;nbsp; &lt;BR&gt;&amp;nbsp;public String sayHello()&lt;BR&gt;&amp;nbsp;{ &lt;BR&gt;&amp;nbsp;&amp;nbsp;return &quot;Hello World&quot;;&lt;BR&gt;&amp;nbsp;} &lt;BR&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;---------------------------------------&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;compile this into the &lt;EM&gt;&amp;lt;cfinstall&amp;gt;\runtime\servers\default&lt;/EM&gt; directory.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;There are no changes required in the Flash code. Open the example file in Flash MX and test your movie.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Note : If you have done any of the other versions of the tutorials, you need to rename the &lt;EM&gt;wwwroot\com\macromedia\test&lt;/EM&gt; directory (to ensure that the Java class is called and not the code in the folder).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Of course, this is a really simple example. Play around with passing more complex data such as Arrays, HashMaps and ResultSets. Ill post more information later on how to pass more complex datatypes.&lt;/FONT&gt;&lt;/P&gt;</description>
			</item>
		<item>
			<title>Example : loading data from a data base into Flash MX with Flash Remoting and ServerSide ActionScript</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/04/30.html#a27</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;First, view the following tutorial / example:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;&lt;A href=&quot;http://radio.weblogs.com/0106797/categories/examples/2002/04/29.html#a20&quot;&gt;Example : loading data from a data base into Flash MX with Flash Remoting and CF MX&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;we will use the same Flash MX&amp;nbsp;code in that example, and just change the server side code.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Instead of creating a ColdFusion component called DbTest.cfc, create a file called DbTest.asr. Make&amp;nbsp;sure that you rename the DbTest.cfc to something else if you did the first tutorial.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Add the following to the DbTest.asr file:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;function getData()&lt;BR&gt;{&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;/**create an object to hold our parameters**/&lt;BR&gt;&amp;nbsp;var queryData = new Object();&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;/**set the DSN name pointing to the database**/&lt;BR&gt;&amp;nbsp;queryData.datasource = &quot;CompanyInfo&quot;;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;/**setup our SQL Query**/&lt;BR&gt;&amp;nbsp;queryData.sql = &quot;select * from Employee&quot;;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;/**Execute the query, and store the results in a variable**/&lt;BR&gt;&amp;nbsp;var rs = CF.query(queryData);&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;/**return the RecordSet to flash**/&lt;BR&gt;&amp;nbsp;return rs;&lt;BR&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;You don&apos;t need to change anything in the Flash code. Create the Flash movie according to the directions in the tutorial and test your movie.&lt;/FONT&gt;&lt;/P&gt;</description>
			</item>
		<item>
			<title>Example : loading data from a data base into Flash MX with Flash Remoting and CF MX</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/04/29.html#a20</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Below is sample code that shows how to load data from a data base from Flash MX using Flash Remoting and ColdFusion components.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Download and install the &lt;A href=&quot;http://www.macromedia.com/software/trial_download/&quot;&gt;ColdFusion MX preview release&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Download and install the &lt;A href=&quot;http://www.macromedia.com/software/flash/flashremoting/&quot;&gt;Flash Remoting Addons&lt;/A&gt; for Flash MX.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;You can download the files &lt;A href=&quot;http://radio.weblogs.com/0106797/files/dbtest.zip&quot;&gt;here&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;First create a new ColdFusion component, name it DbTest.cfc and save it in wwwrootcommacromediadbtest&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Here is the component code:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;cfcomponent&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;lt;cffunction name=&quot;getData&quot; access=&quot;remote&quot; returntype=&quot;query&quot;&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;lt;!-- CompanyInfo is a DSN name for an example DB that CFMX sets up by default --&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;cfquery datasource=&quot;CompanyInfo&quot; name=&quot;result&quot;&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;select * from Employee&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;lt;/cfquery&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;lt;cfreturn result /&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&amp;lt;/cffunction&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;lt;/cfcomponent&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Open Flash, and place a Combo Box component on the stage, and give it an instance name of &quot;dataBox&quot;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;add the following ActionScript to the first frame of the Flash movie:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;#include &quot;NetServices.as&quot;&lt;BR&gt;#include &quot;NetDebug.as&quot;&lt;/PRE&gt;&lt;PRE&gt;/** we will use an instance of the Result class to capture&lt;BR&gt;&amp;nbsp;the data from the server **/&lt;BR&gt;Result = function()&lt;BR&gt;{&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;/** onResult is called when data is loaded from the server.&lt;BR&gt;&amp;nbsp;In this case, a RecordSet object will be passed to it **/&lt;BR&gt;Result.prototype.onResult = function(rs)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trace(&quot;Data Received : &quot; + rs.getLength() + &quot; rows.&quot;);&lt;BR&gt;&amp;nbsp;&lt;BR&gt;&amp;nbsp;&lt;a href=&quot;//data&quot;&gt;//data&lt;/a&gt; box is a simple combo box on the stage.&lt;BR&gt;&amp;nbsp;dataBox.setDataProvider(rs);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;/** onStatus is called if any errors occur when communicating&lt;BR&gt;&amp;nbsp;with the server **/&lt;BR&gt;Result.prototype.onStatus = function(error)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;trace(&quot;Error : &quot; + error.description);&lt;BR&gt;}&lt;/PRE&gt;&lt;PRE&gt;/** set the location of the Flash Remoting gateway **/&lt;BR&gt;NetServices.setDefaultGatewayURL(&quot;&lt;A href=&quot;http://localhost:8500/flashservices/gateway&quot;&gt;&lt;a href=&quot;http://localhost:8500/flashservices/gateway&quot;&gt;http://localhost:8500/flashservices/gateway&lt;/a&gt;&lt;/A&gt;&quot;);&lt;BR&gt;var gw = NetServices.createGatewayConnection();&lt;/PRE&gt;&lt;PRE&gt;/** get a reference to the service on the server&lt;BR&gt;&amp;nbsp;First param is the path to the service on the server&lt;BR&gt;&amp;nbsp;Second param is the object to send the server response too **/&lt;BR&gt;var server = gw.getService(&quot;com.macromedia.dbtest.DbTest&quot;, new Result());&lt;/PRE&gt;&lt;PRE&gt;/** call the remote method **/&lt;BR&gt;server.getData();&lt;/PRE&gt;
&lt;P&gt;&lt;BR&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Save your Flash movie, and test. You should see all of the data displayed in the combo box. If it is formatted weird, then make the combo box wider.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;If you get any errors, open the NetConnection Debugger (Windows &amp;gt; NetConnection Debugger) and then retest your movie. This will show all of the communication between Flash and the server.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This is just a simple example, but shows how easy it is to do some pretty complex stuff in Flash MX with Flash Remoting.&lt;/FONT&gt;&lt;/P&gt;</description>
			</item>
		<item>
			<title>Getting Started with ColdFusion MX and Flash Remoting : ServerSide ActionScript</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/04/29.html#a14</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This is an addendum to the following article:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;&lt;A href=&quot;http://www.macromedia.com/desdev/mx/coldfusion/articles/startremoting.html&quot;&gt;Getting Started with ColdFusion MX and Flash Remoting article&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;that uses ServerSide ActionScript instead of a ColdFusion component.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;1. open the above article in your web browser.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;2. download and install the &lt;A href=&quot;http://www.macromedia.com/software/trial_download/&quot;&gt;ColdFusion MX preview release&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;3. Download and install the &lt;A href=&quot;http://www.macromedia.com/software/flash/flashremoting/&quot;&gt;Flash Remoting Addons for Flash MX&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;4. create HelloWorld.asr (the tutorial will tell you where) and add the following code:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;function sayHello()&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;return &quot;Hello World&quot;;&lt;BR&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;open the example file in Flash MX and t&lt;/FONT&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;est your movie.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Of course, this is a really simple example. Play around with passing more complex data such as Arrays and RecordSets. Ill post more information later on how to make database calls, and load remote and local files into ServerSide ActionScript.&lt;/FONT&gt;&lt;/P&gt;</description>
			</item>
		<item>
			<title>Catching server timeout errors when using Flash Remoting</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/04/29.html#a10</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;When calling remote services / methods via &lt;A href=&quot;http://www.macromedia.com/software/flash/flashremoting/&quot;&gt;Flash Remoting&lt;/A&gt;, any errors that occur will trigger the onStatus method to be called:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;onStatus = function(error)&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trace(&quot;Error : &quot; + error.description);&lt;BR&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;However, if Flash cannot connect to the server (network or server is down) onStatus will not be called. Using XML and LoadVars you have to manually keep a timer in order to time out the connection, however you do not have to do this using Flash Remoting. Just create a method like the following:&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;_global.System.onStatus = function(info)&lt;BR&gt;{&lt;BR&gt; trace(&quot;details : &quot; + info.details);&lt;BR&gt; trace(&quot;description : &quot; + info.description);&lt;BR&gt; trace(&quot;code : &quot; + info.code);&lt;BR&gt; trace(&quot;level : &quot; + info.level);&lt;BR&gt;}&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This method will be called if Flash MX cannot connect to the &lt;A href=&quot;http://www.macromedia.com/software/flash/flashremoting/&quot;&gt;Flash Remoting&lt;/A&gt; server.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Here is an example output (when the server is not running):&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;details: &lt;A href=&quot;http://localhost:8500/flashservices/gateway/&quot;&gt;&lt;a href=&quot;http://localhost:8500/flashservices/gateway/&quot;&gt;http://localhost:8500/flashservices/gateway/&lt;/a&gt;&lt;/A&gt;&lt;BR&gt;description: HTTP: Failed&lt;BR&gt;code: NetConnection.Call.Failed&lt;BR&gt;level: error&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;Couple of notes :&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;The exact messages may depend on the browser.&lt;/FONT&gt; 
&lt;LI&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;This will only works when connecting to the server via Flash Remoting. It will not work when using the XML or LoadVars object.&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
			</item>
		<item>
			<title>Calling Web Services from Flash MX</title>
			<link>http://radio.weblogs.com/0106797/categories/examples/2002/04/28.html#a9</link>
			<description>&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;There has been a lot of discussion within the &lt;A href=&quot;http://radio.weblogs.com/0106797/categories/flashMxCommunityForums/&quot;&gt;Flash Community&lt;/A&gt; concerning calling web services from Macromedia Flash. This seems to have been prompted by &lt;A href=&quot;http://www.google.com/&quot;&gt;google&lt;/A&gt;&amp;nbsp;making available a web service&lt;A href=&quot;&quot;&gt;&lt;/A&gt; for their search engine.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;So i thought i would give a quick sneak peek of calling web services from Flash using &lt;A href=&quot;http://www.macromedia.com/software/flash/flashremoting/&quot;&gt;Flash Remoting&lt;/A&gt;. The example linked below calls the &lt;A href=&quot;http://www.google.com/apis/&quot;&gt;google web service&lt;/A&gt; to do a search (i&apos;ll let the code speak for itself).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;The example is commented. Post any questions / comments in the comments section.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana,Geneva,Arial,Helvetica,Sans-Serif size=2&gt;&lt;A href=&quot;http://radio.weblogs.com/0106797/files/flashRemotingSneak.txt&quot;&gt;View Flash / Web Services example&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;</description>
			</item>
		</channel>
	</rss>
