<?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; Flash Commands</title>
	<atom:link href="http://blog.pinkandaint.com/category/software/flash/flash-tools/flash-commands/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>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 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>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>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>
		<item>
		<title>New Flash Extensions: Art Brush, Add Vertices, Distribute Symbol Along Path</title>
		<link>http://blog.pinkandaint.com/new-flash-extensions-art-brush-add-vertices-distribute-symbol-along-path/</link>
		<comments>http://blog.pinkandaint.com/new-flash-extensions-art-brush-add-vertices-distribute-symbol-along-path/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 19:05:14 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Commands]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/new-flash-extensions-art-brush-add-vertices-distribute-symbol-along-path/</guid>
		<description><![CDATA[Well, the art brush is working and I think it’s in a good state to release.&#160; There’s a good chance I’m going to do more work on it eventually but I think it’s to a point where people will be able to use it productively.&#160; As another example of what you can do with this [...]]]></description>
			<content:encoded><![CDATA[<p>Well, the art brush is working and I think it’s in a good state to release.&#160; There’s a good chance I’m going to do more work on it eventually but I think it’s to a point where people will be able to use it productively.&#160; As another example of what you can do with this tool, I present the following eye candy that I knocked together real quick-like:</p>
<p> <object id="tiger_tail_swish" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="660" height="330" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="align" value="middle" /><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="src" value="http://blog.pinkandaint.com/wp-content/uploads/tiger_tail_swish.swf" /><param name="name" value="tiger_tail_swish" /><param name="allowfullscreen" value="false" /><embed id="tiger_tail_swish" type="application/x-shockwave-flash" width="660" height="330" src="http://blog.pinkandaint.com/wp-content/uploads/tiger_tail_swish.swf" name="tiger_tail_swish" bgcolor="#ffffff" quality="high" allowfullscreen="false" allowscriptaccess="sameDomain" align="middle"></embed></object>    <span id="more-127"></span> This tool is a JSFL command that will take the currently selected symbol from your document’s library and map it onto the currently selected path on the stage.&#160; This means you can now create complex designs and apply them as brush strokes in your Flash files.&#160; There are a few considerations, though, when using this too.&#160; If you aren’t&#160; very keen on reading, skip ahead to the video, where I cover most of these things in glorious color:
<ul>
<li>The symbol you use as a brush must contain only raw shape data.&#160; Anything other than raw shapes, or anything at all that appears in a frame other than the first one on the top layer, will be ignored when applying the brush stroke. </li>
<li>At the moment there’s no way to control the direction in which the brush is applied.&#160; Flash is weird about how it orders its edges, so you may end up having to have two brushes for each type of stroke you want – one in one direction and a second in the other.&#160; This is pretty easy to do by just duplicating a symbol and rotating its contents 180 degrees.&#160; Just make sure when you do that that you deselect the symbol’s contents when you’re done.&#160; Another of Flash’s idiosyncrasies is that it doesn’t really finalize the new position of a shape after a rotation until you deselect it.&#160; So if you forget to deselect it the art brush tool won’t even realize that the rotation took place. </li>
<li>In your brush symbol you can use any colors, transparencies, stroke styles, etc, but beware of using bitmap and gradient fills.&#160; The fill’s transform will be reset when applied as an art brush, so it may not end up looking like you had intended. </li>
<li>When creating a new symbol to use as an art brush, remember that the brush will be applied as if the stroke is horizontal through the middle. </li>
<li><span style="text-decoration: line-through">The art brush command doesn’t create any new vertices.&#160; This means that some symbols with few vertices won’t work well when applied to complex paths.&#160; The easy fix for this is to use my other new tool, <em>Add Vertices</em>, to increase the vertex count in your brush symbol.&#160; This will make it follow the path more faithfully. </span></li>
<li>If your brush symbol has a large height (that is, the width of the brush stroke) and you apply it to a tight curve, there’s a good chance that it’ll overlap itself, causing some negative space.&#160; There isn’t really anything I can reasonably do about it programmatically, so you’ll just have to be careful in how you apply your wide brushes. </li>
<li>The art that’s applied when you run the Art Brush tool is created inside a group, making it easy to select with a single click, delete, move, etc.&#160; The path that you applied it to still exists, ungrouped, but the tool cranks its alpha down to zero, effectively making it invisible. </li>
<li>Due to how the way Flash allows creation of shapes through Javascript I had to make all empty, enclosed spaces in the brush strokes be created as filled and transparent. </li>
<li>Unfortunately the Art Brush tool only works in Flash CS4 or later. </li>
</ul>
<p>And here’s a video explaining the tool and giving a few pointers on using it:</p>
<div style="padding-bottom: 0px; margin: 0px auto; padding-left: 0px; width: 681px; padding-right: 0px; display: block; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b618d169-36c5-4b0c-808a-7a5f1ceead2c" class="wlWriterEditableSmartContent">
<div><object width="681" height="511"><param name="movie" value="http://www.youtube.com/v/Wy2JKUmhnkA&amp;hl=en"></param><embed src="http://www.youtube.com/v/Wy2JKUmhnkA&amp;hl=en" type="application/x-shockwave-flash" width="681" height="511"></embed></object></div>
</div>
<p>As a final bonus, I’m also releasing a tool that I made on the way to creating the art brush tool.&#160; It takes the currently selected symbol and places it periodically along the selected path.&#160; Something like this:</p>
<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="distribute symbols example" border="0" alt="distribute symbols example" src="http://blog.pinkandaint.com/wp-content/uploads/distributesymbolsexample.png" width="539" height="322" /></p>
<p>Without further ado, below are the tools for your downloading pleasure.&#160; <span style="text-decoration: line-through">If you download the Art Brush tool I’d strongly suggest you also get the Add Vertices tool to help whip uncooperative brush symbols into shape:</span></p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/Art%20brush.mxp">Art Brush installer</a></p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/Add%20vertices.mxp">Add Vertices installer</a></p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/Distribute%20symbol%20along%20path.mxp">Distribute Symbol Along Path installer</a></p>
<p>If you have any questions or comments I would love to hear them.&#160; If you have any trouble with the tools I would like to hear about that too.&#160; There may still be bugs remaining and I want to squash them as soon as I can.</p>
<h3>Update April 7th 2010</h3>
<p>I’ve modified the Art Brush tool so that you no longer need to worry about whether there are enough vertices in the brush symbol.&#160; Add Vertices is now no longer necessary (though I’m leaving it up, since people may find another use for it still).</p>
<h3>Update October 2nd 2010</h3>
<p>I’ve released yet another version of the art brush, New and Improved™.&#160; Check out my new post for more info on what’s changed:</p>
<blockquote><p><a href="http://blog.pinkandaint.com/new-and-improved-art-brush-now-with-backward-compatibility/">New and Improved Art Brush – Now With Backward Compatibility™</a></p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/new-flash-extensions-art-brush-add-vertices-distribute-symbol-along-path/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Flash Art Brush Tool: It Works!</title>
		<link>http://blog.pinkandaint.com/flash-art-brush-tool-it-works/</link>
		<comments>http://blog.pinkandaint.com/flash-art-brush-tool-it-works/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 19:20:48 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Commands]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/?p=123</guid>
		<description><![CDATA[As I mentioned in a previous post, for years I&#8217;ve wished for the ability to use art brushes in Flash.  I&#8217;ve found, though, through years of wishing and hoping followed by disappointment, that the Flash development team is very unlikely to add in new features that are likely to help me as an animator.  They&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in a previous post, for years I&#8217;ve wished for the ability to use art brushes in Flash.  I&#8217;ve found, though, through years of wishing and hoping followed by disappointment, that the Flash development team is very unlikely to add in new features that are likely to help me as an animator.  They&#8217;re too focused on supporting Flash as an application development platform, not as an animation medium.  I think on their list of priority customers, animators who target non-interactive media are near the bottom.</p>
<p>That&#8217;s a big reason why I started creating Flash extensions &#8212; to fill in the gaps that the Flash development teem is either unaware of or is unwilling to address.  Well, a short time ago I realized that I could probably create a tool to perform one of my all-time wished-for features: art brushes.  Illustrator&#8217;s had them for a long time.  They&#8217;re very useful in there, and they would be similarly useful in Flash.</p>
<p>After about a week and a half of work, I&#8217;ve attained success!  My art brush experiment has blossomed into an actual usable tool!  It turned out significantly better than I had hoped, with fairly quick runtime (even before I&#8217;ve done any optimization) and very good visual results.  It&#8217;s not quite ready to post for the general public but I&#8217;m interested in getting people to test it a bit and give me feedback &#8212; Tell me what new features it needs and let me know if you run into any bugs.  If you&#8217;re interested, please let me know either in the comments or <a href="mailto:david@pinkandaint.com">via email</a>.</p>
<p>To give you a tantalizing taste of the possibilities, here are some actual examples of what my new Flash art brush tool can do:</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/flash-art-brushes.png" rel="shadowbox[sbpost-123];player=img;"><img class="aligncenter size-full wp-image-124" title="flash art brushes" src="http://blog.pinkandaint.com/wp-content/uploads/flash-art-brushes.png" alt="" width="550" height="640" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/flash-art-brush-tool-it-works/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Art Brushes Are Within My Grasp</title>
		<link>http://blog.pinkandaint.com/art-brushes-are-within-my-grasp/</link>
		<comments>http://blog.pinkandaint.com/art-brushes-are-within-my-grasp/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 18:07:32 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Commands]]></category>
		<category><![CDATA[JSFL]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/?p=121</guid>
		<description><![CDATA[Oh my goodness, I&#8217;m so close. You don&#8217;t even understand. For the last week or so I&#8217;ve been using all the spare time I could find to work on a new Flash command. It&#8217;s so complex that the source file is now more than 1000 lines. To put this in perspective, I&#8217;ve never seen any [...]]]></description>
			<content:encoded><![CDATA[<p>Oh my goodness, I&#8217;m so close.  You don&#8217;t even understand.  For the last week or so I&#8217;ve been using all the spare time I could find to work on a new Flash command.  It&#8217;s so complex that the source file is now more than 1000 lines.  To put this in perspective, I&#8217;ve never seen any jsfl command that comes even close to this length, apart from my own autotweener.  To put this further in perspective, this tool will do something that Flash has never been able to do, and for which I and many of my Flash animator friends have been clamoring as long as any of us has been using Flash.</p>
<p>Curious yet?  The tool that I&#8217;m working on will map arbitrary art onto an arbitrary path.  That means you can create &#8220;art brush&#8221; symbols and then apply them to any path and have the brush bend itself to follow the path.  For instance, if you&#8217;re animating a tiger with a wagging tail, you&#8217;d just animate a line, then apply your tiger tail art to your lines.  Boom, you&#8217;ve got a wagging, serpentine tiger tail.</p>
<p>I haven&#8217;t got the tool finished yet but I thought I&#8217;d put up an image to illustrate what I&#8217;m talking about.  The image below is from the <a href="http://www.aivault.com/" onclick="pageTracker._trackPageview('/outgoing/www.aivault.com/?referer=');">Art Inspires blog</a> (<a href="http://www.aivault.com/?p=301" onclick="pageTracker._trackPageview('/outgoing/www.aivault.com/?p=301&amp;referer=');">see the original post here</a>).  It&#8217;s a screen capture from Adobe Illustrator, which has had this feature for a long time.  I&#8217;m kind of skeptical that I can make my art brushes look as good as Illustrator&#8217;s, and it will certainly be slower (since it&#8217;s written in Javascript), but either way it&#8217;s going to be awesome.  Seriously, this is sharks with frickin&#8217; lasers territory.</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/art-brush.jpg" rel="shadowbox[sbpost-121];player=img;"><img class="aligncenter size-full wp-image-122" title="art brush" src="http://blog.pinkandaint.com/wp-content/uploads/art-brush.jpg" alt="" width="532" height="487" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/art-brushes-are-within-my-grasp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Virtual animation disc</title>
		<link>http://blog.pinkandaint.com/virtual-animation-disc/</link>
		<comments>http://blog.pinkandaint.com/virtual-animation-disc/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 22:23:08 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Flash Commands]]></category>
		<category><![CDATA[JSFL]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/?p=119</guid>
		<description><![CDATA[I mentioned in my last post that I was working on a new Flash command that several people had requested, and that I&#8217;d like to have myself.  It feels good to be able to help people out with stuff like this, particularly when it also helps me   Anyway, I thought I&#8217;d talk about it [...]]]></description>
			<content:encoded><![CDATA[<p>I mentioned in my last post that I was working on a new Flash command that several people had requested, and that I&#8217;d like to have myself.  It feels good to be able to help people out with stuff like this, particularly when it also helps me <img src='http://blog.pinkandaint.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Anyway, I thought I&#8217;d talk about it a little.</p>
<p>Several graphics programs, particularly ones that deal with animation, have a feature where you can rotate the canvas to an arbitrary angle, in the same manner as an <a href="http://www.alangordon.com/s_animation.html" onclick="pageTracker._trackPageview('/outgoing/www.alangordon.com/s_animation.html?referer=');">animation disc</a>.  It&#8217;s very useful when you can&#8217;t get quite the right curve to a line unless your drawing is positioned at a good angle.  Unfortunately, Flash won&#8217;t do that.</p>
<p><span id="more-119"></span>So, I thought, could I do it manually?  The answer I came up with was: sort of.  Basically, I figured out a way to fake it.  It&#8217;s not perfect, though.</p>
<p>I implemented the functionality as a tool (accessed through the tools palette).  You use it similarly to the hand tool &#8212; click and drag to rotate all the elements on the main timeline (including any symbol you&#8217;re editing-in-place).</p>
<p>It works pretty well so far but the problem is that repeated rotation introduces more and more error in the transform matrix for each symbol, particularly the position.  It&#8217;s not a lot but it&#8217;s easily enough to be annoying if you&#8217;re doing precision positioning.</p>
<p>The other problem is that each time you use the tool it adds a bunch of entries to the history panel, meaning that to undo it you have to hit ctrl-Z like 20 or 30 times.  Not only that but any raw shapes you&#8217;re working on don&#8217;t correctly undo &#8212; they completely disappear when you undo back to before you used the rotation tool!  It&#8217;s clearly a bug with Flash&#8217;s undo system.  What I really wish, though, is that I could just tell Flash to treat each use of the tool as a single undo level &#8212; that&#8217;s how it treats commands in the Commands menu.  Does anyone know if there&#8217;s a way to do that?</p>
<p>What do you think?  Is this tool worth the negatives?  I think I can come up with a fix for the loss of precision but the undo thing is a big pain.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/virtual-animation-disc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Laurel-Resting</title>
		<link>http://blog.pinkandaint.com/no-laurel-resting/</link>
		<comments>http://blog.pinkandaint.com/no-laurel-resting/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 07:26:35 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Don't Fear the Sitter]]></category>
		<category><![CDATA[Flash Commands]]></category>
		<category><![CDATA[Flash Runtime Tools]]></category>
		<category><![CDATA[Kung Fu Panda World]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/no-laurel-resting/</guid>
		<description><![CDATA[Today was a good day.  Let me list a few of the reasons: Kung Fu Panda World went live.  I’ve been working on this virtual world since January of Last year and it’s very satisfying to see it “ship”.  This is also the first game I’ve shipped as an animator.  Long ago I was a [...]]]></description>
			<content:encoded><![CDATA[<p>Today was a good day.  Let me list a few of the reasons:</p>
<ol>
<li>Kung Fu Panda World went live.  I’ve been working on this virtual world since January of Last year and it’s very satisfying to see it “ship”.  This is also the first game I’ve shipped as an animator.  Long ago I was a software engineer and I shipped one game while I worked at Treyarch Studios.  Maybe you haven’t heard of it?<a href="http://blog.pinkandaint.com/wp-content/uploads/image.png" rel="shadowbox[sbpost-118];player=img;"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="image" src="http://blog.pinkandaint.com/wp-content/uploads/image_thumb.png" border="0" alt="image" width="241" height="342" /><span id="more-118"></span></a></li>
<li>I got a number of positive responses regarding the autotweener, including several people who seemed to be suggesting that I could make money with that kind of thing.  Hmmm, it’s an interesting thought.</li>
<li>I and two other animators, in the course of a few days, were thinking about the same “if only Flash had this feature” idea.  The two other people brought it up with me and it got me thinking: why couldn’t I program something that does that?  So I’m doing it.  Coming soon to a blog near you: an animation-disc-esque rotatable stage in Flash.  Well, sort of.  It’ll be a bit of a workaround but it should work very similarly to the rotatable canvasses in Toon Boom Studio and TV Paint.  Under normal usage you’ll probably have to remember to run a “reset” command at the end to make sure everything goes back to normal, unless you’re using a virtual camera, in which case you won’t even <em>have to</em> do that.  Speaking of which: Coming soon to a blog near you: my personal take on the virtual camera, which will flawlessly save your movie (including actionscript) as a PNG sequence that you can use in any video editing program.</li>
<li>Since we “finished” KFPW my workload has been much lighter and deadlines much looser.  When I told my animation director that I could make a tool that would rotate the stage he gave me the go-ahead to do it.  Making tools for Flash is really fun for me, so it made me happy to be able to do a little programming for a change.</li>
<li>Tomorrow’s payday (cha-ching).</li>
<li>I’m seriously considering getting a smartphone.  I bristle at the thought of having to pay $30 per month for data but I think maybe the idea is starting to win me over.  That, or buy an unlocked phone (<a href="http://www.google.com/phone" onclick="pageTracker._trackPageview('/outgoing/www.google.com/phone?referer=');">Nexus One!</a>) and don’t have any data plan at all.  I’m with AT&amp;T, and it seems that even when the phone is unsubsidized I have no choice but to get the $30 data plan if I want any mobile internet at all <img src='http://blog.pinkandaint.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </li>
</ol>
<p>Finally, I just want to comment on something that struck me as I did some animation on Don’t Fear the Sitter tonight.  Keyframes are hard.  Breakdowns are easier.  Tweens are easy.  These may seem obvious, but it really amazes me sometimes how I can spend a long time doing key poses for a character and then the rest of it just zips by.  In no time I go from just-a-suggestion-of-motion to damn-that-character’s-a-movin’.</p>
<p>I love it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/no-laurel-resting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash JSFL Commands: The Autotweener</title>
		<link>http://blog.pinkandaint.com/flash-jsfl-commands-the-autotweener/</link>
		<comments>http://blog.pinkandaint.com/flash-jsfl-commands-the-autotweener/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 06:40:59 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Don't Fear the Sitter]]></category>
		<category><![CDATA[Flash Commands]]></category>
		<category><![CDATA[Flash Process]]></category>
		<category><![CDATA[JSFL]]></category>
		<category><![CDATA[Supernews]]></category>

		<guid isPermaLink="false">http://blog.pinkandaint.com/flash-jsfl-commands-the-autotweener/</guid>
		<description><![CDATA[For the folks who aren’t Flash animators but would like to see a little bit of my process when animating, skip down and watch the movie that I link to below.  Starting at around 4 minutes in you can see an example of how I animate one of my characters in a simple motion. Anyone [...]]]></description>
			<content:encoded><![CDATA[<p><em>For the folks who aren’t Flash animators but would like to see a little bit of my process when animating, skip down and watch the movie that I link to below.  Starting at around 4 minutes in you can see an example of how I animate one of my characters in a simple motion.</em></p>
<p>Anyone who’s followed my blog so far and read the entries on Flash commands (not sure if there’s anyone like that yet – I have an admittedly small audience) will have seen me mention the Autotweener.  Well, today’s the day – I’m going to tell you all about it and post it for download.</p>
<p>The autotweener is a tool that does many of the same things as Flash’s built-in motion and shape tween functions, but it works in a fundamentally different way.  It’s incredibly useful, simplifying tasks that used to be difficult or impossible.  For my own animation process it was revolutionary – it totally changed how I do things.  I now rarely use motion tweens and even more rarely shape tweens – the autotweener has taken over almost all the tasks I used to use those for.</p>
<p><span id="more-111"></span></p>
<h3>A Little History</h3>
<p>When I worked at <a href="http://www.current.com/supernews" onclick="pageTracker._trackPageview('/outgoing/www.current.com/supernews?referer=');">Supernews</a> we did the animation for the show in a very particular way.  We would typically have the head on one layer and all the other body parts for the character on another layer.  As such it was impossible to use motion tweens, at least on the body layer.  So all our in-betweens had to be done manually, eyeballing all the positioning and rotation (we didn’t often use skews).  It would take three or four minutes to do that for each movement.</p>
<p>Of course, there are advantages to doing things that way.  With such close attention by the animator the motion can be customized to look just right, with nice arcs and all that nice stuff.  It’s slow, though (as I said, it took several minutes to do what was largely a mechanical process) and frankly it was a pain in the butt.  Over and over, moving body parts to the exact in-between point – definitely aggravating.</p>
<p>In some of my free time I started to toy with an idea I had had for a while: automating that in-betweening process.  At first I thought about trying to do it with the help of Flash’s built-in tweens but that didn’t really work out in practice.  Finally, I gave in and decided to do it the hard way, calculating out all the matrix math and all that stuff.  After a few weeks of tinkering with it in my free time I rolled out version 1.0.</p>
<p>The autotweener was a hit in the Supernews office.  It made this repetitive, tedious task much faster and almost completely automated.  Now we just had to run the autotweener, adjust a few joints so they connected properly, and it was done.  Super easy.</p>
<p>I soon realized I could make the autotweener more versatile by setting up different keyboard shortcuts for different percentage moves.  I set up 10%-90% on the ctrl-shift-number keys as well as 1/3rd and 2/3rds on alt-shift-1 and 2.  Then I realized I could go a step even further, setting up shortcuts for anticipation (-50% through –10%) and overshoot (110% through 150%).</p>
<p>Finally, after happily using the autotweener for about two years I figured out how, in a limited way, I could extend it to work on raw shapes as well.  After getting that feature to work I was finally able, for the most part, to leave behind Flash’s unreliable shape tweens.</p>
<h3>What Makes It Special</h3>
<p>There are several things that make the autotweener better than Flash’s built-in tweens:</p>
<ul>
<li>It can operate on more than one item on the same layer</li>
<li>It creates smooth transitions even if you’ve moved the pivot point of your symbol instance from one frame to the next</li>
<li>It can automate anticipation and overshooting</li>
<li>It gives you frame-by-frame control of easing</li>
<li>It can give you unambiguous, foolproof shape tweens <em>with</em> easing, overshooting and anticipating (as long as you obey some basic rules)</li>
<li>It can tween two of the same symbol on the same layer, as long as one of them is reflected and the other is not</li>
</ul>
<h3>What it can’t do</h3>
<p>While it has a lot to be said for it, there are some things it’s not good at or just it can’t do:</p>
<ul>
<li>Tween more than one symbol on the same layer when those symbols have the same reflection</li>
<li>Use motion paths</li>
<li>Tween between raw shapes with a different number of vertices</li>
<li>Tween more than one raw shape on a single layer</li>
<li>Do long, smooth tweens (this is technically possible, but Flash’s built-in motion tweens are much better at it).</li>
</ul>
<h3>How To Use It</h3>
<p>There are some guidelines I have to tell you about before you can use the autotweener.  It’s a wonderful tool but it has some unavoidable idiosyncrasies.  The best way to illustrate how to use it and what it’s good at is with this video:</p>
<div align="center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="660" height="420" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/cp/vjVQa1PpcFMkxw96X4ietDOubk5XGwNrNEl2g2POLjU=" /><embed type="application/x-shockwave-flash" width="660" height="420" src="http://www.youtube.com/cp/vjVQa1PpcFMkxw96X4ietDOubk5XGwNrNEl2g2POLjU="></embed></object></div>
<h3>Keyboard Shortcuts</h3>
<p>The autotweener works best if you set up keyboard shortcuts for using it.  At my old job at Supernews some of the animators only cared about the 50% autotween, since that’s mostly what we used there.  That way they only needed one keyboard shortcut.  For my animation process, though, I like having shortcuts for all the percentages from 10% to 90%, as well as overshooting and anticipating.</p>
<p>I have all the basic tween percentages bound to ctrl-shift-number.  It’s easy to remember, for instance, that ctrl-shift-3 is 30%.  For overshooting 110% to 150% I use ctrl-alt-shift 1 through 5.  For anticipation –50% through –10% I use ctrl-alt-shift 6 through 0.</p>
<p>I created a few other autotween commands: “Auto tween one third”, which I bound to alt-shift-1, and “auto tween two thirds” which is bound to alt-shift-2.  Finally, I created one called “Auto tween match next keyframe”, which I bound to ctrl-shift-0 (that is, tween 100%).  That one just makes the selected items match their corresponding items in the next keyframe.</p>
<p>If you try to set up the same key combinations as mine you might wonder how I set up those “one third” and “two thirds” shortcuts, since Flash claims to not allow number shortcuts without the ctrl modifier.  Well, it turns out you <em>can</em> make non-ctrl shortcuts if you directly edit the file where the shortcuts are stored.  I’ll talk further about how to do that in a subsequent post.  In the mean time if you want to quickly set up shortcuts for these you can simply add the following lines to your shortcuts file:</p>
<pre>  &lt;shortcut name="anticipate 10%" flags="29" scope="1" key="48" /&gt;
  &lt;shortcut name="anticipate 20%" flags="29" scope="1" key="57" /&gt;
  &lt;shortcut name="anticipate 30%" flags="29" scope="1" key="56" /&gt;
  &lt;shortcut name="anticipate 40%" flags="29" scope="1" key="55" /&gt;
  &lt;shortcut name="anticipate 50%" flags="29" scope="1" key="54" /&gt;
  &lt;shortcut name="overshoot 10%" flags="29" scope="1" key="49" /&gt;
  &lt;shortcut name="overshoot 20%" flags="29" scope="1" key="50" /&gt;
  &lt;shortcut name="overshoot 30%" flags="29" scope="1" key="51" /&gt;
  &lt;shortcut name="overshoot 40%" flags="29" scope="1" key="52" /&gt;
  &lt;shortcut name="overshoot 50%" flags="29" scope="1" key="53" /&gt;
  &lt;shortcut name="auto tween 10%" flags="13" scope="1" key="49" /&gt;
  &lt;shortcut name="auto tween 20%" flags="13" scope="1" key="50" /&gt;
  &lt;shortcut name="auto tween 30%" flags="13" scope="1" key="51" /&gt;
  &lt;shortcut name="auto tween 40%" flags="13" scope="1" key="52" /&gt;
  &lt;shortcut name="auto tween 50%" flags="13" scope="1" key="53" /&gt;
  &lt;shortcut name="auto tween 60%" flags="13" scope="1" key="54" /&gt;
  &lt;shortcut name="auto tween 70%" flags="13" scope="1" key="55" /&gt;
  &lt;shortcut name="auto tween 80%" flags="13" scope="1" key="56" /&gt;
  &lt;shortcut name="auto tween 90%" flags="13" scope="1" key="57" /&gt;
  &lt;shortcut name="auto tween one third" flags="21" scope="1" key="49" /&gt;
  &lt;shortcut name="auto tween two thirds" flags="21" scope="1" key="50" /&gt;
  &lt;shortcut name="auto tween match next frame" flags="13" scope="1" key="48" /&gt;</pre>
<p>The directory where your keyboard shortcuts file is located depends on your operating system:</p>
<ul>
<li>Windows Vista &amp; Windows 7:
<p><em>boot drive</em>\Users\<em>username</em>\Local Settings\Application Data\Adobe\Flash CS4\<em>language</em>\Configuration\Keyboard Shortcuts\</li>
<li>Windows XP:
<p><em>boot drive</em>\Documents and Settings\<em>username</em>\Local Settings\Application Data\Adobe\Flash CS4\<em>language</em>\Configuration\Keyboard Shortcuts\</li>
<li>Mac OS X:
<p>Macintosh HD/Users/<em>username</em>/Library/Application Support/Adobe/Flash CS4/<em>language</em>/Configuration/Keyboard Shortcuts\</li>
</ul>
<h3>Download It</h3>
<p>You can get the full set of autotween commands by downloading and opening the file below.  It should open automatically in the Adobe Extension Manager.</p>
<p><a href="http://blog.pinkandaint.com/wp-content/uploads/jsfl/autotween.mxp">autotween.mxp</a></p>
<h3>In Closing</h3>
<p>I hope the autotweener is as interesting to you as it is to me.  It revolutionized how I animate in Flash and I’d like others to have the opportunity to use it.  I hope the length of this blog post isn’t too intimidating to potential users.</p>
<p>If you have any questions please don’t hesitate to ask, either in the comments or via email.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pinkandaint.com/flash-jsfl-commands-the-autotweener/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

