<?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>[mck] &#187; tutorial</title>
	<atom:link href="http://www.matthijskamstra.nl/blog/index.php/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.matthijskamstra.nl/blog</link>
	<description>a polymath zapper</description>
	<lastBuildDate>Fri, 27 Jan 2012 22:32:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Papertoy design &#8211; The basics</title>
		<link>http://www.matthijskamstra.nl/blog/index.php/2009/07/08/papertoy-design-the-basics/</link>
		<comments>http://www.matthijskamstra.nl/blog/index.php/2009/07/08/papertoy-design-the-basics/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 14:29:53 +0000</pubDate>
		<dc:creator>Matthijs Kamstra</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Urban papercraft]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Papercraft]]></category>
		<category><![CDATA[PaperToy]]></category>
		<category><![CDATA[PaperToyBook]]></category>
		<category><![CDATA[PaperToys]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.matthijskamstra.nl/blog/?p=928</guid>
		<description><![CDATA[One of my most popular post is about how to create papertoys (How to create your own papercraft). It seems that a lot of people are interested in papertoys and how to make themselves. But there is not a lot of information about it, so I started this series. Do you want to know more [...]]]></description>
			<content:encoded><![CDATA[<p>One of my most popular post is about how to create papertoys (<a href="http://www.matthijskamstra.nl/blog/index.php/2007/03/21/how-to-create-your-own-papercraft/">How to create your own papercraft</a>).<br />
It seems that a lot of people are interested in papertoys and how to make themselves.<br />
But there is not a lot of information about it, so I started this series.<br />
Do you want to know more about my reasons <a href="http://www.matthijskamstra.nl/blog/index.php/2009/04/22/pre-post-about-urban-paper-toy-tutorials/">read this</a>.</p>
<p>Because I have not a plan about writing about this, I will call this <b>Lesson 1 &#8211; The Cube</b></p>
<h2>The basics&#8230;</h2>
<p>The first shape you will run into when you start with papertoys is the cube. It&#8217;s easy to recognize: all sides (width, height, depth) are the same.</p>
<p><img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/cube_3d.gif" alt="cube 3d" title="cube 3d" width="500" height="400" class="alignnone size-full wp-image-975" /><br />
When you build one, it will look something like the one you see above. Not really impressive, yet.</p>
<h2>Flat version of a cube</h2>
<p>Okay, you probably know how a cube looks, but how does it look flat on a piece of paper:<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/cube_flat.gif" alt="cube flat" title="cube flat" width="449" height="359" class="alignnone size-full wp-image-978" /></p>
<h2>How do I make it into a Urban Papertoy? </h2>
<p>For the cube I see 2 methods:<br />
1. Design a pattern/print for it.<br />
2. Add stuff to the cube.</p>
<h2>Method 1: Find a cube-pattern</h2>
<p>The thing that I do first is, print it out and build the model. It&#8217;s strange but when you can hold it, flip it, etc, you will get more ideas then when you just look for it in your head. It will get your creative juices going. Look for clues in the real world&#8230;</p>
<p>What is a cube in the real world? A dice<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_dice.gif" alt="Tutorial-cube image-dice" title="Tutorial-cube image-dice" width="300" height="240" /><br />
alarm-clock<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_alarm.gif" alt="Tutorial-cube image-alarm" title="Tutorial-cube image-alarm" width="300" height="240"  /><br />
table<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_table.gif" alt="Tutorial-cube image-table" title="Tutorial-cube image-table" width="300" height="240" /><br />
tv<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_tv.gif" alt="Tutorial-cube image-tv" title="Tutorial-cube image-tv" width="300" height="240" /><br />
box<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_box.gif" alt="Tutorial-cube image-box" title="Tutorial-cube image-box" width="300" height="240" /><br />
, &#8230;. hmmmm not a lot a stuff is really a cube&#8230;.<br />
Perhaps a little car or bus when you square them out&#8230;<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_car.gif" alt="Tutorial-cube image-car" title="Tutorial-cube image-car" width="300" height="240" /><br />
A couple of rectangle shaped object can make a cube: stack of books, cds, video, &#8230;. you get the idea.<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_books.gif" alt="Tutorial-cube image-books" title="Tutorial-cube image-books" width="300" height="240" /><br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_cds.gif" alt="Tutorial-cube image-cds" title="Tutorial-cube image-cds" width="300" height="240" /></p>
<p>But that would only create &#8220;dead&#8221; object (there are not a lot of living objects that are square), so we need to expend our horizon to other objects. </p>
<h2>Method 2: Adding stuff to the cube</h2>
<p>Now we start adding stuff. This method gives you more room to create cool stuff.<br />
Lets try a couple:<br />
Add a beak, make the cube yellow and you have a little bird.<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_littlebird.gif" alt="Tutorial-cube image-littlebird" title="Tutorial-cube image-littlebird" width="300" height="240" /><br />
Add a back fin, make the cube green and you have a prehistoric beast.<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_monster.gif" alt="Tutorial-cube image-monster" title="Tutorial-cube image-monster" width="300" height="240" /><br />
Add two wings and you have a plane&#8230;. or another bird.<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_plane.gif" alt="Tutorial-cube image-plane" title="Tutorial-cube image-plane" width="300" height="240" /><br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_bird.gif" alt="Tutorial-cube image-bird" title="Tutorial-cube image-bird" width="300" height="240" /><br />
Add an periscope, some water and you have a submarine.<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_sub.gif" alt="Tutorial-cube image-sub" title="Tutorial-cube image-sub" width="300" height="240" /><br />
Add ears and get a head.<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_head.gif" alt="Tutorial-cube image-head" title="Tutorial-cube image-head" width="300" height="240" /><br />
Sometimes it helps to rotate the object a little bit. In this case with our cube it will not help you a lot but lets try that.<br />
Add an tail and get a whale.<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_whale.gif" alt="Tutorial-cube image-whale" title="Tutorial-cube image-whale" width="300" height="240" /><br />
Add four feet and get a turtle.<br />
<img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/tutorial_cube_turtle.gif" alt="Tutorial-cube image-turtle" title="Tutorial-cube image-turtle" width="300" height="240" /><br />
You can even add an extra cube, and make a totem pole.</p>
<h2>Method 1: How to create/draw a cube-pattern</h2>
<p><img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/cube_sketch.gif" alt="cube sketch" title="cube sketch" width="500" height="400" class="alignnone size-full wp-image-976" /><br />
You can sketch everything with a cube 3d print out like I did. Then you have a global idea how you pattern should look. Then you&#8217;ll take your favorite design program (in my case Illustrator) and open the flat template and start designing.<br />
The only problem that you will need to know which part goes where <b>AND</b> and how the pattern connects to the other parts of the template.<br />
You can also build the cube, get your drawing tools out (markers, paint, pen, pencils, whatever) and color/draw the pattern that you want. When you are finished, get a scissor and cut the cube open. Scan it and redraw it, or just draw some glue tabs on it and you are done.</p>
<h2>How to create/draw the additional stuff</h2>
<p>The same as above: you can sketch everything. Or you start with building a cube and adding stuff as you go. This is a method I use a lot: it&#8217;s faster then thinking every thing out on a computer and you see at once if the measurements are correct. If you are satisfied with would you just added to the cube you can measure it with a ruler and rebuild it in your favorite design program. Or cut it of, scan it and then redraw it. </p>
<h2>Download links</h2>
<p>To get you started I have template with a blank cube for you to download. So you can try some of the technique described here in this tutorial. The zip also contains some of the stuff you can add to a cube to make it more fun.</p>
<p>Happy cut&#8217;n &#038; fold&#8217;n</p>
<p>[download of a cube/with extra's like hands]</p>
<h2>Your input is needed</h2>
<p>I&#8217;m trying to write a book about papertoys and how you can design it. It&#8217;s not for me, I already know what I&#8217;m doing, it&#8217;s for you.<br />
So if you have some questions, use the comments to say it to me.</p>
<p>No questions for me? Just let me know what you think a cube also can be?<br />
Or perhaps examples that you have seen based on a cube.</p>
<p>Use the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthijskamstra.nl/blog/index.php/2009/07/08/papertoy-design-the-basics/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>TextMate AS3</title>
		<link>http://www.matthijskamstra.nl/blog/index.php/2009/04/29/textmate-as3/</link>
		<comments>http://www.matthijskamstra.nl/blog/index.php/2009/04/29/textmate-as3/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 08:00:56 +0000</pubDate>
		<dc:creator>Matthijs Kamstra</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Open source / Freeware]]></category>
		<category><![CDATA[Tools of the trade]]></category>
		<category><![CDATA[AS2]]></category>
		<category><![CDATA[developer applications]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[SE|PY]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.matthijskamstra.nl/blog/?p=853</guid>
		<description><![CDATA[I&#8217;ve been using a code-editor for years now. I started with SEPY and now I&#8217;m using FlashDevelop. Both on Windows. A colleague of mine still uses the Flash IDE (on a mac), so I decide to help him with his transition. Sadly there is no free editor for the OSX that handles AS2/AS3, but TextMate [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using a code-editor for years now. I started with SEPY and now I&#8217;m using FlashDevelop. Both on Windows.<br />
A colleague of mine still uses the Flash IDE (on a mac), so I decide to help him with his transition.</p>
<p>Sadly there is no free editor for the OSX that handles AS2/AS3, but TextMate is not very expensive and very lightweight. So I decide that TextMate would be the programme that would get him out of Flash IDE editor.</p>
<p>With a little help of <a href="http://www.google.nl/search?q=textmate+as3">Google</a> (I haven&#8217;t used a mac for about 7 years) I found some help/instructions that are easy to follow. Sadly it didn&#8217;t work while I followed the instruction to the letter. </p>
<p>While you start reading the post below, start downloading <a href="http://www.adobe.com/products/flex/flexdownloads/index.html" class="broken_link">Flex 3.2 SDK</a>, it&#8217;s 118Mb but you&#8217;ll need it later on so why not start downloading it now.</p>
<p>Start reading here: <a href="http://blog.simongregory.com/10/textmate-actionscript-3-and-flex-bundles/">textmate actionscript 3 and flex bundles</a>, it&#8217;s about the files you will use. But besides being informative, I needed more help.<br />
I found that here: <a href="http://www.pixelate.de/blog/setting-up-a-as3-project-in-textmate">setting up a as3 project in textmate</a>, the same steps will be followed here</p>
<ol>
<li>Download <a href="http://www.macromates.com/">Textmate</a> (duh), if you want to test this, use the trail version.</li>
<li>Download <a href="http://www.adobe.com/products/flex/flexdownloads/index.html" class="broken_link">Flex 3.2 SDK</a> and extract it into your <code>Developer/SDKs</code> folder (but there are more places where you can extract it: just read this, for example <code>/Applications/Flex</code> and <code>/Developer/Applications/Flex</code> is also allowed)</li>
<li>Subversion: follow the instructions from the tutorial: its very easy (read also the note at the bottom of the post)</li>
<li>ActionScript 3 bundle from subversion: I can repeat myself: follow the instructions (to get the Terminal: Apple + space and type Terminal and get it from the list)</li>
<li>This you <strong>don&#8217;t</strong> have to do: in the new Flex 3.2 SDK it&#8217;s already included</li>
<li>I didn&#8217;t install this either and it worked just fine</li>
<li>It seems that this is not necesarry anymore (perhaps there was an update of the AS3 bundle&#8230;). But if you need it: Follow the instructions, but for the <code>TM_FLEX_FILE_SPECS    src/Main.as</code> and <code>TM_FLEX_OUTPUT        deploy/Main.swf</code> I needed some help because what ever I did, I couldn&#8217;t get the described window.<br />
I found my answer in this:</p>
<blockquote><p>That’s a little hidden. With nothing selected in the project drawer, click on the little i at the bottom. You’ll get a box to enter any variables you want for the project.</p></blockquote>
<p><em><a href="http://noahlittle.wordpress.com/2007/09/09/flex-and-actionscript-3-with-textmate-and-fcsh/">source</a></em></p>
<p>And this one was very frustrating:<strike> <code>TM_FLEX_PATH    Developer/SDKs/Your Flex SDK Folder</code></strike>: this one needed an extra slash <code>TM_FLEX_PATH    /Developer/SDKs/Your Flex SDK Folder</code> and in my case it was <code>TM_FLEX_PATH    /Developer/SDKs/flex_sdk_3</code></p>
<p>Note: Some of this is not necessary when you create a project instead of separate files: File >> New From Templates >> Actionscript 3 >> Project. Just check TM_FLEX_PATH if you installed flex in file that standard is read by Textmate. If not you need to fill it as described above (I needed to do that)
</li>
<li>The same as in the tutorial</li>
<li>The same as in the tutorial</li>
</ol>
<div class="update">If you extract the Flex SDK, you will get a folder named &#8220;<code>flex_sdk_3</code>&#8221; and the very observant reader will notice that the script used here doesn&#8217;t include the path &#8220;<code>Developer/SDKs/flex_sdk_3</code>&#8220;, so that is the reason you need to add it to the &#8220;shell variables&#8221; (number 7). You can also rename the folder to &#8220;<code>flex_sdk_3.2.0</code>&#8221; and then I don&#8217;t think you need to add it to the shell variables, but I haven&#8217;t tested it!</div>
<p>Some extra information: svn is something that not everybody will use. So if you have no idea what it is, the bundle can also be installed without subversion. But the cool thing about subversion stuff is that it&#8217;s always up to date&#8230; (And I can&#8217;t help you with how you should fix it without svn)</p>
<div class='highlight'>Every blog mentions the price of Textmate: &#8220;single user license (€39 ? $53)&#8221;. That&#8217;s not expensive; unless you live in the Netherlands: &#8220;single user license (€48.75)&#8221; because we need to pay &#8220;Prices above include 25% VAT.&#8221; <img src='http://www.matthijskamstra.nl/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  </div>
<p>Links in this tutorial:<br />
<a href="http://blog.simongregory.com/10/textmate-actionscript-3-and-flex-bundles/">textmate actionscript 3 and flex bundles</a><br />
<a href="http://www.adobe.com/products/flex/flexdownloads/index.html" class="broken_link">Flex 3.2 SDK</a><br />
installing as3 and flex bundle for textmate.<br />
<a href="http://noahlittle.wordpress.com/2007/09/09/flex-and-actionscript-3-with-textmate-and-fcsh/">flex and actionscript 3 with textmate and fcsh</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthijskamstra.nl/blog/index.php/2009/04/29/textmate-as3/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Pre-post about Urban Paper Toy tutorials</title>
		<link>http://www.matthijskamstra.nl/blog/index.php/2009/04/22/pre-post-about-urban-paper-toy-tutorials/</link>
		<comments>http://www.matthijskamstra.nl/blog/index.php/2009/04/22/pre-post-about-urban-paper-toy-tutorials/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 22:44:43 +0000</pubDate>
		<dc:creator>Matthijs Kamstra</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Urban papercraft]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[My Blog]]></category>
		<category><![CDATA[NicePaperToys]]></category>
		<category><![CDATA[paper toy]]></category>
		<category><![CDATA[paper toys]]></category>
		<category><![CDATA[Papercraft]]></category>
		<category><![CDATA[PaperToy]]></category>
		<category><![CDATA[PaperToys]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Urban]]></category>
		<category><![CDATA[Urban-Paper-]]></category>
		<category><![CDATA[writing a book]]></category>

		<guid isPermaLink="false">http://www.matthijskamstra.nl/blog/?p=929</guid>
		<description><![CDATA[One of my most popular post is about how to create papertoys (How to create your own papercraft). It seems that a lot of people are interested in papertoys and how to make themselves. On Nice paper toys (NPT) this question pops up now and again on the forum. You can buy a book about [...]]]></description>
			<content:encoded><![CDATA[<p>One of my most popular post is about how to create papertoys (<a href="http://www.matthijskamstra.nl/blog/index.php/2007/03/21/how-to-create-your-own-papercraft/">How to create your own papercraft</a>).<br />
It seems that a lot of people are interested in papertoys and how to make themselves.<br />
On <a href="http://www.nicepapertoys.com/">Nice paper toys</a> (NPT) this question pops up now and again on the <a href="http://www.nicepapertoys.com/forum/topics/handdrawn-template-into">forum</a>.<br />
You can buy a book about it, if you want to know more about it: <a href="http://www.amazon.com/Urban-Paper-Designer-Toys-Build/dp/1600611230">Urban paper toys</a> (well you should buy this book anyhow because I&#8217;m in it <img src='http://www.matthijskamstra.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ). </p>
<p>But besides my post about this subject you&#8217;re on your own&#8230;..<br />
Well perhaps not for long! I&#8217;ve been playing with this idea for a while now of making a tutorial series about papertoy and how you can make one yourself. That got me thinking&#8230;.<br />
It seems that people really enjoy making/creating papertoys, so why not make a book about it?</p>
<p>&#8230;&#8230; hmmm a book, I have never thought about writing a book (grammar is not really my thing, not in English and not in my native tongue), I never wrote a book or designed one (well&#8230; not recently).<br />
So I have no idea where this series is taking me, but here it is:</p>
<p>I want to make a &#8220;book&#8221; about creating/designing Urban Paper toys. But I&#8217;m a internet designer/developer, I have no experience with book design, no experience with writing a book and no idea how to do it.<br />
It doesn&#8217;t matter, I have my blog. I can write and rewrite as much as I want.<br />
And I have something that a conventional writer doesn&#8217;t have: User generated feedback&#8230;.. (no idea what that means? It&#8217;s <strong>you</strong> giving me comments/advice/whatever and helping me write this &#8220;book&#8221; by giving comments).</p>
<p>I say &#8220;book&#8221; because you don&#8217;t really need the book, because you can read it on my blog. But for the less internet savy peeps I can create a download link for a e-book or a you can buy a book.<br />
I have searched for options to <em>Self Publish</em> and I found a couple, but these two sites seem to popup the most: <a href="http://www.lulu.com/">lulu.com/</a> and <a href="http://www.booksurge.com/">booksurge.com/</a>.<br />
But before I can think about that, I need to write about papertoys and how they are made.</p>
<p>So this week I&#8217;m focusing on how I will do this on my blog.<br />
But in the mean time, use the comments to show me what you want to know</p>
<p>And perhaps <strong>we</strong> will write a book <img src='http://www.matthijskamstra.nl/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthijskamstra.nl/blog/index.php/2009/04/22/pre-post-about-urban-paper-toy-tutorials/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Document Class in AS3</title>
		<link>http://www.matthijskamstra.nl/blog/index.php/2009/02/11/document-class-in-as3/</link>
		<comments>http://www.matthijskamstra.nl/blog/index.php/2009/02/11/document-class-in-as3/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 08:00:10 +0000</pubDate>
		<dc:creator>Matthijs Kamstra</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[AS3 migration]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[actionscript 2]]></category>
		<category><![CDATA[compiler errors]]></category>
		<category><![CDATA[document class]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[library symbol]]></category>
		<category><![CDATA[programmers]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.matthijskamstra.nl/blog/?p=794</guid>
		<description><![CDATA[A while back a read this post about the AS3 Pills #1 &#8211; Document class and it reminded me to write something about the &#8220;Document Class&#8221;. The title of this post is a little misleading: there is no &#8220;Document Class&#8221; in Actionscript 2 but this is probably the way you are searching for this problem. [...]]]></description>
			<content:encoded><![CDATA[<p>A while back a read this post about the <a href="http://www.fuoridalcerchio.net/wordpress/2008/12/17/as3pills-01/" class="broken_link">AS3 Pills #1 &#8211; Document class</a> and it reminded me to write something about the &#8220;Document Class&#8221;. The title of this post is a little misleading: there is no &#8220;Document Class&#8221; in Actionscript 2 but this is probably the way you are searching for this problem.</p>
<p>A good explanation can be found on <a href="http://www.kirupa.com/forum/showthread.php?p=1950401">kirupa.com</a> which has a ton of examples, explanations and tutorials!</p>
<p>But this is what it comes down to:</p>
<ol>
<li>create a folder with the name &#8220;Matthijs tutorials&#8221; (or use your own name, it&#8217;s not important)</li>
<li>create in the folder &#8220;Matthijs tutorials&#8221;, another folder &#8220;source&#8221;</li>
<li>save a flash file in the &#8220;source&#8221; folder: &#8220;documentClassTest.fla&#8221;</li>
<li>now we start making <code>packages</code>: create a folder &#8220;nl&#8221;</li>
<li>and save in folder &#8220;nl&#8221; a folder &#8220;matthijskamstra &#8220;</li>
</ol>
<div id="attachment_821" class="wp-caption aligncenter" style="width: 328px"><a href="http://www.matthijskamstra.nl/blog/wp-content/uploads/flashdevelop_folderstructure.jpg"><img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/flashdevelop_folderstructure.jpg" alt="Folder structure (FlashDevelop)" title="flashdevelop_folderstructure" width="318" height="228" class="size-full wp-image-821" /></a><p class="wp-caption-text">Folder structure (FlashDevelop)</p></div>
<p>Goto Adobe Flash, and create a AS3 Flash file and save it in the <code>source</code> folder.</p>
<p>Fill in the document Class: <code>nl.matthijskamstra.Main</code><br />
<em>(Flash will complain somewhat, you can ignore it for now&#8230;)</em></p>
<div id="attachment_820" class="wp-caption aligncenter" style="width: 686px"><a href="http://www.matthijskamstra.nl/blog/wp-content/uploads/documentclass.jpg"><img src="http://www.matthijskamstra.nl/blog/wp-content/uploads/documentclass.jpg" alt="Document Class" title="Document Class" width="676" height="111" class="size-full wp-image-820" /></a><p class="wp-caption-text">Document Class</p></div>
<p>Create a new class in the folder <code>matthijskamstra</code>, default (at least the default <a href="http://www.flashdevelop.org/">Flashdevelop</a> class) it will look something like this.<br />
[as]<br />
package nl.matthijskamstra {</p>
<p>	/**<br />
	 * @author Matthijs Kamstra aka [mck]<br />
	 */<br />
	public class Main {</p>
<p>		public function Main ()  {</p>
<p>		}</p>
<p>	} // end class</p>
<p>} // end package<br />
[/as]</p>
<p>If you would compile the .FLA now you will get an error (Compiler Errors):</p>
<blockquote><p>Location: Main.as, Line 1<br />
Description: 5000: The class &#8216;nl.matthijskamstra.Main&#8217; must subclass &#8216;flash.display.MovieClip&#8217; since it is linked to a library symbol of that type.</p></blockquote>
<p><em>(if you compile using flex you will get this error)<br />
</em><br />
<blockquote>Error #2023: Class Main$ must inherit from Sprite to link to the root.</p></blockquote>
<p>The first time I got this error I couldn&#8217;t understand it, luckily I do now and the answer isn&#8217;t that difficult, but if you don&#8217;t know&#8230; <img src='http://www.matthijskamstra.nl/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<ul>
<li><strong>The class &#8216;nl.matthijskamstra.Main&#8217; must subclass &#8216;flash.display.MovieClip&#8217;</strong>: the class that we just made needs to extend (be a subclass) of Movieclip (the root has a timeline)</li>
<li><strong>since it is linked to a library symbol of that type</strong>: this is strange, this says that the class is linked to a library symbol. This what puzzled me the most: I (we) didn&#8217;t link this to a library item, we linked it to the document class. The Flex error helps more, but you can see the root as a very big movie (timeline) and let the error be the error.</li>
<li><strong>Error #2023: Class Main$ must inherit from Sprite to link to the root.</strong>: why does flex say you need a to extend Sprite? Flex programmers don&#8217;t use the timeline and a Sprite is a Movieclip with just one frame.</li>
</ul>
<p>So to sum things up: there are some stuff that you need to do with a document class that you don&#8217;t have to do to an other class:<br />
First you need to extend it to Sprite or MovieClip. If you create more then one frame in the timeline you need to extend to MovieClip because MovieClip supports frames and Sprite doesn&#8217;t. I always choose to extend to MovieClip, because it covers all the bases&#8230; (a Sprite is a MovieClip with just one frame: a Sprite is not a MovieClip but a MovieClip is a Sprite)</p>
<p><em>Another error that seems to happen sometime (not if you use the default class from FlashDevelop)</em><br />
Second a document class should be public (the constructor is always public).<br />
A Constructor is a function or method that is called whenever the Class (in our case the document class) gets instantiated, it must never have a return type such as &#8220;void&#8221;</p>
<p>Don&#8217;t forget you need to import the MovieClip class: <code>import flash.display.MovieClip;</code> (see the error created by Flash)</p>
<p>So the Document Class looks now something like this:</p>
<p>[as]<br />
package nl.matthijskamstra {</p>
<p>	import flash.display.MovieClip;</p>
<p>	/**<br />
	 * @author Matthijs Kamstra aka [mck]<br />
	 */<br />
	public class Main extends MovieClip {</p>
<p>		// constructor<br />
		public function Main ()  {<br />
			trace( &#8220;Main.Main&#8221; );<br />
			init ();<br />
		}</p>
<p>		private function init ():void  {<br />
			trace( &#8220;Main.init&#8221; );<br />
		}		</p>
<p>	} // end class</p>
<p>} // end package<br />
[/as]</p>
<p>Export you Flash file and you will have two traces in you output panel</p>
<p>My default class looks similar, I add two group-imports:</p>
<pre><code>
import flash.display.*;
import flash.events.*;
</code></pre>
<p>with the &#8220;*&#8221; you import everything in that package (MovieClip, Sprite, etc)<br />
because AS3 is event based, I import everything in the events-package</p>
<p>[as]<br />
package nl.matthijskamstra {</p>
<p>	import flash.display.*;<br />
	import flash.events.*;</p>
<p>	/**<br />
	 * @author Matthijs Kamstra aka [mck]<br />
	 */<br />
	public class Main extends MovieClip {</p>
<p>		// constructor<br />
		public function Main ()  {<br />
			trace( &#8220;Main.Main&#8221; );<br />
			init ();<br />
		}</p>
<p>		private function init ():void  {<br />
			trace( &#8220;Main.init&#8221; );<br />
		}		</p>
<p>	} // end class</p>
<p>} // end package<br />
[/as]</p>
<p>That&#8217;s it, I hope this clears the mystery called Document Class<br />
Questions? You know where to place them!</p>
<p><strong>Linkdump:</strong><br />
<em>another post that I never finished, but it fits here&#8230;</em></p>
<p><a href='http://blog.andrewpaulsimmons.com/2007/07/referenceerror-error-1056-caused-by.html'>Andrew Paul Simmons: Blog: ReferenceError: Error #1056: Caused by Declaring Stage Instances Private</a>.</p>
<p>Ever got this error:<br />
<href="http://www.google.nl/search?q=ReferenceError%3A+Error+%231056%3A+Cannot+create+property>ReferenceError: Error #1056: Cannot create property</a>? No, then someone has explained it to you before you made this mistake.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthijskamstra.nl/blog/index.php/2009/02/11/document-class-in-as3/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>AS3 Flash Physics Engine Box2D</title>
		<link>http://www.matthijskamstra.nl/blog/index.php/2009/01/07/as3-flash-physics-engine-box2d/</link>
		<comments>http://www.matthijskamstra.nl/blog/index.php/2009/01/07/as3-flash-physics-engine-box2d/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 11:01:59 +0000</pubDate>
		<dc:creator>Matthijs Kamstra</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[2d engine]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[box2d]]></category>
		<category><![CDATA[box2dFlash]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[physics engine]]></category>
		<category><![CDATA[physics library]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.matthijskamstra.nl/blog/?p=725</guid>
		<description><![CDATA[I was looking for a physics engine for Flash so I started looking for one&#8230; there are a lot of engines&#8230; I won&#8217;t mention them all, there are enough people who did that already (here, here, here and here) If the list is that big, how to choose? Well I also want to use it [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for a physics engine for Flash so I started looking for one&#8230; there are a lot of engines&#8230;<br />
I won&#8217;t mention them all, there are enough people who did that already (<a href="http://blog.nothing.ch/en/2008/04/flash-physik-engines-und-ihre-performance/">here</a>, <a href="http://radassembly.com/blog/?p=29">here</a>, <a href="http://ntt.cc/2008/03/20/the-list-of-as3-physics-engine-open-source-non-open-source.html">here</a> and <a href="http://henryjones.us/articles/actionscript-3-physics-engines" class="broken_link">here</a>)</p>
<p>If the list is that big, how to choose?<br />
Well I also want to use it with <a href="http://blog.papervision3d.org/">papervision3d</a> so I googled on that and if someone checked out a <a href="http://www.google.nl/search?q=box2d+wow+ape">couple of engines</a> (<a href="http://groups.adobe.com/posts/bdadad848c" class="broken_link">this guy checked out 3</a>).<br />
And in one of my rss feeds there is a <a href="http://www.emanueleferonato.com/category/box2d/">guy who builds games</a>, and now it writing tutorials for <a class="zem_slink" href="http://www.box2d.org/" title="Box2D" rel="homepage">box2d</a> <img src='http://www.matthijskamstra.nl/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So I decided on <a href="http://box2d.org/">box2d</a>. </p>
<blockquote><p>Box2D is an open source physics engine written primarily for games. As the name suggests, Box2D is a purely 2D engine. However, Box2D has grown beyond it&#8217;s humble box simulating roots, and can now handle convex polygons and other shapes coming soon.</p></blockquote>
<p>Box2D is written in C++, but there is a port to as3: <a href="http://box2dflash.sourceforge.net/">AS3 Flash Physics Engine Box2DFlashAS3 2.0.1</a>.</p>
<div class="flash">
<object width="520" height="292">
<param name="movie" value="http://box2dflash.sourceforge.net/PhysTest201.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<param name="allowScriptAccess" value="always"></param>
<embed type="application/x-shockwave-flash" width="520" height="292" src="http://box2dflash.sourceforge.net/PhysTest201.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</div>
<blockquote><p>Box2DFlashAS3 is an open source port of <a href="http://www.gphysics.com/">Erin Catto</a>&#8216;s powerful c++ physics library Box2D.</p></blockquote>
<p>There is not a lot of information about Box2DFlashAS3 and tutorials are even harder to find.<br />
So here some useful links:</p>
<ul>
<li><a href="http://box2d.org/manual.html">The original box2D v2.0.2 C++ User Manual</a></li>
<li><a href="http://www.box2d.org/wiki/index.php?title=Manual/AS3">The box2D Flash User Manual</a></li>
<li><a href="http://www.box2d.org/wiki/index.php?title=AS3_FAQ">box2D AS3 FAQ (not very useful but &#8230;)</a></li>
<li><a href="http://www.box2d.org/wiki/index.php?title=Box2DFlashAS3">box2D Flash AS3</a></li>
<li><a href="http://www.emanueleferonato.com/category/box2d/">Tutorials and source by Emanuele Feronato</a></li>
<li><a href="http://www.triquitips.com/viewtopic.php?f=26&amp;t=575">Box2DAs3 For Beginners! part 1: a tutorial on triquitips</a></li>
<li><a href="http://www.triquitips.com/viewtopic.php?f=26&amp;t=582">Box2DAs3 For Beginners! part 2: a tutorial on triquitips</a></li>
<li><a href="http://shah-soft.com/%7Ewarhell/box2d/Box2DFlash%20HelloWorld.html" class="broken_link">Video tutorial for beginners</a></li>
<li><a href="http://www.clickpopmedia.com/2008/03/17/physics-in-actionscript-3/">physics in actionscript 3: Hello World</a></li>
<li><a href="http://www.actionscript.org/resources/articles/742/1/Physics-in-ActionScript-30/Page1.html" class="broken_link">Working through Hello World (previous link)</a></li>
<li><a href="http://www.box2d.org/wiki/index.php?title=List_of_tutorials">List of tutorials</a> &gt;&gt; AS3 (thx Boy Wonder!!)</li>
</ul>
<div class="update">Emanuele Feronato (an Italian PROgrammer) has written an extremely useful tutorial: <a href="http://www.emanueleferonato.com/2009/01/27/box2d-tutorial-for-the-absolute-beginners/">box2d tutorial for the absolute beginners/</a>. This one is a very good starting point!</div>
<p>I will write about the problems that I encounter with Box2D, I hope that will help you in your quest to understand box3DFlash.</p>
<div class='highlight'><strong>List of my post about Box2DFlashAS3</strong></p>
<ul>
<li><a href="http://www.matthijskamstra.nl/blog/index.php/2009/01/09/box2dflashas3-documentation/">box2dflashas3-documentation</a></li>
<li><a href="http://www.matthijskamstra.nl/blog/index.php/2009/01/11/box2dflashas3-refactored-2/">box2dflashas3-refactored-2</a></li>
<li><a href="http://www.matthijskamstra.nl/blog/index.php/2009/01/11/hello-box2d-part-1/">hello-box2d-part-1</a></li>
<li><a href="http://www.matthijskamstra.nl/blog/index.php/2009/01/12/hello-box2d-part-2/">hello-box2d-part-2</a></li>
<li><a href="http://www.matthijskamstra.nl/blog/index.php/2009/01/13/hello-box2d-part-3/">hello-box2d-part-3</a></li>
<li><a href="http://www.matthijskamstra.nl/blog/index.php/2009/01/15/hello-box2d-part-4/">hello-box2d-part-4</a></li>
</ul>
</div>
<p><em><br />
Because I&#8217;m quite lazy, I didn&#8217;t mention all the as3 physics engines but you can: just make a comment about any engine and perhaps why you are working with that engine&#8230;</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.matthijskamstra.nl/blog/index.php/2009/01/07/as3-flash-physics-engine-box2d/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

