<?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>zedia flash blog &#187; PureMVC</title>
	<atom:link href="http://www.zedia.net/category/puremvc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zedia.net</link>
	<description>Flash, ActionScript, SEO and everything in between</description>
	<lastBuildDate>Thu, 02 Feb 2012 17:58:56 +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>PureMVC Skeleton for ActionScript projects</title>
		<link>http://www.zedia.net/2009/puremvc-skeleton-for-actionscript-projects/</link>
		<comments>http://www.zedia.net/2009/puremvc-skeleton-for-actionscript-projects/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 16:08:42 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[PureMVC]]></category>
		<category><![CDATA[ActionScript projects]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PureMVC Skeleton]]></category>
		<category><![CDATA[PureMVC Skeleton for ActionScript projects]]></category>

		<guid isPermaLink="false">http://www.zedia.net/?p=434</guid>
		<description><![CDATA[I had previously done a PureMVC skeleton for Flash websites and applications, meaning that you would use the Flash IDE compiler to compile your project. Lately I have been doing more and more ActionScript projects (compiled using the Flex compiler but not using the Flex framework) because it permits the separation of big FLAs into [...]]]></description>
			<content:encoded><![CDATA[<p>I had previously done a <a title="PureMVC Skeleton for Flash Applications / Websites" href="http://www.zedia.net/2009/puremvc-skeleton-for-flash-applications-websites/" target="_self">PureMVC skeleton for Flash websites and applications</a>, meaning that you would use the Flash IDE compiler to compile your project. Lately I have been doing more and more ActionScript projects (compiled using the Flex compiler but not using the Flex framework) because it permits the separation of big FLAs into smaller ones thus facilitating working in team. But I had no template/skeleton to start with until now.</p>
<p>So here it is:</p>
<p><a title="PureMVC ActionScript Project Skeleton" href="http://zedia.net/files/PureMVC_ActionScript_Project_Skeleton.rar">PureMVC ActionScript Project Skeleton</a></p>
<p>It still uses an external preloader and I added a local Boolean so that the application knows your are testing locally and not on the sever (useful when making server call). One of the major change is the inclusion of the SharedAssetLibrary. Basically this emulate having one FLA with all graphics and MovieClip, but you actually can have multiple FLAs. When you want to add something to the SharedAssetLibrary you first add it to a FLA, set it to Export for ActionScript and then compile it to the swf folder. Then you can add it in the SharedAssetLibrary using the embed statment:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//BackgroundAsset being the name you gave it in the library</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;../../../swf/Background.swf&quot;</span>, symbol=<span style="color: #ff0000;">&quot;BackgroundAssets&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> BackgroundAssets:<span style="color: #000000; font-weight: bold;">Class</span>;</pre></div></div>

<p>Now if you want to use this in any of your views, first import SharedAssetLibrary and than you can use it like this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> BackgroundAssets:<span style="color: #000000; font-weight: bold;">Class</span> = SharedAssetsLibrary.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getAsset</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;BackgroundAssets&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">var</span> assets:<span style="color: #66cc66;">*</span> = <span style="color: #000000; font-weight: bold;">new</span> BackgroundAssets<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span>Sprite<span style="color: #66cc66;">&#40;</span>assets<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>I included a FlashDevelop project file in there, but you can just delete it if you use Flash Builder.</p>
<p>Using a skeleton greatly reduce the setup time of a project, so I hope this will help you. I want to look into doing a skeleton for Flex Application, because I don&#8217;t like the <a title="PureMVC Flex application skeleton" href="http://trac.puremvc.org/Demo_AS3_Flex_AppSkeleton" target="_blank">skeleton</a> that is available on the <a title="PureMVC" href="http://puremvc.org/" target="_blank">PureMVC</a> website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2009/puremvc-skeleton-for-actionscript-projects/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How to handle Stage resizes with PureMVC</title>
		<link>http://www.zedia.net/2009/how-to-handle-stage-resizes-with-puremvc/</link>
		<comments>http://www.zedia.net/2009/how-to-handle-stage-resizes-with-puremvc/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 00:48:48 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[PureMVC]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Stage resize]]></category>

		<guid isPermaLink="false">http://www.zedia.net/?p=381</guid>
		<description><![CDATA[I am starting to like the Proxies a lot in PureMVC because I am always creating new ones (Google Analytics Proxy, SWFAddress Proxy, etc) and they are reusable from project to project. The latest one is a Proxy that keeps track of the resizing of the stage. I found it was a nice way to [...]]]></description>
			<content:encoded><![CDATA[<p>I am starting to like the Proxies a lot in PureMVC because I am always creating new ones (<a href="http://www.zedia.net/2009/using-google-analytics-for-flash-in-conjunction-with-puremvc/" title="Using Google Analytics for Flash in conjunction with PureMVC">Google Analytics Proxy</a>, SWFAddress Proxy, etc) and they are reusable from project to project.</p>
<p>The latest one is a Proxy that keeps track of the resizing of the stage. I found it was a nice way to handle the problem where you set the stage to NOSCALE and you want to handle the resizing yourself. In those situation you would have multiple views/elements reacting differently + you would have to manage adding and removing listener to the stage. Now with one Proxy setting one listener to the stage and sending notifications whenever it resizes, I found it was simpler. Here is the code for my Proxy:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">zedia</span>.<span style="color: #006600;">model</span><span style="color: #66cc66;">&#123;</span>
  <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">zedia</span>.<span style="color: #006600;">ApplicationFacade</span>;
  <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">Stage</span>;
  <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
  <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
  <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">puremvc</span>.<span style="color: #006600;">as3</span>.<span style="color: #006600;">interfaces</span>.<span style="color: #006600;">IProxy</span>;
  <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">puremvc</span>.<span style="color: #006600;">as3</span>.<span style="color: #006600;">patterns</span>.<span style="color: #006600;">proxy</span>.<span style="color: #006600;">Proxy</span>;
<span style="color: #808080; font-style: italic;">/**
* Model for the everything that is related to Resizing.
*
*/</span>
  <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> ResizeProxy <span style="color: #0066CC;">extends</span> Proxy <span style="color: #0066CC;">implements</span> IProxy<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const <span style="color: #0066CC;">NAME</span>:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;ResizeProxy&quot;</span>;
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _stage:<span style="color: #0066CC;">Stage</span>;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> ResizeProxy<span style="color: #66cc66;">&#40;</span>newStage:<span style="color: #0066CC;">Stage</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
      <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">NAME</span><span style="color: #66cc66;">&#41;</span>;
      _stage = newStage;
      _stage.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">RESIZE</span>, _onStageResize, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> stageWidth<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
      <span style="color: #b1b100;">return</span> _stage.<span style="color: #006600;">stageWidth</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> stageHeight<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
      <span style="color: #b1b100;">return</span> _stage.<span style="color: #006600;">stageHeight</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> _onStageResize<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
      facade.<span style="color: #006600;">sendNotification</span><span style="color: #66cc66;">&#40;</span>ApplicationFacade.<span style="color: #006600;">STAGE_RESIZE</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Now in the StartupCommand of your application you register the Proxy and pass it an instance of the stage. It is easy to do so because you already have to pass one instance of the stage to the ApplicationMediator. Once that is done, your Proxy is running and sending the notifications. All that is left is to listen and to handle the notifications in the Mediators of the views that needs to react to the resizing; as simple as that.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2009/how-to-handle-stage-resizes-with-puremvc/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>PureMVC Skeleton for Flash Applications / Websites</title>
		<link>http://www.zedia.net/2009/puremvc-skeleton-for-flash-applications-websites/</link>
		<comments>http://www.zedia.net/2009/puremvc-skeleton-for-flash-applications-websites/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 22:43:19 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[PureMVC]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[PureMVC Flash Skeleton]]></category>

		<guid isPermaLink="false">http://www.zedia.net/?p=357</guid>
		<description><![CDATA[I have done a couple of site using PureMVC and Flash and it seems that at the beginning of a project I&#8217;m always doing the same things, creating the ApplicationFacade, the folder structure, the main fla, etc. I thought it might be useful to slap together a generic skeleton for a PureMVC Flash application or [...]]]></description>
			<content:encoded><![CDATA[<p>I have done a couple of site using PureMVC and Flash and it seems that at the beginning of a project I&#8217;m always doing the same things, creating the ApplicationFacade, the folder structure, the main fla, etc. I thought it might be useful to slap together a generic skeleton for a PureMVC Flash application or website. You can download it here:</p>
<p><a title="PureMVC Flash Skeleton" href="http://www.zedia.net/files/PureMVC_Flash_Skeleton.rar">PureMVC Flash skeleton</a></p>
<p>All you have to do is in the src/com folder, rename the folder PROJECT_NAME to your project, and do a find and replace in files for PROJECT_NAME to replace it with what you changed the forlder name to. I didn&#8217;t include the PureMVC library in there because I suggest fetching the files from the <a title="PureMVC" href="http://puremvc.org" target="_blank">official PureMVC website</a> so that you always get the latest version. Once you get them, put them in the lib folder and you should be able to compile.</p>
<p>The rar file contains the following:</p>
<ul>
<li>Main.fla, Preload.fla</li>
<li>Main.as</li>
<li>ApplicationFacade.as</li>
<li>StartupCommand.as</li>
<li>ApplicationDataProxy.as</li>
<li>ApplicationMediator.as</li>
<li>IMain.as (Interface so that the preloader can use the init function of Main.as)</li>
<li>the folder structure</li>
</ul>
<p>This should help save half an hour every new PureMVC project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2009/puremvc-skeleton-for-flash-applications-websites/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The PureMVC presentation video is live</title>
		<link>http://www.zedia.net/2008/the-puremvc-presentation-video-is-live/</link>
		<comments>http://www.zedia.net/2008/the-puremvc-presentation-video-is-live/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 05:00:59 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[PureMVC]]></category>
		<category><![CDATA[Home Depot]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2008/the-puremvc-presentation-video-is-live/</guid>
		<description><![CDATA[The presentation I did the other day is now live and I am quite happy with the results. Well I sound like a robot( I guess nobody likes hearing is own voice) and some of the technical limitations (no webcam, audio delay, not having control of my slides) have impaired my performance, but for a [...]]]></description>
			<content:encoded><![CDATA[<p>The presentation I did the other day is now live and I am quite happy with the results. Well I sound like a robot( I guess nobody likes hearing is own voice) and some of the technical limitations (no webcam, audio delay, not having control of my slides) have impaired my performance, but for a first public speech, I&#8217;m pretty happy with it.</p>
<p>Also, as a note to myself, next time I do something like this I will inform myself better on which audience I will present to; I think the audience present at the time of the conference had already a good knowledge of the <a href="http://www.puremvc.org" title="PureMVC" target="_blank">PureMVC framework</a> and my presentation might have been a bit too light. I hope it serves greater purpose as a video than as the live thing.</p>
<p>Here it is; I start speaking at 16:00.</p>
<p><a href="https://admin.acrobat.com/_a849487124/p13537877" title="PureMVC Pirate Internet Radio Conference Takeover" target="_blank">The PureMVC Pirate Internet Radio Conference Takeover </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2008/the-puremvc-presentation-video-is-live/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Myself in the PureMVC Pirate Internet Radio Conference</title>
		<link>http://www.zedia.net/2008/myself-in-the-puremvc-pirate-internet-radio-conference/</link>
		<comments>http://www.zedia.net/2008/myself-in-the-puremvc-pirate-internet-radio-conference/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 05:02:45 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[PureMVC]]></category>
		<category><![CDATA[Home Depot]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[The Wire]]></category>
		<category><![CDATA[Twist Image]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2008/myself-in-the-puremvc-pirate-internet-radio-conference/</guid>
		<description><![CDATA[That is right, in a bit more than 6 hours, if you head to this address: http://connectpro78922856.acrobat.com/pirate/ you will see me present some of the work I did on the two Home Depot projects we had at Twist Image. I&#8217;ll mostly be exposing how using a framework like PureMVC can change how you think and [...]]]></description>
			<content:encoded><![CDATA[<p>That is right, in a bit more than 6 hours, if you head to this address:</p>
<p><span style="font-size: 12px; color: #222222; line-height: 14px; font-family: Verdana" class="Apple-style-span"><a href="http://connectpro78922856.acrobat.com/pirate/" target="_blank">http://connectpro78922856.acrobat.com/pirate/</a></span></p>
<p>you will see me present some of the work I did on the two Home Depot projects we had at <a href="http://www.twistimage.com" title="Twist Image" target="_blank">Twist Image</a>. I&#8217;ll mostly be exposing how using a framework like <a href="http://www.puremvc.org" title="PureMVC" target="_blank">PureMVC</a> can change how you think and develop an application or website and why we came to choose this particular framework.</p>
<p>I am very excited about this opportunity and I am a bit stressed out at the same time. It&#8217;s been a long time since I did a presentation ( back while I was in school) and this is a bit different since I&#8217;ll be broadcasting from my desk using a webcam; it will be weird presenting while sat down but I think I&#8217;ll do fairly good.</p>
<p>Lastly, I&#8217;ve been watching a lot of the TV show <a href="http://www.hbo.com/thewire/" title="The Wire" target="_blank">The Wire</a> so I hope I don&#8217;t slip too much slang words in there.</p>
<p>So again if you want to watch it its tomorrow November 19th at 12h30 (3h30 PST)</p>
<p><span style="font-size: 12px; color: #222222; line-height: 14px; font-family: Verdana" class="Apple-style-span"></span><a href="http://connectpro78922856.acrobat.com/pirate/" target="_blank">http://connectpro78922856.acrobat.com/pirate/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2008/myself-in-the-puremvc-pirate-internet-radio-conference/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Show your support for PureMVC; Donate a click!</title>
		<link>http://www.zedia.net/2008/show-your-support-for-puremvc-donate-a-click/</link>
		<comments>http://www.zedia.net/2008/show-your-support-for-puremvc-donate-a-click/#comments</comments>
		<pubDate>Fri, 07 Nov 2008 04:58:17 +0000</pubDate>
		<dc:creator>zedia.net</dc:creator>
				<category><![CDATA[PureMVC]]></category>
		<category><![CDATA[frameworks]]></category>
		<category><![CDATA[Home Depot]]></category>
		<category><![CDATA[InsideRIA]]></category>
		<category><![CDATA[redefining floors]]></category>
		<category><![CDATA[think in colour]]></category>

		<guid isPermaLink="false">http://www.zedia.net/2008/show-your-support-for-puremvc-donate-a-click/</guid>
		<description><![CDATA[If you use PureMVC and you like it I suggest you head to insideRIA and vote for it on this week poll. I have multiple reasons to ask you to do this. First off I think it&#8217;s a great project and it deserves the attention. More attention means more people might start using it and [...]]]></description>
			<content:encoded><![CDATA[<p>If you use <a href="http://puremvc.org/" title="PureMVC" target="_blank">PureMVC</a> and you like it I suggest you head to <a href="http://www.insideria.com" title="InsideRIA" target="_blank">insideRIA</a> and vote for it <a href="http://oreillynet.com/insideria/polls/196.csp" title="Vote for PureMVC" target="_blank">on this week poll</a>. I have multiple reasons to ask you to do this.</p>
<p>First off I think it&#8217;s a great project and it deserves the attention. More attention means more people might start using it and might get involved which can only be good for the project.</p>
<p>Also, we started using PureMVC on 3 different projects (one being <a href="http://www.homedepot.ca/redefiningfloors" title="HomeDepot - redefining floors" target="_blank">HomeDepot &#8211; redefining floors</a>) and I use it in a personal project and I really like it. I developed some skills with it and if PureMVC does well, those skills are going to be more valuable. Also, the people at my jobs might not be so happy if in the near future PureMVC would just crumble (which I don&#8217;t think could happen), I would have made them invest expertise in something that would have been shortermed.</p>
<p>Lastly, <a href="http://puremvc.org/" title="PureMVC" target="_blank">PureMVC</a> is one off the few framework that support both Flash or Flex based project and that is really important for me; so go ahead, <a href="http://oreillynet.com/insideria/polls/196.csp" title="Vote for PureMVC" target="_blank">give PureMVC some love</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.zedia.net/2008/show-your-support-for-puremvc-donate-a-click/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

