<?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/"
	>

<channel>
	<title>SCRIBBLE IT &#187; Flash/Flex</title>
	<atom:link href="http://www.scribbleit.co.uk/blog/category/technology/flashflex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scribbleit.co.uk/blog</link>
	<description>Web Development with WordPress and Thesis</description>
	<lastBuildDate>Mon, 19 Jul 2010 18:16:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Changes in Flex 4 to Flash Builder 4</title>
		<link>http://www.scribbleit.co.uk/blog/2009/07/02/changes-in-flex-4-to-flash-builder-4/</link>
		<comments>http://www.scribbleit.co.uk/blog/2009/07/02/changes-in-flex-4-to-flash-builder-4/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 12:24:00 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[Flash/Flex]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=252</guid>
		<description><![CDATA[Flex has become Flash Builder Beta and, in the process, a number of changes have been made to the earlier version of the Text Layout Framework. The TLF is a revolutionary set of classes that enables you to include very rich text, even editable, into your Flash applications via Flash Builder (or the next version [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Flex has become Flash Builder Beta and, in the process, a number of changes have been made to the earlier version of the Text Layout Framework. The TLF is a revolutionary set of classes that enables you to include very rich text, even editable, into your Flash applications via Flash Builder (or the next version of Flash Pro).<span id="more-252"></span></p>
<p>If you&#8217;ve been experimenting with the TLF in earlier iterations, you&#8217;ll find a few changes in this latest build. Here are the ones I&#8217;ve found.</p>
<ul>
<li>CharacterFormat and ICharacterFormat have been replaced with TextLayoutFormat and ITextLayoutFormat.</li>
<li>applyCharacterFormat has been replaced with applyLeafFormat.</li>
<li>defaultConfiguration.noFocusSelectionFormat and defaultConfiguration.focusSelectionFormat have been replaced with defaultConfiguration.unfocusedSelectionFormat and TextFlow.defaultConfiguration.focusedSelectionFormat.</li>
<li>DisplayObjectContainerController has been replaced with ContainerController</li>
</ul>
<p>In all cases, you can do a simple search/replace since they are just name changes.</p>
<p>If you find any more, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2009/07/02/changes-in-flex-4-to-flash-builder-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reference an MXML object from an AS Object</title>
		<link>http://www.scribbleit.co.uk/blog/2009/02/06/reference-an-mxml-object-from-an-as-object/</link>
		<comments>http://www.scribbleit.co.uk/blog/2009/02/06/reference-an-mxml-object-from-an-as-object/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 11:31:07 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[Flash/Flex]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[MXML]]></category>
		<category><![CDATA[Object]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=169</guid>
		<description><![CDATA[Flex/AS3 can be extremely frustrating, as well as being very powerful. I&#8217;ve spent a couple of days creating a generic class for communicating with PHP, catching the response and sending it back to the calling object. I&#8217;d got fed up with having multiple, almost identical, event catching functions all over the place. So, having done [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Flex/AS3 can be extremely frustrating, as well as being very powerful. I&#8217;ve spent a couple of days creating a generic class for communicating with PHP, catching the response and sending it back to the calling object. I&#8217;d got fed up with having multiple, almost identical, event catching functions all over the place.</p>
<p>So, having done that (not without a struggle) and having received back nicely formatted XML data ready for populating the datagrid on the main MXML page I then found I couldn&#8217;t (or didn&#8217;t know how to) assign that data to the dataProvider property of the datagrid. Flex was telling me that the object didn&#8217;t exist. This is fair enough as it makes sense given the object oriented nature of AS3 but I knew there had to be a way around it. I hit the web and found a few places where the question had been asked, only to find that the arses that responded to the question simply said &#8220;you shouldn&#8217;t do it that way&#8221; or gave a vague explanation when, in fact, a one liner would have done it. Don&#8217;t we coders have enough challenges when creating code without unhelpful &#8220;support&#8221; from our fellows?</p>
<p>Anyway, here it is. To reference an MXML object from any object (assuming you&#8217;ve given it an id)</p>
<blockquote><p>Application.application.<em>nameofobject</em>.<em>property/method</em></p></blockquote>
<p>In my case it was:</p>
<blockquote><p>Application.application.dgorglist.dataProvider=theXMLList;</p></blockquote>
<p>So, in this case, <strong>Application.application</strong> takes the place of <strong>_root</strong> in AS2 applications when referring to properties.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2009/02/06/reference-an-mxml-object-from-an-as-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing Spaces from a String in ActionScript 3</title>
		<link>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/</link>
		<comments>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 15:41:41 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[Flash/Flex]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[remove spaces]]></category>
		<category><![CDATA[spaces]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=167</guid>
		<description><![CDATA[Here&#8217;s a simple, two line function for removing spaces (can be adapted for any other character) from a string in AS3. I used it for removing any spaces typed into a Post Code. public function stripspaces(originalstring:String):String { var original:Array=originalstring.split(&#8221; &#8220;); return(original.join(&#8220;&#8221;)); } All we&#8217;re doing is splitting the array using the space character and then [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Here&#8217;s a simple, two line function for removing spaces (can be adapted for any other character) from a string in AS3. I used it for removing any spaces typed into a Post Code.</p>
<blockquote><p>public function stripspaces(originalstring:String):String<br />
{<br />
var original:Array=originalstring.split(&#8221; &#8220;);<br />
return(original.join(&#8220;&#8221;));<br />
}</p></blockquote>
<p>All we&#8217;re doing is splitting the array using the space character and then joining that array back together into a string with no delimiter, thus eliminating the space.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2009/01/29/removing-spaces-from-a-string-in-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Captivate Loading</title>
		<link>http://www.scribbleit.co.uk/blog/2008/11/28/captivate-loading/</link>
		<comments>http://www.scribbleit.co.uk/blog/2008/11/28/captivate-loading/#comments</comments>
		<pubDate>Fri, 28 Nov 2008 15:40:37 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[Flash/Flex]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[captivate variables]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=153</guid>
		<description><![CDATA[If you&#8217;re a Captivate user, you&#8217;re probably aware that there are a number of Captivate variables that you can access from Flash. In other words, you load up a Captivate SWF inside a Flash movie and can then access some information about that Captivate movie including, for example, the number of slides, the current slide [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>If you&#8217;re a Captivate user, you&#8217;re probably aware that there are a number of Captivate variables that you can access from Flash. In other words, you load up a Captivate SWF inside a Flash movie and can then access some information about that Captivate movie including, for example, the number of slides, the current slide as well as being able to control the Captivate movie to some extent.</p>
<p>The problem I&#8217;ve come across is that I need a way to monitor how much of the Captivate movie has already downloaded and, most importantly, when it&#8217;s finished. This is because most of the variables (eg total number of slides) do not become available until that point. You can&#8217;t use a MovieLoader within the Flash movie (which must be Actionscript 2) because you&#8217;re actually embedding the small skin file Captivate generates rather than the full movie so knowing when that preloads is of no use at all.<span id="more-153"></span></p>
<p>Having banged my head against a brick wall, I&#8217;ve come across the following variable embedded in the Captivate movie which you can use to monitor the download progress.</p>
<blockquote><p>_root.captivate.cpSkinLoader_mc.loading_mc.loading_sub_mc.percent_txt</p></blockquote>
<p>&#8230;where <strong>captivate</strong> is the name of the movieclip in your Flash movie. <strong>percent_txt</strong> is a string containing a number plus a percent sign. So, all you need to do is check to see when it equals &#8220;100%&#8221;. What a relief, now I can get on&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2008/11/28/captivate-loading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search and Replace in Flash/Flex</title>
		<link>http://www.scribbleit.co.uk/blog/2007/08/23/search-and-replace-in-flashflex/</link>
		<comments>http://www.scribbleit.co.uk/blog/2007/08/23/search-and-replace-in-flashflex/#comments</comments>
		<pubDate>Thu, 23 Aug 2007 17:22:44 +0000</pubDate>
		<dc:creator>Kevin Partner</dc:creator>
				<category><![CDATA[Flash/Flex]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.scribbleit.co.uk/blog/?p=24</guid>
		<description><![CDATA[ActionScript 3 is one of the few languages I&#8217;ve ever worked with that lacks a native search and replace string function. In earlier versions of ActionScript it was necessary to hand-write a function to achieve this but AS3 can do it, just not as easily as it should. Not surprisingly, it&#8217;s a method of the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>ActionScript 3 is one of the few languages I&#8217;ve ever worked with that lacks a native search and replace string function. In earlier versions of ActionScript it was necessary to hand-write a function to achieve this but AS3 can do it, just not as easily as it should.</p>
<p><span id="more-24"></span></p>
<p>Not surprisingly, it&#8217;s a method of the string class called &#8220;replace&#8221;. If I wanted to find the first occurence of &#8220;abc&#8221; in a string called myString, and replace it with &#8220;xyz&#8221; I could do it like this:</p>
<blockquote>
<p align="left">var str:String = &#8220;This string has abc in it.&#8221;;<br />
str.replace(&#8220;abc&#8221;, &#8220;xyz&#8221;);</p></blockquote>
<p align="left">Which is all well and fine except that, in nearly all cases when I use replace, I want to replace <strong>all</strong> occurences, not just the first one. To do this is a little more complicated and involves creating a Regular Expression object like this:</p>
<blockquote>
<p align="left">var myRegExp:RegExp=new RegExp(&#8220;abc&#8221;,&#8221;g&#8221;);<br />
var str:String = &#8220;This string has abc abc abc in it.&#8221;;<br />
str.replace(myRegExp, &#8220;xyz&#8221;);</p></blockquote>
<p align="left">This is hardly using Regular Expressions at all but it is making use of the &#8220;g&#8221; flag which tells the replace method to replace all occurences (it stands for &#8220;global&#8221;).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.scribbleit.co.uk/blog/2007/08/23/search-and-replace-in-flashflex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
