<?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>Pink and Ain&#039;t &#187; Software</title>
	<atom:link href="http://blog.pinkandaint.com/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pinkandaint.com</link>
	<description>Animation, Flash, and other nerdy ramblings</description>
	<lastBuildDate>Mon, 28 Nov 2011 08:44:30 +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>3d Is Different</title>
		<link>http://blog.pinkandaint.com/3d-is-different/</link>
		<comments>http://blog.pinkandaint.com/3d-is-different/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 19:13:19 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Animation]]></category>
		<category><![CDATA[Maya]]></category>
		<category><![CDATA[Walk Cycles]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/3d-is-different/</guid>
		<description><![CDATA[Since I’m out of work at the moment I thought I’d take some time and see if I can get into the swing of 3d animation in Maya.&#160; I’ve dome some 3d before but only as part of a class at UCLA.&#160; I suppose the class was informative and helpful but in no way did [...]]]></description>
			<content:encoded><![CDATA[<p>Since I’m out of work at the moment I thought I’d take some time and see if I can get into the swing of 3d animation in Maya.&#160; I’ve dome some 3d before but only as part of a class at UCLA.&#160; I suppose the class was informative and helpful but in no way did it get me where I need to go.&#160; I ended up spending most of my time in the class making amateurish models with amateurish rigs, leaving very little time for actual animation, which is where my interest really lay.&#160; I ended up kind of half-assing the final film, not having enough time to really get it done right.&#160; The only motion I ended up finishing was supposed to be of a fat sheep reaching in vain for some grass, but it ended up looking more like it was barfing.</p>
<p>I come to it now knowing what I really want to do, though, and what I think I’ll enjoy and be kinda good at.&#160; I’m a character animator.&#160; What I want to do is animate characters – not model them, not rig them, not paint them.&#160; Let the other people do those things – people who enjoy and are good at them.</p>
<h3>Brief Aside</h3>
<p>When I was working on <em>Don’t Fear the Sitter </em>I dreaded doing the backgrounds.&#160; A lot of animators I know looked forward to that part, since it was so much less work for them.&#160; And while, yes, overall the BGs took less time for me than the animation did, and I don’t think I did a bad job on them, they were a real chore.</p>
<h3>End of Aside</h3>
<p>So I downloaded the student version of Maya.&#160; (The people at Autodesk totally have the right idea in making it free for students and the unemployed – training up their future customers.) I bought a Maya book.&#160; I downloaded a character rig (thank god there are people out there who make these things and release them for free).&#160; I dove in.</p>
<p>I figured the most basic thing to try out at first would be a good old walk cycle.&#160; I tried to put in some Richard Williams style flourish, breaking elbows and escaping from that two-dimensional plane in which the traditional side-view walk cycle resides.&#160; Here are the results:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:38dab020-0fbf-423c-ad31-893b837651fc" class="wlWriterEditableSmartContent">
<div><object width="539" height="303"><param name="movie" value="http://www.youtube.com/v/2g_CtigvWrE?hl=en&amp;hd=1"></param><embed src="http://www.youtube.com/v/2g_CtigvWrE?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="539" height="303"></embed></object></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/3d-is-different/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Extensions: Frame Navigation</title>
		<link>http://blog.pinkandaint.com/flash-extensions-frame-navigation/</link>
		<comments>http://blog.pinkandaint.com/flash-extensions-frame-navigation/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 21:33:29 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Commands]]></category>
		<category><![CDATA[Flash Tools]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/flash-extensions-frame-navigation/</guid>
		<description><![CDATA[It can be frustrating moving around in Flash.&#160; Whenever you move to a new keyframe you almost always lose the selection you had previously.&#160; I’ve made some commands to help avoid this problem. These are designed to be drop-in replacements for the built-in Flash operations normally bound to the “&#62;” and “&#60;” keys.&#160; In normal [...]]]></description>
			<content:encoded><![CDATA[<p>It can be frustrating moving around in Flash.&#160; Whenever you move to a new keyframe you almost always lose the selection you had previously.&#160; I’ve made some commands to help avoid this problem.</p>
<p>These are designed to be drop-in replacements for the built-in Flash operations normally bound to the “&gt;” and “&lt;” keys.&#160; In normal operation, those keys move the current frame marker forward or backward one frame.&#160; They’re useful when you want to slowly go through your animation, or when you don’t want to have to go to the mouse to move to the next or previous frame.</p>
<p>The difference with my versions, though, is that now your selection will remain selected in the new frame.&#160; That is, whatever symbols you had selected in the previous frame will also be selected in the new frame.&#160; It’s fantastic for when you want to go through an animation one frame at a time and adjust the same element(s) on each frame.</p>
<p>There are six commands in this package:</p>
<ol>
<li><strong><em>Same object frame dec</em></strong> and <strong><em>Same object frame inc          <br /></em></strong>These commands move back or forward one frame, keeping the same selection.&#160; If you had a symbol selected in the old frame and it exists in the new one, it’ll be selected there too. I have these bound to the hotkeys mentioned above – “&lt;” and “&gt;” respectively. </li>
<li><strong><em>Same object keyframe dec</em></strong> and <strong><em>Same object keyframe inc          <br /></em></strong>These operate exactly the same way, except that they move to the next <em>keyframe</em> on the currently active layer. This is great for moving between keyframes without having to laboriously traverse the intervening non-key frames. I have these bound to the same keys as above, but while holding down </li>
<li><strong><em>Same object go to first frame </em></strong>and <strong><em>Same object go to last frame          <br /></em></strong>These commands will move the current frame to be either at the beginning or the end of the timeline. </li>
</ol>
<p>A couple notes about these tools:</p>
<ol>
<li>They work best in Flash CS4 or earlier.&#160; In CS5 Adobe changed something about how Flash updates the display after running a JSFL command. Now you can’t see what the screen looks like as-you-go – you have to stop and wait for it to update.&#160; This means you can’t, for instance, just hold down the “&gt;” key and see the animation go by slowly.&#160; The reduced functionality of these tools is actually one of the main reasons I haven’t upgraded to CS5. </li>
<li>If a symbol doesn’t exist on the frame you move to, obviously it can’t be selected. </li>
<li>If you have more than one instance of the same symbol on the same layer then the tool can only track one of them.&#160; There are some details behind this that I don’t really have the energy to go into here, but on the new frame probably only one of your two symbol instances will be selected.&#160; For this reason I often end up duplicating symbols so that I can have more than one of them on the same layer and still have the frame navigation tools work properly (as well as <a href="http://blog.pinkandaint.com/flash-jsfl-commands-the-autotweener/">autotween</a>, which runs into a similar problem).</li>
</ol>
<p>Here’s a video demonstrating my navigation tools:</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:90318ae0-4b4f-4878-91d3-f93d4545d989" class="wlWriterEditableSmartContent">
<div><object width="569" height="320"><param name="movie" value="http://www.youtube.com/v/iiNw95Pju7Q?hl=en&amp;hd=1"></param><embed src="http://www.youtube.com/v/iiNw95Pju7Q?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="569" height="320"></embed></object></div>
</div>
<p>And here’s a download link for the installation file:</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/frame_navigation_commands.mxp"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" border="0" align="center" src="http://blog.pinkandaint.com/wp-content/uploads/download_icon.png" />Frame Navigation Commands</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/flash-extensions-frame-navigation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash Panel Extension: Autosaver</title>
		<link>http://blog.pinkandaint.com/flash-panel-extension-autosaver/</link>
		<comments>http://blog.pinkandaint.com/flash-panel-extension-autosaver/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 05:21:20 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Tools]]></category>
		<category><![CDATA[Rant]]></category>
		<category><![CDATA[WindowSWF]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/flash-panel-extension-autosaver/</guid>
		<description><![CDATA[Every time a new version of Flash is released I get excited and hopeful. On each new version, though, the excitement and hope is less and less. Adobe just never seems to address areas that I think need addressing.&#160; Sometimes they even make things worse, such as in the transition from CS4 to CS5. CS5 [...]]]></description>
			<content:encoded><![CDATA[<p>Every time a new version of Flash is released I get excited and hopeful. On each new version, though, the excitement and hope is less and less. Adobe just never seems to address areas that I think need addressing.&#160; Sometimes they even make things worse, such as in the transition from CS4 to CS5. CS5 and CS5.5 have this problem with a delay in updating the stage after executing a JSFL command.&#160; It makes several of my commands <em>much</em> less useful, and I wasn’t ever able to figure out a workaround.&#160; It impacts my workflow so much that I still don’t use Flash CS5 if I don’t have to.</p>
<p>One thing that they did do right, though, was adding auto-save to Flash CS5.5.&#160; It boggled my mind why it was missing for so many years, particularly in a program that crashes as much as Flash does. Who can say what lurks in the minds of the Flash architects?&#160; At least it arrived eventually and people can finally be secure that they aren’t going to lose their work if Flash crashes.</p>
<p>What, then, about the rest of us who haven’t upgraded?&#160; Several years ago, long before CS5.5 existed, I got frustrated with the lack of autosave so I went out looking for a plugin that would do the job for me.&#160; I found <a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&amp;extid=1008520" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail_amp_extid=1008520&amp;referer=');">this auto-save WindowSWF panel</a>, one that was a little too basic for me.&#160; It had several fundamental problems that made it, in the end, not quite good enough. First, its layout is poor, making it take a lot of screen real-estate.&#160; Second, it’s disabled by default, and it doesn’t remember its previous setting when Flash is started (meaning you have to remember to set it going every time you start Flash).&#160; Third, it saves over the current file and you can’t roll back to a previous version unless you were careful to save off iterations manually.</p>
<p>So I had finally had enough and I sat down to write a better one.&#160; I ended up making one that works through the same basic system – a WindowSWF panel – but much more thought-out and featureful. Here’s what mine looks like:</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/image4.png" rel="shadowbox[sbpost-164];player=img;"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.pinkandaint.com/wp-content/uploads/image_thumb4.png" width="244" height="161" /></a></p>
<p>There are three controls here.</p>
<ul>
<li><strong>Minutes between saves</strong>: controls how often the autosaver will save your file </li>
<li><strong>Keep how many old copies</strong>: you can have it keep up to nine old versions of your file.&#160; All the old files are stored in a subfolder of the folder your FLA is in, so your main directory doesn’t get cluttered with autosave files. </li>
<li><strong>Enable</strong>: disables the autosaver if it’s unchecked. </li>
<li>Additionally, there’s a readout of how long it’ll be until the next auto-save, based on how long it’s been since the file was first modified. </li>
</ul>
<p>One key thing to note is that this autosaver remembers its state, so it’ll come up exactly how you left it when you last had it open.&#160; That means that it just works and you don’t have to think about it most of the time – a vital feature of a safety backup tool like this.</p>
<p>Since it’s a WindowSWF, though, you have to keep it open all the time.&#160; If you collapse or dismiss the window it will stop running.&#160; Unfortunately that just seems to be the way these things work, so it’s not <em>totally</em> foolproof.</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/davids_autosaver.mxp"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" border="0" align="middle" src="/wp-content/uploads/download_icon.png" />David’s Autosaver installer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/flash-panel-extension-autosaver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash JSFL Commands: Fun with Transforms</title>
		<link>http://blog.pinkandaint.com/flash-jsfl-commands-fun-with-transforms/</link>
		<comments>http://blog.pinkandaint.com/flash-jsfl-commands-fun-with-transforms/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 01:32:03 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Commands]]></category>
		<category><![CDATA[Flash Tools]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/flash-jsfl-commands-fun-with-transforms/</guid>
		<description><![CDATA[Usually, the tools that Flash provides natively are sufficient for dealing with transforms (the details of a symbol’s position, rotation, skew, and scale).&#160; Sometimes, though, you need a little more.&#160; I’m going to introduce two tools today that provide more flexibility in resetting symbols back to their default transform. Reset Transform (improved) When you hit [...]]]></description>
			<content:encoded><![CDATA[<p>Usually, the tools that Flash provides natively are sufficient for dealing with transforms (the details of a symbol’s position, rotation, skew, and scale).&#160; Sometimes, though, you need a little more.&#160; I’m going to introduce two tools today that provide more flexibility in resetting symbols back to their default transform.</p>
<h3>Reset Transform (improved)</h3>
<p>When you hit ctrl-shift-Z in Flash it’ll reset the transform of all the selected symbols back to their default state.&#160; That means 100% scale, with no rotation or skew.&#160; But what if you want the default scale/rotation/skew to be something different?&#160; Wouldn’t it be nice if you could define an arbitrary transform that you wanted ctrl-shift-Z to reset a symbol back to?</p>
<p>As you may have guessed, I’ve created just such a thing. It includes two Flash commands.</p>
<ol>
<li>The first creates a reference symbol that has your definitions of your symbols’ default state.&#160; All you have to do is put all your symbols on the stage in the position you’d like them to be in by default and call <strong><em>Commands-&gt;Create symbol scale reference</em></strong>. That creates a symbol in your library called <strong><em>_symbol_scale_reference</em></strong> in which all your symbols you had selected now reside, defining their default transform. </li>
<li>The is the command that does the resetting.&#160; It simply takes the selected symbols and changes their transforms to match whatever is in <strong><em>_symbol_scale_reference.</em></strong>&#160; If the reference symbol doesn’t exist then the command’s operation is identical to the standard <strong><em>Reset Transform</em></strong> command. I recommend switching your ctrl-shift-Z keyboard shortcut over to this command, since it’s functionally the same as the original <strong><em>Reset Transform</em></strong> but with the added functionality if you want it. </li>
</ol>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/reset_transform_improved.mxp"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="download_icon" border="0" alt="download_icon" align="middle" src="http://blog.pinkandaint.com/wp-content/uploads/download_icon.png" width="48" height="48" />Reset transform (improved) installer</a></p>
<h3>Zero Transform</h3>
<p>But that’s not all!&#160; I have another even cooler extension for you today!</p>
<p>One of the functions that I sorely missed for years in Flash was <strong><em>Zero Transform</em></strong>.&#160; That’s a function that takes the current state of a symbol instance and makes it the zero point in the transform.&#160; That is, after zeroing a transform, your selected symbol won’t have changed in appearance but its transform will now be 100% scale with 0 rotation and skew. Any 3d animation program worth its salt has this functionality, so why doesn’t Flash?</p>
<p>It took some doing, but I managed to write a Zero Transform command for Flash.&#160; I use it all the time, and I think you may find it useful too.</p>
<p>Included are two commands: <strong><em>Zero transform as is </em></strong>and<strong><em> Zero transform at scale</em></strong>. The first is exactly as I described above, and the one I find most useful.&#160; The second does something very similar, except that instead of resetting the transform so that it ends up at 100% scale, it does it so that it ends up an arbitrary X and Y scales that you specify.</p>
<p>I use <strong><em>Zero transform as is </em></strong>enough that I have it bound to an easy-to-remember keyboard shortcut: ctrl-alt-Z. I think of it as a more authoritative version of ctrl-shift-Z.</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/zero_transform.mxp"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="download_icon" border="0" alt="download_icon" align="middle" src="http://blog.pinkandaint.com/wp-content/uploads/download_icon1.png" width="48" height="48" />Zero Transform installer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/flash-jsfl-commands-fun-with-transforms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dynamic Mask Symbol</title>
		<link>http://blog.pinkandaint.com/dynamic-mask-symbol/</link>
		<comments>http://blog.pinkandaint.com/dynamic-mask-symbol/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 01:02:34 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash Tools]]></category>
		<category><![CDATA[Foster's Home for Imaginary Friends]]></category>
		<category><![CDATA[Job Search]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/dynamic-mask-symbol/</guid>
		<description><![CDATA[If you’ve done any significant amount of animation in Flash then you’ve probably run into this problem. You want to give a symbol partial alpha, but that ends up giving you a big mess where each individual sub-symbol is alpha’d down, rather than just the symbol you’re actually working with. Blech! No Es Bueno I [...]]]></description>
			<content:encoded><![CDATA[<p>If you’ve done any significant amount of animation in Flash then you’ve probably run into this problem. You want to give a symbol partial alpha, but that ends up giving you a big mess where each individual sub-symbol is alpha’d down, rather than just the symbol you’re actually working with. Blech!</p>
<p>
<table border="0" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="598"><a href="http://blog.pinkandaint.com/wp-content/uploads/image2.png" rel="shadowbox[sbpost-149];player=img;"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.pinkandaint.com/wp-content/uploads/image_thumb2.png" width="557" height="449" /></a></td>
</tr>
<tr>
<td valign="top" width="598">
<p align="center"><strong>No Es Bueno</strong></p>
</td>
</tr>
</tbody>
</table>
<p>I ran into this problem once again yesterday while working on my demo reel and I decided I’d had enough.&#160; I pulled out a trick I learned from <a href="http://mbambino.net/" onclick="pageTracker._trackPageview('/outgoing/mbambino.net/?referer=');">Mike Bambino</a> while I was working at Trilogy Studios.&#160; It turns out that if you do it dynamically (using Actionscript) then you can make a mask that supports semi-transparency.&#160; It lets you do awesome neato stuff like smooth gradient masks:</p>
<p>&#160;</p>
<p>
<table border="0" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="600"><a href="http://blog.pinkandaint.com/wp-content/uploads/image3.png" rel="shadowbox[sbpost-149];player=img;"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.pinkandaint.com/wp-content/uploads/image_thumb3.png" width="544" height="445" /></a></td>
</tr>
<tr>
<td valign="top" width="600">
<p align="center"><strong>Awesome <em>and</em> Neato</strong></p>
</td>
</tr>
</tbody>
</table>
<p>What I wanted to do this time is to fade single characters in and out without affecting the other characters around them.&#160; Normally I’d do something with solid overlays to give the impression of a clean dissolve, but it wasn’t working this time.&#160; The characters were overlapping a bit, so the overlay would end up affecting both of them in an undesirable way.</p>
<p>To solve the problem I simply made a solid rectangular symbol with the relevant Actionscript in it.&#160; At run-time it gloms itself onto whatever movie clip is directly below it on the display list and says “hey you!&#160; I’m gonna be your mask now!”&#160; Then I simply fade the mask symbol on the timeline however I please in order to fade its maskee in and out.</p>
<p>Easy, huh?</p>
<p>Here’s the source code in case you’d like to apply it to your own stuff.&#160; Just put this on the first frame of your mask movie clip, then put the mask symbol directly above the thing you want to mask:</p>
<hr />
<pre>stop();
var maskee:DisplayObject;
<strong><font face="Verdana"></font></strong>
// Call the enter_frame function for the first frame
enter_frame(null);

function enter_frame(evt:Event)
{
	//trace(&quot;enter frame&quot;);

	var my_index:int = parent.getChildIndex(this);

	// Find the symbols just below this one
	maskee = parent.getChildAt(my_index - 1);

	// If there's something there, mask it.
	if(maskee)
	{
		// Cache as Bitmap must be turned on for both the mask and the maskee
		cacheAsBitmap = true;
		maskee.cacheAsBitmap = true;
		//trace(&quot;masking &quot; + maskee.name);
		maskee.mask = this;
	}
}

// Remove the reference to the mask if it gets removed from the stage
function removed_from_stage(evt:Event)
{
	maskee.mask = null;
	removeEventListener(Event.ENTER_FRAME, enter_frame)
	//trace(&quot;removed mask&quot;);
}

addEventListener(Event.REMOVED_FROM_STAGE, removed_from_stage);
addEventListener(Event.ENTER_FRAME, enter_frame)</pre>
<hr />
<p>And here’s a Flash file with it all set up and working, just to make it totally easy to see how it works:</p>
<p><a href="/wp-content/uploads/dynamic mask.fla">Dynamic mask.fla</a> (57KB)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/dynamic-mask-symbol/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New and Improved Art Brush &#8211; Now With Backward Compatibility&#8482;</title>
		<link>http://blog.pinkandaint.com/new-and-improved-art-brush-now-with-backward-compatibility/</link>
		<comments>http://blog.pinkandaint.com/new-and-improved-art-brush-now-with-backward-compatibility/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 01:22:42 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Commands]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/new-and-improved-art-brush-now-with-backward-compatibility/</guid>
		<description><![CDATA[I’ve been meaning to do this for a long time.&#160; I finally got around to finishing off some changes to the art brush tool and now I’m ready to put them up. In the main tool things are mostly the same.&#160; I fixed compatibility with CS5, so now die-hard Art Brush users can upgrade, and [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been meaning to do this for a long time.&#160; I finally got around to finishing off some changes to the art brush tool and now I’m ready to put them up.</p>
<p>In the main tool things are mostly the same.&#160; I fixed compatibility with CS5, so now die-hard Art Brush users can upgrade, and die-hard CS5 users can finally use the tool.&#160; I also improved rendering of corners.&#160; Seriously, it does corners way better now.&#160; It might still need a little improvement, but at this point changes would be a judgement call of whether they’re better or now.&#160; Basically, now what the tool does with corners is to try and make the diagonal of the corner be the same width as the brush would be at that point anyway.</p>
<p>Another thing I’ve changed is that it’s now responsive to the thickness of the pencil path that it’s following.&#160; For instance, if the line has a thickness of 2 then the resultant brush stroke will be twice as thick as in the brush symbol.&#160; This is particularly useful with the other new thing I’m introducing…</p>
<p>… a version that recolors the brush stroke!&#160; Now all the shapes in the brush symbol will be drawn out using the current fill color.&#160; This makes it possible to use the art brush tool as a more generic paintbrush, where the brush symbol only defines the shape of the resulting stroke.&#160; I use it a lot for creating linework on characters.&#160; Below is an example of the output.</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/image1.png" rel="shadowbox[sbpost-139];player=img;"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="image" border="0" alt="image" src="http://blog.pinkandaint.com/wp-content/uploads/image_thumb1.png" width="544" height="343" /></a></p>
<p>One of the advantages of the new “recoloring” art brush is that it’s more backward compatible.&#160; In fact, it may be compatible as far back as Flash MX 2004!&#160; I can’t say for sure, since I don’t have a copy of that program.&#160; I would definitely be interested to hear results from anyone who tries it on a version of Flash prior to CS4.&#160; Leave comments here or <a href="mailto:david@pinkandaint.com">email me</a>.</p>
<p>As a reminder, these tools are free for non-commercial use but there’s a small fee if you’d like to use them in a commercial setting.&#160; <a href="mailto:david@pinkandaint.com">Contact me</a> for more information.</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/Art%20brush.mxp">Art Brush installer</a> (45kb download)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/new-and-improved-art-brush-now-with-backward-compatibility/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Hooray for Re-Use!</title>
		<link>http://blog.pinkandaint.com/hooray-for-re-use/</link>
		<comments>http://blog.pinkandaint.com/hooray-for-re-use/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 08:45:14 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Don't Fear the Sitter]]></category>
		<category><![CDATA[Festivals]]></category>
		<category><![CDATA[Flash Process]]></category>
		<category><![CDATA[Foster's Home for Imaginary Friends]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/hooray-for-re-use/</guid>
		<description><![CDATA[I just burned through about five character-seconds of animation in about five days.&#160; That feels really good.&#160; It’s significantly faster than my general rate that I’ve been keeping up ever since I resumed keeping track in April.&#160; When I finish a scene I get to mark it off in the spreadsheet I created for the [...]]]></description>
			<content:encoded><![CDATA[<p>I just burned through about five character-seconds of animation in about five days.&#160; That feels really good.&#160; It’s significantly faster than my general rate that I’ve been keeping up ever since I resumed keeping track in April.&#160; When I finish a scene I get to mark it off in the spreadsheet I created for the task, which always feels great.&#160; It’s all set up with color-changing fields that give me pleasant feedback when I finish a scene.&#160; They say, “Hey David, you’re doing a great job!&#160; Look how much you’ve done in the last five days!”</p>
<p>Part of what let me get through these two scenes so quickly was that I was able to re-use some stuff.&#160; For the first scene the framing was very similar to an earlier one, so setup was fast (pretty much just copy the previous scene’s file and the new scene is set up).&#160; For the second it was even better.&#160; I was able to use a side-view walk cycle that I created a long time ago for another scene, with only slight modifications.</p>
<p>One of the great advantages of Flash animation is the ability to adapt old animation for new scenes.&#160; That’s a major reason why it’s a good medium for television animation.&#160; When I worked on Foster’s we tried our hardest to find reuse for as many scenes as we could.&#160; We had libraries of walk cycles, character poses, hands, arms, legs, and endless gobs of uncategorized old scenes that the animation director was able to help us find if we needed them.&#160; The thing that’s great about it is that it’s not carved in stone.&#160; It’s pretty easy to make little tweaks to old animation in Flash.&#160; Need that old walk cycle but with the head looking to the side?&#160; No problem.&#160; Different lip sync?&#160; Easy.</p>
<p>Unfortunately reuse hasn’t been as helpful on Don’t Fear the Sitter, since it’s just this one episode.&#160; If I could stretch it out into a series that would be great, since I wouldn’t have to build the character models again, and I would have a bunch of reusable animation from the first one.&#160; I may some day try and figure out a way to adapt it into a series, particularly if the short ends up doing well on the festival circuit.&#160; If it comes to that, I’ll definitely be glad I made this thing in Flash.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/hooray-for-re-use/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Flash Tool: The Self-Rendering V-Cam</title>
		<link>http://blog.pinkandaint.com/new-flash-tool-the-self-rendering-v-cam/</link>
		<comments>http://blog.pinkandaint.com/new-flash-tool-the-self-rendering-v-cam/#comments</comments>
		<pubDate>Sun, 09 May 2010 00:19:48 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Runtime Tools]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/new-flash-tool-the-self-rendering-v-cam/</guid>
		<description><![CDATA[Today I’m going to introduce you to a tool I developed a while ago that I finally got ready for public release.  It’s a modification of the concept of the V-Cam, a tool that’s been around for a while in the Flash world. “V-Cam” stands for “virtual camera.”  It’s a tool that lets you define [...]]]></description>
			<content:encoded><![CDATA[<p>Today I’m going to introduce you to a tool I developed a while ago that I finally got ready for public release.  It’s a modification of the concept of the V-Cam, a tool that’s been around for a while in the Flash world.</p>
<p>“V-Cam” stands for “virtual camera.”  It’s a tool that lets you define the viewport of your Flash movie with a rectangular “viewfinder”, rather than just with the location of your subject on the stage.  This means that you can leave your drawing in one location on the stage, then animate the V-Cam all over the place, including rotation, skewing, etc, and that view will be the one you see in the final product.  It’s a very useful tool, making framing much more intuitive.<span id="more-133"></span></p>
<p>Initially, the problem with the V-Cam that was available online was that it was written only for Actionscript 2.  So I updated it to work with Actionscript 3, since everything I was working on was in the newer version of the language.  I believe someone else has done the same and already released the result online, and many people use it and love it.  I’ve never tried that other one, since I already had my own.</p>
<p>But there’s a problem with using the V-Cam.  Flash is bad at rendering out movies that use Actionscript.  Early on, Flash couldn’t do it at all, and one had to resort to less-than-perfect third-party programs to do the job.  They weren’t so good because they didn’t generally support transparency and the decent ones cost a bunch of money.</p>
<p>Luckily, Adobe caught on and added a feature to Flash that allowed rendering straight to quicktime from Flash, including all Actionscripted dynamic content.  Flash people the world over rejoiced, right up until they actually tried the new feature.  Well, it turned out that it couldn’t be relied upon.  It would drop frames without any notification, so you ended up with a movie that was a different length than the one you started with.  That might be okay for people simply trying to make a quick-and-dirty static version of their Flash movie, but it super-sucked for anyone with tight, frame-accurate editing (such as what you might do if you were animating in Flash and assembling your final product in Premiere or Final Cut, or if you were dealing with lipsync).</p>
<p>So what was I to do?  I didn’t think I <em>could</em> do anything at first, but then I stumbled across a solution.  What if I could make the Flash movie render <em>itself</em> out to disk?  Actionscript has lots of built-in functions, including, it turns out, a PNG encoder.  Combine that with AIR’s ability to write files to the hard drive and suddenly it started to look like I could really do this thing.</p>
<p>So here’s what I came up with: a V-Cam that will not only operate like you would expect a V-Cam to, but it will also save a PNG sequence of itself to disk.  We’re talking full transparency, frame-by-frame precision, no dropped frames or frames missing at the beginning or end, and full support of all filters and color transform information (tint, alpha, etc).  It just does it.</p>
<p>Unfortunately there are a few caveats.</p>
<ol>
<li>You have to compile your SWF as an AIR application.  It won’t work with the regular Flash player.  This is because the regular Flash player doesn’t allow any significant writing to the local hard disk.  It means that you’ll pretty much have to run your movie with the “Test Movie” command from Flash – double-clicking on an AIR SWF doesn’t execute any actionscript.  There actually is a way do run the SWF directly, though, and I’d be happy to help anyone out who wants to do this.</li>
<li>I don’t do much interactive stuff.  Most of what I use the V-Cam for is non-dynamic animation (perhaps with the occasional actionscript-powered effects).  I’m not sure if this thing’ll work at all with interactive movies.  Again, if enough people ask for it I may do something about that.  That said, it should work with any actionscript that doesn’t require mouse-based interaction.</li>
<li>It will render out at whatever size the SWF window is currently.  The easiest way to control that is to set the document size.  This means it’s easy to develop your animation at, for instance, 640&#215;360 (16&#215;9 aspect ratio), then later render at 720&#215;480 or 1920&#215;1080 or whatever you like – just set the document size to your desired resolution.  I just want to warn you that if you’re dealing with standard-def video you’ll be doing yourself a big favor if you learn all you can about screen aspect ratios, pixel aspect ratios, resolutions, and all that good stuff.</li>
<li>It won’t properly take account of pixel aspect ratio in your output PNG files.  They are likely to look stretched if you’re targeting a screen with non-square pixels (such as standard-def video).  You just have to make sure that the program in which you’re using the PNG sequence knows that it should interpret those files as if they have non-square pixels.  For instance, in Adobe Premiere, right-click on the image sequence in the library and select “interpret footage…” and set the correct pixel aspect ratio.  If you’re targeting a computer display or HD video you don’t need to worry about any of this.</li>
</ol>
<p>Here’s how to set up your Flash file to use this new V-Cam:</p>
<ol>
<li>In your Flash document’s publish settings, in the Flash tab, under “Player” choose “Adobe AIR” (if there’s more than one version  choose the highest one unless you have a good reason to choose a lower one).</li>
<li>It’s best to keep your file to a single scene.  I haven’t worked out a way to make it work correctly between multiple scenes.  Perhaps in the next version?</li>
<li>Make sure your V-Cam exists on the first frame of the animation, and contiguously everywhere you want to use it for rendering to PNG sequence.  If the V-Cam is removed from the stage and brought back it won’t resume saving the sequence (this is why it won’t currently work between scenes).</li>
<li>Make sure you’re you’re using the correct version of the V-Cam for your project.  It should have an unmodified aspect ratio equal to the aspect ratio of your target screen – usually either 4:3 or 16:9 if you’re targeting video. While any version of the V-Cam will work in any file, it’ll probably be less of a headache if you can ctrl-shift-Z it back to the same aspect ratio as your stage.</li>
<li>Set your document to have the same aspect ratio as the V-Cam.  It’s not necessary to have exactly the same resolution as the active area of the vV-Cam – just resize it to whatever size you want to use.</li>
<li>If you want to target standard-def video, use the 4:3 V-Cam and give your document a resolution of 720&#215;480.   This will result in non-square pixels when you squish it into a 4&#215;3 screen aspect ratio.</li>
<li>While the movie is running:
<ol>
<li>Hit shift-insert to save a PNG sequence.  The animation will start saving itself  in a subdirectory of the one that your FLA is in, called swf_render/&lt;fla_name&gt;.</li>
<li>Hit PgUp to see the timeline nav bar</li>
<li>Hit &lt;space&gt; to pause or resume playback</li>
<li>Stretch the playback window to change its size.  In its default mode the movie will stretch to fit the window.</li>
<li>Hit PgDn to switch to the mode where aspect ratio is preserved.  In this mode you can resize the playback window and the movie will expand uniformly to touch the edge of the window, filling any extra space with black.</li>
<li>While rendering, hit &lt;esc&gt; to stop.</li>
</ol>
</li>
<li>The rendering will finish when the movie reaches its last frame</li>
</ol>
<p>Here’s a video explaining how to use the tool, mostly repeating what I’ve explained above.  I recommend watching it in high-def for best results:</p>
<div id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:fbe3858d-4799-4a3f-b63c-11d62e302e16" class="wlWriterEditableSmartContent" style="margin: 0px auto; padding: 0px; width: 425px; display: block; float: none;">
<div><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/IaSkgVbks7g&amp;hl=en" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://www.youtube.com/v/IaSkgVbks7g&amp;hl=en"></embed></object></div>
</div>
<p>Finally, the download:</p>
<blockquote><p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/self_rendering_vcam.zip">Self-rendering virtual camera for Flash</a> (73 KB)</p></blockquote>
<p><span style="color: #777777;">This tool is released under the Creative Commons <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" onclick="pageTracker._trackPageview('/outgoing/creativecommons.org/licenses/by-nc-sa/3.0/?referer=');">Attribution-Noncommercial-Sharealike 3.0 license</a>.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/new-flash-tool-the-self-rendering-v-cam/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Apple is wandering in the direction of Lawful Evil</title>
		<link>http://blog.pinkandaint.com/apple-is-wandering-in-the-direction-of-lawful-evil/</link>
		<comments>http://blog.pinkandaint.com/apple-is-wandering-in-the-direction-of-lawful-evil/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 20:28:13 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/apple-is-wandering-in-the-direction-of-lawful-evil/</guid>
		<description><![CDATA[Some of you may have heard about the kerfuffle in the last few days between Apple and Adobe. Briefly, Apple made a change to their developer agreement that makes it against the rules to use any language other than C, C++, Objective C, or Javascript when making applications for the iPhone/iPod/iPad. Furthermore, they&#8217;ve disallowed abstraction [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you may have heard about the kerfuffle in the last few days between Apple and Adobe.  Briefly, Apple made a change to their developer agreement that makes it against the rules to use any language other than C, C++, Objective C, or Javascript when making applications for the iPhone/iPod/iPad.  Furthermore, they&#8217;ve disallowed abstraction or compatibility libraries.  The practical upshot of this is that Adobe&#8217;s most-touted feature in its new version of Flash, the ability to compile directly to an iPhone, is now pretty much worthless.  Have no doubt, this was a change directed firmly at Adobe, and it encroaches into the region of Evil and perhaps Monopolistic.  <a href="http://theflashblog.com/?p=1888" onclick="pageTracker._trackPageview('/outgoing/theflashblog.com/?p=1888&amp;referer=');">This post</a> at the Flash Blog pretty much sums up my feelings.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/apple-is-wandering-in-the-direction-of-lawful-evil/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Better Art Brush</title>
		<link>http://blog.pinkandaint.com/a-better-art-brush/</link>
		<comments>http://blog.pinkandaint.com/a-better-art-brush/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 05:33:28 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Commands]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/a-better-art-brush/</guid>
		<description><![CDATA[One of the main things I was thinking of doing to improve the Art Brush tool was to give it the ability to add vertices to the brushstroke.&#160; That would mean it could more easily follow the paths the user defined without requiring the manual addition of vertices to the brush symbol.&#160; Well, it turned [...]]]></description>
			<content:encoded><![CDATA[<p>One of the main things I was thinking of doing to improve the Art Brush tool was to give it the ability to add vertices to the brushstroke.&#160; That would mean it could more easily follow the paths the user defined without requiring the manual addition of vertices to the brush symbol.&#160; Well, it turned out to be pretty easy, and I implemented it yesterday and today.&#160; So as of now, the Add Vertices tool is no longer necessary.&#160; I’d encourage anyone who downloaded the Art Brush tool before Wednesday April 7th to re-download it.&#160; It’ll be a significantly friendlier tool to use, and no more will you have to think about whether your brush symbol has enough vertices to follow your complex path.</p>
<p>For convenience, here’s the download link again:</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/Art%20brush.mxp">Art Brush installer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/a-better-art-brush/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

