<?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>ryac &#187; Flash</title>
	<atom:link href="http://www.ryac.ca/blog/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryac.ca/blog</link>
	<description>★</description>
	<lastBuildDate>Sat, 27 Aug 2011 05:51:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Robotlegs / AS3 Signals Flickr Example</title>
		<link>http://www.ryac.ca/blog/2011/07/robotlegs-as3-signals-flickr-example/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=robotlegs-as3-signals-flickr-example</link>
		<comments>http://www.ryac.ca/blog/2011/07/robotlegs-as3-signals-flickr-example/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 00:18:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.ryac.ca/blog/?p=38</guid>
		<description><![CDATA[I&#8217;ve been spending some time with Robotlegs these days. I find it great to use and coming from PureMVC it was relatively easy to get the basics down. What really helped me out a lot was Joel Hooks posts: http://joelhooks.com/2011/03/12/an-introduction-to-robotlegs-as3-part-1-context-and-mediators/ http://joelhooks.com/2011/03/12/an-introduction-to-robotlegs-as3-part-2-models/ http://joelhooks.com/2011/03/12/an-introduction-to-robotlegs-as3-part-3-services/ And for working with Signals in RL: http://joelhooks.com/2010/02/14/robotlegs-as3-signals-and-the-signalcommandmap-example/ I&#8217;ve created a simple app to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been spending some time with <a href="http://www.robotlegs.org/" target="_blank">Robotlegs</a> these days. I find it great to use and coming from PureMVC it was relatively easy to get the basics down.</p>
<p>What really helped me out a lot was Joel Hooks posts:</p>
<p><a href="http://joelhooks.com/2011/03/12/an-introduction-to-robotlegs-as3-part-1-context-and-mediators/" target="_blank">http://joelhooks.com/2011/03/12/an-introduction-to-robotlegs-as3-part-1-context-and-mediators/</a><br />
<a href="http://joelhooks.com/2011/03/12/an-introduction-to-robotlegs-as3-part-2-models/" target="_blank"> http://joelhooks.com/2011/03/12/an-introduction-to-robotlegs-as3-part-2-models/</a><br />
<a href="http://joelhooks.com/2011/03/12/an-introduction-to-robotlegs-as3-part-3-services/" target="_blank"> http://joelhooks.com/2011/03/12/an-introduction-to-robotlegs-as3-part-3-services/</a></p>
<p>And for working with Signals in RL:</p>
<p><a href="http://joelhooks.com/2010/02/14/robotlegs-as3-signals-and-the-signalcommandmap-example/" target="_blank">http://joelhooks.com/2010/02/14/robotlegs-as3-signals-and-the-signalcommandmap-example/</a></p>
<p>I&#8217;ve created a <a href="http://www.ryac.ca/experiments/rl-flickr/" target="_blank">simple app</a> to help me understand the communication between mediators, controllers, and models/services. The app searches for photos on Flickr and presents them in a list, clicking on an item in the list loads the photo. I first tried this with using Events, then moved on to using Signals. You can <a href="https://github.com/ryac/rl-flickr" target="_blank">download the source</a> for this on gitub.</p>
<p>Let me know what you think!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryac.ca/blog/2011/07/robotlegs-as3-signals-flickr-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Undocumented &#8220;addFrameScript&#8221; Method</title>
		<link>http://www.ryac.ca/blog/2008/05/the-undocumented-addframescript-method/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-undocumented-addframescript-method</link>
		<comments>http://www.ryac.ca/blog/2008/05/the-undocumented-addframescript-method/#comments</comments>
		<pubDate>Fri, 09 May 2008 01:28:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.ryac.ca/blog/?p=9</guid>
		<description><![CDATA[There&#8217;s a useful function inside the MoveClip class (AS3) that will add script inside a Movieclip on a specific frame without actually having to add it manually to the timeline. This is great if, say you have someone working purely on animation and then someone else working on the interface to hold/play/control the animation. A lot of [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a useful function inside the MoveClip class (AS3) that will add script inside a Movieclip on a specific frame without actually having to add it manually to the timeline. This is great if, say you have someone working purely on animation and then someone else working on the interface to hold/play/control the animation. A lot of times this person will need to know when then animation has completed and will therefore need to add script inside the MovieClip animation. The addFrameScript can do this for you without altering the animation and re-exporting, etc.</p>
<p>The function takes two parameters: frame number to place the script (0 based) and the function name to call.</p>
<p><strong>public function addFrameScript (frame:uint, notify:Function):void;</strong></p>
<p>Example:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;">&nbsp;
<span style="color: #808080; font-style: italic;">// animation is the name of the movieclip.. </span>
animation.<span style="color: #006600;">addFrameScript</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">77</span>, onAnimationEnd<span style="color: #66cc66;">&#41;</span>;      
&nbsp;
<span style="color: #808080; font-style: italic;">// function called when playhead reaches 76.. </span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onAnimationEnd <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span> 
	<span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;onAnimationEnd..&quot;</span><span style="color: #66cc66;">&#41;</span>; 
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.ryac.ca/blog/2008/05/the-undocumented-addframescript-method/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StopWatch Class</title>
		<link>http://www.ryac.ca/blog/2008/03/stopwatch-class/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=stopwatch-class</link>
		<comments>http://www.ryac.ca/blog/2008/03/stopwatch-class/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 07:23:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.ryac.ca/blog/?p=8</guid>
		<description><![CDATA[I worked on a couple projects a while back that required a stopwatch (or timer) to keep track of time in a game, so I made this StopWatch class. Found it very helpful so I wanna share it. Besides the basic functions of starting, stopping, and resetting, you can also pass in a TextFormat object to change the formatting of the text, get the time in [...]]]></description>
			<content:encoded><![CDATA[<p>I worked on a couple projects a while back that required a stopwatch (or timer) to keep track of time in a game, so I made this StopWatch class. Found it very helpful so I wanna share it. Besides the basic functions of starting, stopping, and resetting, you can also pass in a TextFormat object to change the formatting of the text, get the time in milliseconds (it&#8217;s what I used to store in the database), and parse the milliseconds back into something more readable..</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_sw_1827238366"
			class="flashmovie"
			width="350"
			height="150">
	<param name="movie" value="http://www.ryac.ca/blog/content/sw.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.ryac.ca/blog/content/sw.swf"
			name="fm_sw_1827238366"
			width="350"
			height="150">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Here&#8217;s how to use it:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">import</span> ca.<span style="color: #006600;">ryac</span>.<span style="color: #006600;">StopWatch</span>;        
&nbsp;
<span style="color: #808080; font-style: italic;">// creates a StopWatch obj and sets the formatting to the txtFormat obj.. </span>
<span style="color: #808080; font-style: italic;">// last parameter will set embeddedFonts to either true or false (default is false).. </span>
<span style="color: #000000; font-weight: bold;">var</span> sw:StopWatch = <span style="color: #000000; font-weight: bold;">new</span> StopWatch <span style="color: #66cc66;">&#40;</span>txtFormat, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;        
&nbsp;
<span style="color: #808080; font-style: italic;">// pretty self-explanatory.. </span>
sw.<span style="color: #0066CC;">start</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; 
sw.<span style="color: #0066CC;">stop</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; 
sw.<span style="color: #006600;">reset</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;        
&nbsp;
<span style="color: #808080; font-style: italic;">// set or change the formatting and sets embeddedFonts to true.. </span>
sw.<span style="color: #0066CC;">setTextFormat</span> <span style="color: #66cc66;">&#40;</span>txtFormat2, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;        
&nbsp;
<span style="color: #808080; font-style: italic;">// output the time in milliseconds </span>
<span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span>sw.<span style="color: #0066CC;">time</span><span style="color: #66cc66;">&#41;</span>;        
&nbsp;
StopWatch.<span style="color: #006600;">parseTime</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">87292</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// returns 01:27:29</span></pre></td></tr></table></div>

<p>Download <a href="http://www.ryac.ca/blog/content/StopWatch.as" title="StopWatch.as file">StopWatch.as</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ryac.ca/blog/2008/03/stopwatch-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

