<?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; Learning Is Fun</title>
	<atom:link href="http://www.learningisfun.whenimnotsleeping.com/category/learning-is-fun/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>Pixel Perfect</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2009/04/13/pixel-perfect/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2009/04/13/pixel-perfect/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 22:05:11 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Learning Is Fun]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/2009/04/13/pixel-perfect/</guid>
		<description><![CDATA[Here are 7 great tips about what goes into great web design. http://wefunction.com/2009/04/quality-within-web-design/ 1. Spacing 2. Pixel Perfect Detail 3. Typography 4. Organization of Elements 5. Restraint &#038; Subtlety 6. Using Color 7. Do Something New have more? Leave em in the comments.]]></description>
			<content:encoded><![CDATA[<p>Here are 7 great tips about what goes into great web design. http://wefunction.com/2009/04/quality-within-web-design/</p>
<p>1. Spacing<br />
2. Pixel Perfect Detail<br />
3. Typography<br />
4. Organization of Elements<br />
5. Restraint &#038; Subtlety<br />
6. Using Color<br />
7. Do Something New</p>
<p>have more? Leave em in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2009/04/13/pixel-perfect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash 2 Projects</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/10/08/flash-2-projects/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/10/08/flash-2-projects/#comments</comments>
		<pubDate>Wed, 08 Oct 2008 21:56:15 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Learning Is Fun]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/2008/10/08/flash-2-projects/</guid>
		<description><![CDATA[Take a look at the cool ideas from Flash 2 View online]]></description>
			<content:encoded><![CDATA[<p>Take a look at the cool ideas from Flash 2</p>
<p><a href="http://www.whenimnotsleeping.com/lab710">View online </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/10/08/flash-2-projects/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>OBEY</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/07/23/obey/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/07/23/obey/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 15:00:14 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Learning Is Fun]]></category>
		<category><![CDATA[Seen & Noted]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/2008/07/23/obey/</guid>
		<description><![CDATA[I know we have a lot of Shepard Fairey fans around here so I thought people might want to check out this interview covering his art, design, life&#8230;]]></description>
			<content:encoded><![CDATA[<p>I know we have a lot of Shepard Fairey fans around here so I thought people might want to check out <a href="http://www.designrelated.com/news/feature_view/32">this interview</a> covering his art, design, life&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/07/23/obey/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>Chip Kidd in Minneapolis</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/02/18/chip-kidd-in-minneapolis/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/02/18/chip-kidd-in-minneapolis/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 23:15:20 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Learning Is Fun]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/archives/15</guid>
		<description><![CDATA[Part stand-up comedy, part design history, 100% creativity.  Take the chance to see Chip Kidd at The Minneapolis Central Library, Wednesday Feb, 27th 2008 at 7:00p.m. More information available here.]]></description>
			<content:encoded><![CDATA[<p>Part stand-up comedy, part design history, 100% creativity.  Take the chance to see Chip Kidd at The Minneapolis Central Library, Wednesday Feb, 27th 2008 at 7:00p.m.</p>
<p>More information available <a href="http://www.friendsofmpl.org/events_home.html#talk" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/02/18/chip-kidd-in-minneapolis/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>Tips for building a killer portfolio</title>
		<link>http://www.learningisfun.whenimnotsleeping.com/2008/02/06/tips-for-building-a-killer-portfolio/</link>
		<comments>http://www.learningisfun.whenimnotsleeping.com/2008/02/06/tips-for-building-a-killer-portfolio/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 15:45:05 +0000</pubDate>
		<dc:creator>graphixboy</dc:creator>
				<category><![CDATA[Learning Is Fun]]></category>
		<category><![CDATA[Online Portfolio]]></category>

		<guid isPermaLink="false">http://learningisfun.whenimnotsleeping.com/index.php/archives/13</guid>
		<description><![CDATA[As with everything there are lots of people with lots of different ideas about how to build a successful portfolio. Here&#8217;s a list of some of the best theory surrounding online portfolios. Note: These are not tutorials. Build a killer online portfolio Creating the perfect portfolio 5 Tips for a Better Online Portfolio Preparing and [...]]]></description>
			<content:encoded><![CDATA[<p>As with everything there are lots of people with lots of different ideas about how to build a successful portfolio. Here&#8217;s a list of some of the best theory surrounding online portfolios. Note: These are not tutorials.</p>
<ul>
<li><a href="http://freelanceswitch.com/finding/build-a-killer-online-portfolio-in-9-easy-steps/" target="_blank">Build a killer online portfolio</a></li>
<li><a href="http://www.digital-web.com/articles/the_perfect_portfolio/">Creating the perfect portfolio</a></li>
<li><a href="http://freelanceswitch.com/finding/5-tips-for-a-better-online-portfolio/" target="_blank">5 Tips for a Better Online Portfolio</a></li>
<li><a href="http://psd.tutsplus.com/articles/techniques/preparing-and-talking-about-your-graphic-design-portfolio/" target="_blank">Preparing and Talking About Your Graphic Design Portfolio</a></li>
</ul>
<p>If you have more resources, please share them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.learningisfun.whenimnotsleeping.com/2008/02/06/tips-for-building-a-killer-portfolio/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>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>

