<?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>LearningIsFun &#187; Resources</title>
	<atom:link href="http://www.learningisfun.whenimnotsleeping.com/category/resources/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learningisfun.whenimnotsleeping.com</link>
	<description>Interactive Design Help &#38; Ramblings</description>
	<lastBuildDate>Wed, 13 Oct 2010 22:32:09 +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>File hand-off checklist</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2010/10/13/file-hand-off-checklist/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2010/10/13/file-hand-off-checklist/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 22:32:09 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Interactive]]></category>
		<category><![CDATA[Learning Is Fun]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://www.learningisfun.whenimnotsleeping.com/?p=62</guid>
		<description><![CDATA[Several weeks ago, I had the opportunity to help Catalyst Studios host a short workshop for print designers looking to make the transition to interactive. As with many people in this situation, our attendees wondered how to streamline the process of moving their design from concept to production and specifically how to improve the Designer/Front-End [...]]]></description>
			<content:encoded><![CDATA[<p>Several weeks ago, I had the opportunity to help Catalyst Studios host a short workshop for print designers looking to make the transition to interactive. As with many people in this situation, our attendees wondered how to streamline the process of moving their design from concept to production and specifically how to improve the Designer/Front-End Developer partnership. One of the results of this session was a checklist of details and considerations to be applied before turning all those hours of sweat and blood over to the developers who must bring it to life. I realize that the interaction between designers/developers frequently contains an amount of contention and while I believe the very best way to alleviate that stress point is for designers to learn some code perhaps this checklist will provide a sort of bridge.</p>
<p>I want to preface this list by explaining that at Catalyst Studios we typically follow the process of creating site mockups in Photoshop and then breaking them down into the visual elements required to display a site. Type, color, layer styles, size, position and so on are translated from the PSD into HTML, but we aren&#8217;t simply slicing up the document into a group of images that show the page. This list is intended to optimize this process of mapping the elements  base on our work flow, however most of it should easily translate to other processes and software applications.</p>
<p>Ok on to what you all care about–the list (annotated and explained as I have time). This document can be summed up by saying as a designer you need to be specific. Never assume that the developer is looking at the same vision you have in your head. Meaning its rarely enough to simply create one of similar elements and expect the developers to know how to modify that object or to intuitively know how a drop-down menu should look or even what font you had in mind for those form fields. Keeping in mind that you need to specify exactly how EVERYTHING will look, and interact makes this list somewhat irrelevant but here goes:</p>
<p><strong>Interactivity</strong></p>
<ol>
<li>Did you design alternate content states?</li>
<li>Have you defined a visual look for rollover/hover states on buttons and links?</li>
<li>Have you defined a visual look for error messaging and status information?</li>
</ol>
<p><strong>Concept &amp; Layout</strong></p>
<ol>
<li>Did you account for different sized content?</li>
<li>Did you design for extremes?</li>
<li>Did you design for dynamic content?</li>
<li>Does your layout width add up to a standard viewable area?</li>
<li>Are columns, gutters, margin and padding all equal and add up to the container width?</li>
<li>Did you provide direction for what should occur when the browser window changes size?</li>
<li>Did you use web-safe fonts? If not, did you include the font with your design or check licensing for use with @font-face?</li>
</ol>
<p><strong>Photoshop Document</strong></p>
<ol>
<li>Is your image file 72DPI and RGB color space?</li>
<li>Have color management profiles been removed from the file?</li>
<li>Did you name and organize your layers?</li>
<li>Do objects in your layout end on full pixels?</li>
<li>Have you used any blending modes (multiply, screen, burn) to create an effect? If so find a different way to create the effect.</li>
</ol>
<p><strong>Production Instructions</strong></p>
<ol>
<li>Have you specified content that requires special technology? If so how should these be included?</li>
<li>have you specified a hand-full of reusable typographic elements side wide? (For example make body copy on all pages the same size, color, etc)</li>
<li>Have you defined browser compatibility requirements? (Must support IE6 or needs a mobile version)</li>
<li>Did you consider how this will look on different devices/mediums?</li>
<li>Did you specify any locations where visual objects should be the same height?</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2010/10/13/file-hand-off-checklist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CS3 Video Tutorials</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2009/01/21/cs3-video-tutorials/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2009/01/21/cs3-video-tutorials/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 03:45:08 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[assignment]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/2009/01/21/cs3-video-tutorials/</guid>
		<description><![CDATA[Seems that Adobe has managed to keep the CS3 video workshop alive even after the release of CS4. Here&#8217;s the link.]]></description>
			<content:encoded><![CDATA[<p>Seems that Adobe has managed to keep the CS3 video workshop alive even after the release of CS4. Here&#8217;s the <a href="http://www.adobe.com/designcenter/video_workshop/" title="http://www.adobe.com/designcenter/video_workshop/" target="_blank">link</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2009/01/21/cs3-video-tutorials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Question:Many Answers</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/09/10/one-questionmany-answers/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/09/10/one-questionmany-answers/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 15:50:54 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Learning Is Fun]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/2008/09/10/one-questionmany-answers/</guid>
		<description><![CDATA[Whats the most important thing I would tell a design student? Always always come to class on time, sit in the front row, do your homework&#8230; Just kidding. Here&#8217;s a great post by Brian Yerkes about the &#8220;Most important thing I would tell a design student&#8220;. This is a pretty valuable list for anyone just [...]]]></description>
			<content:encoded><![CDATA[<p>Whats the most important thing I would tell a design student? <span style="text-decoration: line-through;">Always always come to class on time, sit in the front row, do your homework&#8230;</span> Just kidding. Here&#8217;s a great post by Brian Yerkes about the &#8220;<a href="http://www.brianyerkes.com/most-important-thing-i-would-tell-a-design-studen" target="_blank">Most important thing I would tell a design student</a>&#8220;. This is a pretty valuable list for anyone just starting out in the field.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/09/10/one-questionmany-answers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make it Shiny</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/07/11/make-it-shiny/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/07/11/make-it-shiny/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 21:28:23 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/2008/07/11/make-it-shiny/</guid>
		<description><![CDATA[We all know that sometimes the very best ideas can be overlooked in favor of something thats much prettier, but lacks depth. So now you&#8217;ve got a great idea, but maybe you could use a little help with the polish. Here&#8217;s a round up of tutorial sites on various topics that I find extremely useful [...]]]></description>
			<content:encoded><![CDATA[<p>We all know that sometimes the very best ideas can be overlooked in favor of something thats much prettier, but lacks depth. So now you&#8217;ve got a great idea, but maybe you could use a little help with the polish. Here&#8217;s a round up of tutorial sites on various topics that I find extremely useful when I want to make things look slick.</p>
<p><strong>Tutorial websites (photoshop, illustrator, flash, more):</strong></p>
<ul>
<li><a href="http://psdtuts.com/">PSDTuts</a></li>
<li><a href="http://pshero.com/" target="_blank">PSHero</a></li>
<li><a href="http://www.tutorial9.net/" target="_blank">Tutorial9</a></li>
<li><a href="http://tutorialdog.com/" target="_blank">Tutorial Dog</a></li>
<li><a href="http://www.tutzor.com/" target="_blank">Tutzor</a></li>
<li><a href="http://vectortuts.com/">VectTuts</a></li>
<li><a href="http://nettuts.com/">NetTuts</a></li>
<li><a href="http://tutorialblog.org/">Tutorialblog</a></li>
<li><a href="http://abduzeedo.com/tutorials" target="_blank">Abduzeedo </a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/07/11/make-it-shiny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac FTP Apps</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/03/03/mac-ftp-apps/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/03/03/mac-ftp-apps/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 19:52:52 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Learning Is Fun]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/archives/17</guid>
		<description><![CDATA[Ok so its time to get your project online. Step 1: Find some FTP software so you can upload your files to the server. Here are a few favorites Transmit (mac) CyberDuck (mac) &#8211; free FileZilla (Mac/PC) &#8211; free]]></description>
			<content:encoded><![CDATA[<p>Ok so its time to get your project online. Step 1: Find some FTP software so you can upload your files to the server.  Here are a few favorites</p>
<ul>
<li><a href="http://www.panic.com/transmit/" target="_blank">Transmit (mac)</a></li>
<li><a href="http://cyberduck.ch/">CyberDuck (mac) &#8211; free</a></li>
<li><a href="http://filezilla-project.org/">FileZilla (Mac/PC) &#8211; free</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/03/03/mac-ftp-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Flash in a HTML page with the SwfObject</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/02/18/display-flash-in-a-html-page-with-the-swfobject/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/02/18/display-flash-in-a-html-page-with-the-swfobject/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 21:20:26 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Learning Is Fun]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/archives/14</guid>
		<description><![CDATA[So you&#8217;ve worked for hours on that award winning Flash project and you need to place your SWF in a HTML container for the world to see&#8230; The obvious solution is to open the publish settings and check the HTML format, allowing Flash to build everything you need. But is that really all you need? [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve worked for hours on that award winning Flash project and you need to place your SWF in a HTML container for the world to see&#8230;  The obvious solution is to open the publish settings and check the HTML format, allowing Flash to build everything you need. But is that really all you need?  The default Flash embed code works fine for the little stuff, but lets say you want to make your code standards compliant or you want an easy way to make your site friendly for viewers without the Flash player installed (your grandparents or googlebot). In that case take advantage of the added features of Geoff Stearns&#8217; great <a href="http://blog.deconcept.com/swfobject/" target="_blank">SWFObject</a></p>
<p><strong>A few of the SWFObject features that might make your life easier:</strong></p>
<ul>
<li>Fixes the dreaded Microsoft &#8220;Click to Activate&#8221; error in IE 6 and 7</li>
<li>Creates clean standard compliant code</li>
<li>Can detect a Flash player version and push an upgrade</li>
<li> Provide users with alternate (non-Flash) content for search engines or those without Flash</li>
<li>Allows for an easy way to pass data into Flash at run time.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/02/18/display-flash-in-a-html-page-with-the-swfobject/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The all important webhost</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/the-all-important-webhost/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/the-all-important-webhost/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 18:40:29 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Learning Is Fun]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/archives/12</guid>
		<description><![CDATA[Ok so your building a website but where do you put it so everyone in the world can see? You need hosting and a domain name. On the up side both hosting and domain names have become very inexpensive so there&#8217;s really no excuse not to have one. Shake out the couch cushions for loose [...]]]></description>
			<content:encoded><![CDATA[<p>Ok so your building a website but where do you put it so everyone in the world can see? You need hosting and a domain name. On the up side both hosting and domain names have become very inexpensive so there&#8217;s really no excuse not to have one. Shake out the couch cushions for loose change and find the perfect web host from one of these links.</p>
<ul>
<li><a href="http://www.comparewebhosts.com" target="_blank">http://www.comparewebhosts.com</a></li>
<li><a href="http://www.cheaphostingdirectory.com" target="_blank">http://www.cheaphostingdirectory.com</a></li>
<li><a href="http://www.webhostingsearch.com/cheap-web-hosting.php" target="_blank">http://www.webhostingsearch.com/cheap-web-hosting.php</a></li>
</ul>
<p>Most hosts will help you register a domain name, but if you want to do that on its own check out <a href="http://www.godaddy.com" target="_blank">Godaddy.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/the-all-important-webhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Actionscript Libraries to make your life easier</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/actionscript-libraries-to-make-your-life-easier/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/actionscript-libraries-to-make-your-life-easier/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 18:24:48 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/archives/10</guid>
		<description><![CDATA[Some times its just not worth the time and effort to write all that code. Actionscipt code libraries are pre-built functions that you can use for the desired effect. Here are a few of my favorites Movieclip tweening prototypes (LMC Tween) Fuse Kit (heavy duty animation, but watch out it has a learning curve)]]></description>
			<content:encoded><![CDATA[<p>Some times its just not worth the time and effort to write all that code. Actionscipt code libraries are pre-built functions that you can use for the desired effect. Here are a few of my favorites</p>
<ul>
<li><a href="http://laco.wz.cz/tween/" target="_blank">Movieclip tweening prototypes</a>  (LMC Tween)</li>
<li><a href="http://www.mosessupposes.com/Fuse/" target="_blank">Fuse Kit</a> (heavy duty animation, but watch out it has a learning curve)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/actionscript-libraries-to-make-your-life-easier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sometimes its ok to cheat</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/sometimes-its-ok-to-cheat/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/sometimes-its-ok-to-cheat/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 18:17:12 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[cheatsheets]]></category>
		<category><![CDATA[Class Notes]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/archives/11</guid>
		<description><![CDATA[It&#8217;s not very easy to remember all kinds of code unless you write it every day and even then memory fails. Enter the code cheat sheets. Actionscriptcheatsheet.com provides a great reference for both AS2 and AS3. Grab em today&#8230; Actionscript 2 Cheat Sheet Other helpful cheat sheets Javascript (Functions &#38; Methods) Javascript (event handlers) HTML [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not very easy to remember all kinds of code unless you write it every day and even then memory fails. Enter the code cheat sheets. <a href="http://actionscriptcheatsheet.com/blog/" target="_blank">Actionscriptcheatsheet.com</a> provides a great reference for both AS2 and AS3. Grab em today&#8230;</p>
<p><a href="http://actionscriptcheatsheet.com/pdf/actionsscript_cheat_sheet_letter.pdf" target="_blank">Actionscript 2 Cheat Sheet</a></p>
<p><strong>Other helpful cheat sheets</strong></p>
<ul>
<li><a href="http://www.ilovejackdaniels.com/javascript_cheat_sheet.pdf" target="_blank">Javascript</a> (Functions &amp; Methods)</li>
<li><a href="http://http://www.ilovejackdaniels.com/javascript_cheat_sheet.pdf" target="_blank">Javascript</a> (event handlers)</li>
<li><a href="http://www.psacake.com/web/dy.asp" target="_blank">HTML</a></li>
<li><a href="http://www.ilovejackdaniels.com/cheat-sheets/html-character-entities-cheat-sheet/" target="_blank">HTML Character Entities</a></li>
<li><a href="http://www.ilovejackdaniels.com/cheat-sheets/css-cheat-sheet/" target="_blank">CSS</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/sometimes-its-ok-to-cheat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Flash as page background</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/tutorial-flash-as-page-background/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/tutorial-flash-as-page-background/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 06:15:26 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Learning Is Fun]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/?p=26</guid>
		<description><![CDATA[Learn how to use a Flash movie under HTML content as a full page background. As an added benefit you'll also learn to create a Flash movie that fills  100% height and width of the screen.]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong><br />
This tutorial will teach you how to use a Flash movie under HTML content as a full page background. As an added benefit you&#8217;ll also learn to create a Flash movie that fills  100% height and width of the screen. This tutorial assumes a basic understanding of Actionscript and makes use of the swfObject to place the swf file on the page.<br />
<em>[edit] This tutorial was written in 2007 and is based on version 1x of the swfObject and not the newer 2x version hosted at Google Code.  I&#8217;m also using Actionscript 2 for all Flash scripting. However, the process and concept is similar in AS3, the syntax is just slightly different.</em></p>
<p><strong>Step 1</strong></p>
<p>Lets take a look at an <a href="http://www.addsomespark.com/overunder" target="_blank">example</a> of what we&#8217;ll be creating. What you see is essentially an HTML content sandwich comprised of a flash background, HTML middle and a Flash menu on top. If you resize your browser window you&#8217;ll notice that the content inside the background is changing position according to the center of the browser window.</p>
<p>In this tutorial I&#8217;m only going to cover the creation and placement of the background and text layers. However, the placement of the &#8220;top&#8221; Flash movie is very similar and you can see exactly how it works by viewing the source of the example.</p>
<p><strong>Step 2 &#8211; Creating the background flash</strong></p>
<p>You can use just about anything for your background movie. My example is extremely simplistic, but I&#8217;ve seen this technique used to display everything from a tiling background to full screen video to dynamically changing content based on weather or time of day.</p>
<p>Ok lets get started. Open up Flash and create a new Actionscript 2 document. First we want to make sure that Flash doesn&#8217;t try to resize our content (unless of course that&#8217;s your intention) so we&#8217;re going to add a bit of Actionscript that tells Flash not to allow scaling and to set a content origin in the top left of the movie. So create a new layer, name it &#8220;script&#8221; and in the first frame add this Actionscript in the Actions Panel:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw3">Stage</span>.<span class="kw3">align</span> = <span class="st0">&quot;TL&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// force the stage alignment to the top left</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#40;</span>TL<span class="br0">&#41;</span><span class="kw3">Stage</span>.<span class="kw3">scaleMode</span> = <span class="st0">&quot;noScale&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// tell Flash not to scale the content</span></div>
</li>
</ol>
</div>
<p>Next we want Flash to watch for the stage being resized and reposition content (in my case to the center of the screen) relative to the new size. We can accomplish this task by adding a listener and then a simple function. So go back to your Flash document and create a movie clip.  Make sure that the registration point is in the upper left corner when you create the clip. Give your clip an instance name of &#8220;box_mc&#8221;. A quick side note, adding _mc to your instance name will help Flash give you hints for code you can use with a movie clip. Next go back to the first frame of your &#8220;script&#8221; layer and add this code after the align and scale code from the previous step.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">function</span> setStage<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// place a movieclip called box_mc at the stage center</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// horizontally center the box clip</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; box_mc.<span class="kw3">_x</span> = <span class="kw3">Math</span>.<span class="kw3">round</span><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="kw3">Stage</span>.<span class="kw3">width</span>/<span class="nu0">2</span><span class="br0">&#41;</span>-<span class="br0">&#40;</span>box_mc.<span class="kw3">_width</span>/<span class="nu0">2</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; <span class="co1">// vertically center the box clip</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; box_mc.<span class="kw3">_y</span> = <span class="kw3">Math</span>.<span class="kw3">round</span><span class="br0">&#40;</span><span class="br0">&#40;</span><span class="kw3">Stage</span>.<span class="kw3">height</span>/<span class="nu0">2</span><span class="br0">&#41;</span>-<span class="br0">&#40;</span>box_mc.<span class="kw3">_height</span>/<span class="nu0">2</span><span class="br0">&#41;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">//create a new listener objectvar</span></div>
</li>
<li class="li2">
<div class="de2">stageChange:<span class="kw3">Object</span> = <span class="kw2">new</span> <span class="kw3">Object</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// what the listener should check</span></div>
</li>
<li class="li1">
<div class="de1">stageChange.<span class="kw3">onResize</span> = <span class="kw2">function</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; setStage<span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// attach the listner to its target</span></div>
</li>
<li class="li1">
<div class="de1"><span class="kw3">Stage</span>.<span class="kw3">addListener</span><span class="br0">&#40;</span>stageChange<span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="co1">// call our function when the movie first runssetStage();</span></div>
</li>
</ol>
</div>
<p>Lets go through this line by line.</p>
<p>A. The first part is creating a function (series of commands) to run when the stage is resized. The first line inside the function moves our box_mc to the horizontal center of the stage. We use the Math.round() command to make sure our clip doesn&#8217;t end up with a decimal position (rounding to the next/previous whole number). Inside the round functions we&#8217;re telling Flash to use Order of Operations by including things we want to happen first inside the parenthesis. So in case that math doesn&#8217;t make sense we&#8217;re saying take the stage width and cut it in half which gives us the horizontal center. However, since Flash is going to place our box_mc clip at its origin point, the left side of the clip would be in the center of the stage resulting in our clip being off center. So to fix that, we need to get half the width of the clip and then move the position to the left (using the minus sign) resulting in the clip being centered at the center of the stage. In other words we want to set the clip x position to (half the stage width) minus (half the clip width).</p>
<p><em>Note &#8211; getting the stage height/width does not require an underscore while getting the height/width of a movie clip does require an underscore so Stage.width vs clip._width</em></p>
<p>B. The next part of the function is similar to the first line except that we&#8217;re looking for half the height of the stage and half the height of the movie clip.</p>
<p>C. We need to create a new listener object. This is pretty aptly named in that it &#8220;listens&#8221; for some event and then does a specified action when the event occurs.</p>
<p>D. After we have a listener we need to tell it what action to watch. In this case we want to know when something is being resized.</p>
<p>E. Next we&#8217;re attaching the listener to the stage object so Flash knows that when the stage is resized it should run the function to center our clip.</p>
<p>F. Finally since the stage isn&#8217;t changing when the movie first loads, we need to call our function to center box_mc the first time the movie runs.</p>
<p>Now you can publish your movie and in the next step we&#8217;ll use the swfObject to place your swf file in an html page.</p>
<p><strong>Step 3 &#8211; Placing the background in the HTML page</strong></p>
<p>First of all visit <a href="http://blog.deconcept.com/2007/02/28/swfobject-1-5-released/" target="_blank">deconcept.com</a> and download the swfObject. You&#8217;ll end up with a zip file containing javascript and several examples. Grab the swfobject.js and put it in the same folder as your Flash background movie.</p>
<p>The quickest way to get up and running is simply modify the relevant chunks of code out of one of the swfObject example files and then save it as a new HTML file. So open the &#8220;fullpage.html&#8221; file from the swfObject folder in your your favorite text editor/IDE and save it to the same folder as your background.swf from the previous steps. The fullpage.html file has almost everthing we need to make our flash movie fill the entire screen pre written for us. We&#8217;ll just need to replace a few lines with the correct names of our files.</p>
<p>You&#8217;ll need to change the first argument in this line:  <strong>var so = new SWFObject(&#8220;<span style="color: #ff0000;">so_tester.swf</span>&#8220;, &#8220;sotester&#8221;, &#8220;100%&#8221;, &#8220;100%&#8221;, &#8220;8&#8243;, &#8220;<span style="color: #ff0000;">#FF6600</span>&#8220;);</strong> to the name of your swf file and the last argument to the background color of your choice. Changing the background color is important since our swf will be transparent in any location where you can see the stage. (If you decided to cover the entire stage of your movie with some color this won&#8217;t be an issue).</p>
<p>At this point, if all you wanted was a 100% wide and 100% high movie that resizes with the browser window you&#8217;ve got it. If you view your HTML file in a web browser you should see a resizing Flash movie that fills the browser window. However, if you want to use Flash as a page background follow on as we add some CSS trickery to make the Flash sit below some content on the page.</p>
<p><strong>Step 4 &#8211; A little bit of Javascript.</strong></p>
<p>Typically if we want something to be layered above or below other content in an HTML page we would use the CSS z-index property to create depth. Unfortunatly with Flash we run into a little problem in that swf&#8217;s always like to be on top of all the other content. We can fix this default behavior with one really simple but very important addition to the swfObject placement code. So go back to the HTML page we were just editing and place your cursor at the end of &#8220;so.addParam(&#8220;scale&#8221;, &#8220;noscale&#8221;);&#8221; hit return and type:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">so.addParam(&quot;wmode&quot;, &quot;transparent&quot;);</div>
</li>
</ol>
</div>
<p>With that simple addition Flash should play by the normal CSS stacking rules.</p>
<p><strong>Step 5- Placing the html content with CSS</strong></p>
<p>Ok we&#8217;re almost done. The final step is to add a HTML container for our content and position everything with a little bit of CSS. So in your HTML file add a new div  after the closing script tag (&lt;/script&gt;) with an id of &#8220;htmlContent&#8221;. Make sure to add some content inside the htmlContent div so you can see when the new div is placed correctly. This container will hold any content that you want to appear &#8220;on top&#8221; of the Flash background.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&lt;div id=&quot;htmlContent&quot;&gt;Lorem Ipsum&lt;/div&gt;</div>
</li>
</ol>
</div>
<p>Next go to the head of your HTML page where it says &lt;style type=&#8221;text/css&#8221;&gt;. We need to add another CSS rule to position our htmlContent div. Find the last closing brace &#8220;}&#8221; inside the &lt;/style&gt; tag and add this rule:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="re0">#htmlContent</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;position<span class="re2">:absolute</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;top<span class="re2">:<span class="re3">50px</span></span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;right<span class="re2">:<span class="re3">50px</span></span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp;z-index<span class="re2">:<span class="nu0">100</span></span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>That&#8217;s all there is to it. Remember to save your HTML page and then take a look at it in your web browser. You should see whatever is inside the htmlContent div on top of your full screen Flash movie.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/02/05/tutorial-flash-as-page-background/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

