<?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>The Highlander Blog &#187; actionscript 3</title>
	<atom:link href="http://www.highlander.co.uk/blog/tag/actionscript-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.highlander.co.uk/blog</link>
	<description>Thoughts and musing from within Highlander</description>
	<lastBuildDate>Thu, 02 Feb 2012 12:05:08 +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>Captivate 5.5 movies can now be embedded in Adobe Presenter modules</title>
		<link>http://www.highlander.co.uk/blog/2011/11/18/captivate-5-5-movies-can-now-be-embedded-in-adobe-presenter-modules/</link>
		<comments>http://www.highlander.co.uk/blog/2011/11/18/captivate-5-5-movies-can-now-be-embedded-in-adobe-presenter-modules/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 16:46:07 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Captivate]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Captivate 5]]></category>
		<category><![CDATA[Presenter]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=2542</guid>
		<description><![CDATA[Adobe recently released a new patch (7.07) for their Presenter product, which is bundled alongside Captivate within the Adobe eLearning Suite.  Presenter is an add-in for PowerPoint that enables you to add audio, video, and quiz questions into PowerPoint slide shows, and to publish them in Flash format for deployment to a web server or <a href='http://www.highlander.co.uk/blog/2011/11/18/captivate-5-5-movies-can-now-be-embedded-in-adobe-presenter-modules/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Adobe recently released a new patch (7.07) for their Presenter product, which is bundled alongside Captivate within the Adobe eLearning Suite.  Presenter is an add-in for PowerPoint that enables you to add audio, video, and quiz questions into PowerPoint slide shows, and to publish them in Flash format for deployment to a web server or LMS.</p>
<p>The significance of the new patch for Captivate developers is that, for the first time, Presenter supports ActionScript 3 &#8212; which means that you can now embed a Captivate 5.x movie (.swf file) within a Presenter slide.  If you tried doing this with the version of Presenter (7.06) that is included within the Adobe eLearning Suite 2.5, the result would have been a rather disconcerting flashing screen accompanied by a rapid clicking sound.</p>
<p>The Presenter 7.07 patch is free to download and install for anyone who has an existing Presenter 7 or eLearning Suite license.  However, if you have the eLearning Suite, you must complete the following steps to install the patch successfully:</p>
<ol>
<li>Uninstall your current version of Presenter (you can do this by running uninstall for the eLearning Suite, and choosing only to remove Presenter).</li>
<li>Download and install the trial version of Presenter 7.07.  You can access it from the following page:<a target="_blank" title="Adobe Presenter product page" href="http://www.adobe.com/products/presenter/" target="_blank">http://www.adobe.com/products/presenter/</a>Do not attempt to enter your eLearning Suite license number when you install Presenter 7.07 as this will not work.  Choose to install it as a trial.</li>
<li>Run your eLearning Suite installer again, and choose to install Presenter.  This will activate a licensed version of Presenter, and will <strong>not</strong> revert Presenter back to 7.06 again.</li>
</ol>
<p>-Matthew</p>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2011/11/18/captivate-5-5-movies-can-now-be-embedded-in-adobe-presenter-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modelling a vehicle within Blender &#8211; final result</title>
		<link>http://www.highlander.co.uk/blog/2011/06/22/modelling-a-vehicle-within-blender-final-result/</link>
		<comments>http://www.highlander.co.uk/blog/2011/06/22/modelling-a-vehicle-within-blender-final-result/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 11:46:58 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Blender]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Blender 2.5]]></category>
		<category><![CDATA[Open source]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=1638</guid>
		<description><![CDATA[I am a big fan of the web site blendercookie.com, and they recently came out with a lovely tutorial series by Jonathan Williamson (using artwork from David Revoy), the Vehicle Modelling Series. There are over 15 hours of movies, taking you through the process of modelling a Gyrocopter, from a series of pictures. It took we <a href='http://www.highlander.co.uk/blog/2011/06/22/modelling-a-vehicle-within-blender-final-result/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I am a big fan of the web site <a target="_blank" href="http://www.blendercookie.com/" rel="nofollow">blendercookie.com</a>, and they recently came out with a lovely tutorial series by Jonathan Williamson (using artwork from <a target="_blank" href="http://www.davidrevoy.com/portfolio.html" rel="nofollow">David Revoy</a>), the <a target="_blank" href="http://cgcookie.com/vehicle-series/" rel="nofollow">Vehicle Modelling Series</a>.</p>
<p>There are over 15 hours of movies, taking you through the process of modelling a Gyrocopter, from a series of pictures. It took we a while to go through all the videos, but it was well worth it. Here is a still of my final result…</p>
<div id="attachment_1750" class="wp-caption alignnone" style="width: 310px"><a href="http://www.highlander.co.uk/blog/2011/06/22/modelling-a-vehicle-within-blender-final-result/final/" rel="attachment wp-att-1750"><img class="size-medium wp-image-1750" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/final-300x168.png" alt="Final gyrocoptor render" width="300" height="168" /></a><p class="wp-caption-text">Final gyrocoptor render</p></div>
<p>The series goes through a lot of modelling, and at the end of it I came away with a much better appreciation of Blender, its tools, and how to model. I would recommend this series to anyone who wishes to become a better modeller.</p>
<p>I now have a few more techniques to use when modelling, and also a better understanding of the steps I need to go through when modelling.</p>
<p>The model is far from perfect, I made loads of mistakes <img src='http://www.highlander.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . But at least now I can see what the problems are and I can have a good go at fixing them. After going through this series it has me wanting go back to other series that I have bought and finish them to see just how well I do. In the ensuing months I will do just that and I will post the results. Here is the timelapse movie, along with the final render&#8230;</p>

<div class="tubepress_single_video">
        <div class="tubepress_embedded_title">Modelling a Vehicle with Blender</div>
    <iframe class="youtube-player" type="text/html" width="425" height="350" src="http://www.youtube.com/embed/iBJSIi7MnqM?rel=0&amp;autoplay=0&amp;loop=0&amp;fs=1&amp;showinfo=0&amp;wmode=transparent&amp;hd=1" frameborder="0"></iframe>
    <dl class="tubepress_meta_group" style="width: 425px">
    <dt class="tubepress_meta tubepress_meta_runtime">Runtime</dt><dd class="tubepress_meta tubepress_meta_runtime">0:33</dd>
    <dt class="tubepress_meta tubepress_meta_views">Views</dt><dd class="tubepress_meta tubepress_meta_views">300</dd>
</dl>
</div>

<p>All in all I am quite happy with the result.</p>
<div class="zemanta-pixie" style="margin-top: 10px;height: 15px"><a target="_blank" class="zemanta-pixie-a" title="Enhanced by Zemanta" href="http://www.zemanta.com/"><img class="zemanta-pixie-img" style="border: none;float: right" src="http://img.zemanta.com/zemified_e.png?x-id=ef10f182-1a60-4635-bc31-f4a99119d8f4" alt="Enhanced by Zemanta" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2011/06/22/modelling-a-vehicle-within-blender-final-result/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Captivate Aggregator Projects Demystified</title>
		<link>http://www.highlander.co.uk/blog/2011/05/09/captivate-aggregator-projects-demystified/</link>
		<comments>http://www.highlander.co.uk/blog/2011/05/09/captivate-aggregator-projects-demystified/#comments</comments>
		<pubDate>Mon, 09 May 2011 22:34:26 +0000</pubDate>
		<dc:creator>matthew</dc:creator>
				<category><![CDATA[Captivate]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Captivate 5]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=1535</guid>
		<description><![CDATA[Adobe Captivate 5 comes bundled with a simple little tool called the Aggregator. The purpose of the tool is to connect together two or move Captivate movies into a shared table of contents. Here are a few random notes on the Aggregator that I have put together based on my recent experiences with it. Using <a href='http://www.highlander.co.uk/blog/2011/05/09/captivate-aggregator-projects-demystified/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Adobe Captivate 5 comes bundled with a simple little tool called the Aggregator.  The purpose of the tool is to connect together two or move Captivate movies into a shared table of contents.  Here are a few random notes on the Aggregator that I have put together based on my recent experiences with it.</p>
<p>Using the Aggregator, you create a special Aggregator project file, which has a .aggr extension.  This file is actually a .zip file (with the .zip extension changed to .aggr) containing a single xml file called data.xml.  Data.xml contacts a listing of the Captivate movies (.swf files) that are being merged together.  Although you would normally edit the .aggr file using the Aggregator tool, there is actually nothing to stop you editing the data.xml file within it using any text editor or XML editor.  You can do this by renaming the .aggr file to .zip, extracting the data.xml file, editing it, replacing it back into the .zip file, and renaming it back to .aggr.  I have found this useful as a way of editing the paths of the .swf files listed within it to be relative rather than absolute.</p>
<p>After creating an Aggregator project file, you must publish it to create a Flash file.  You then make this Flash file available to your users along with all the Captivate movies that it connects together.</p>
<p>The Aggregator tool itself is a little hidden, because it is not added to either the Start Menu or the desktop. The way to open it is either to double-click an existing .aggr file (which opens it in the Aggregator) or to select File &gt; New Aggregator Project from within Captivate.</p>
<p>One limitation of the Aggregator is that it is not possible to use it to combine Captivate 5 movies with movies that have been created with earlier versions of Captivate, even if they have been coded with ActionScript 3.0.</p>
<p>-Matthew</p>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2011/05/09/captivate-aggregator-projects-demystified/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Plotting a sine wave</title>
		<link>http://www.highlander.co.uk/blog/2010/12/28/plotting-a-sine-wave/</link>
		<comments>http://www.highlander.co.uk/blog/2010/12/28/plotting-a-sine-wave/#comments</comments>
		<pubDate>Tue, 28 Dec 2010 17:05:31 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash builder]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=933</guid>
		<description><![CDATA[Recently a trainee asked me &#8211; How do we go about plotting a sine wave?  We were doing a basic ActionScript course and I was explaining the Drawing API, and how we could easily draw circles and rectangles etc. We then got into working out distances and I mentioned that it is all down to <a href='http://www.highlander.co.uk/blog/2010/12/28/plotting-a-sine-wave/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Recently a trainee asked me &#8211; How do we go about plotting a sine wave?  We were doing a basic ActionScript course and I was explaining the Drawing API, and how we could easily draw circles and rectangles etc. We then got into working out distances and I mentioned that it is all down to Pythagoras&#8217; theorem, and from there we talked about cosine and sine and the question was  - How do we go about plotting a sine wave?</p>
<p>Well, drawing anything in ActionScript 3 can be accomplished by the lineTo() function, and it would have to run off an ENTER_FRAME event, so that gave us the skeleton functionality of our code…</p>
<div><span style="color: #99ccff">stage.addEventListener(Event.ENTER_FRAME,plotCurve);</span></div>
<div><span style="color: #99ccff">function plotCurve(e:Event):void</span></div>
<div><span style="color: #99ccff">{</span></div>
<div style="padding-left: 30px"><span style="color: #99ccff">//</span></div>
<div><span style="color: #99ccff">}</span></div>
<p>I also needed something to draw in, so I need a Sprite, and I also need to hold an x and y co-ord, so at the top of my code I put…</p>
<p><span style="color: #99ccff">var plotSprite:Sprite = new Sprite();<br />
plotSprite.x = stage.stageWidth/2;<br />
plotSprite.y = stage.stageHeight/2;<br />
addChild(plotSprite);<br />
var myX:Number = 0;<br />
var myY:Number = 0;<br />
plotSprite.graphics.lineStyle(.5,0xff0000);</span></p>
<p>And then I paused and thought &#8211; How do we plot a sine wave?</p>
<p>Well I knew we were plotting x vs y, so remembering my O level maths, all we needed was a simple sine function. And all we needed to do now was translate that into usable code. The lineTo() function takes an x and y, and since the equation we need is y = sinx, which is y = sin(x), our code now becomes…</p>
<div><span style="color: #99ccff">stage.addEventListener(Event.ENTER_FRAME,plotCurve);</span></div>
<div><span style="color: #99ccff">function plotCurve(e:Event):void</span></div>
<div><span style="color: #99ccff">{</span></div>
<div style="padding-left: 30px">
<p><span style="color: #99ccff"> </span></p>
<div><span style="color: #99ccff">plotSprite.graphics.lineTo(myX,Math.sin(myX));</span></div>
</div>
<div><span style="color: #99ccff">}</span></div>
<p>Now we are going to plot a new dot on every ENTER_FRAME, and the dot needs to move, which means we need to change our x co-ord…</p>
<div><span style="color: #99ccff">function plotCurve(e:Event):void</span></div>
<div><span style="color: #99ccff">{</span></div>
<div><span style="color: #99ccff"><br />
</span></div>
<div style="padding-left: 30px"><span style="color: #99ccff">plotSprite.graphics.lineTo(myX,Math.sin(myX));</span></div>
<div style="padding-left: 30px"><span style="color: #99ccff">myX+=.1;</span></div>
<div><span style="color: #99ccff">}</span></div>
<div>When you run it now, you do indeed get a sine wave, but a very small sine wave. So to up the amplitude and change the frequency we change the lineTo line to…</div>
<div>
<p><span style="color: #000000"> </span></p>
<div><span style="color: #99ccff">plotSprite.graphics.lineTo(myX*30,Math.sin(myX)*30);</span></div>
</div>
<div>This gives us a decent size graph. But next I wanted it to move back whilst it was generating this infinite wave, and also give it a drop shadow and try and see what some rotation does…</div>
<div>
<div><span style="color: #99ccff">import flash.display.Sprite;</span></div>
<div><span style="color: #99ccff">import flash.events.Event;</span></div>
<div><span style="color: #99ccff">import flash.display.Shape;</span></div>
<div><span style="color: #99ccff">import flash.filters.DropShadowFilter;</span></div>
<div><span style="color: #99ccff"><br />
</span></div>
<div><span style="color: #99ccff">var plotSprite:Sprite = new Sprite();</span></div>
<div><span style="color: #99ccff">plotSprite.x = stage.stageWidth/2;</span></div>
<div><span style="color: #99ccff">plotSprite.y = stage.stageHeight/2;</span></div>
<div><span style="color: #99ccff">addChild(plotSprite);</span></div>
<div><span style="color: #99ccff">var myX:Number = 0;</span></div>
<div><span style="color: #99ccff">var myY:Number = 0;</span></div>
<div><span style="color: #99ccff">var dropShadow:DropShadowFilter = new DropShadowFilter();</span></div>
<div><span style="color: #99ccff">dropShadow.color = 0xcc0000;</span></div>
<div><span style="color: #99ccff">plotSprite.filters = [dropShadow];</span></div>
<div><span style="color: #99ccff">plotSprite.graphics.lineStyle(.5,0xff0000);</span></div>
<div><span style="color: #99ccff">stage.addEventListener(Event.ENTER_FRAME,plotCurve);</span></div>
<div><span style="color: #99ccff">function plotCurve(e:Event):void</span></div>
<div><span style="color: #99ccff">{</span></div>
<div style="padding-left: 30px"><span style="color: #99ccff">plotSprite.graphics.lineTo(myX*30,Math.sin(myX)*30);</span></div>
<div style="padding-left: 30px"><span style="color: #99ccff">myX+=.1;</span></div>
<div style="padding-left: 30px"><span style="color: #99ccff">plotSprite.x-=3;//this line is to move the curve back whilst new points are being drawn</span></div>
<div style="padding-left: 30px"><span style="color: #99ccff">plotSprite.rotationY+=1;</span></div>
<div><span style="color: #99ccff">}</span></div>
<div>…and voilá this is what we get…</div>
<div>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_sine-plot_581662959"
			class="flashmovie"
			width="400"
			height="300">
	<param name="movie" value="http://www.highlander.co.uk/blog/files/2010/12/sine-plot.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.highlander.co.uk/blog/files/2010/12/sine-plot.swf"
			name="fm_sine-plot_581662959"
			width="400"
			height="300">
	<!--<![endif]-->
		<a target="_blank" href="http://get.adobe.com/flashplayer/"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>

	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
</div>
<div>Other things to try are getting it to rotate around a centre, having the curve fade off (ratter than have it move back), and maybe plot other curves and add other options.</div>
<div>It was a nice simple and fun exercise, and here are the source files if you are interested…</div>
<div><a href="http://www.highlander.co.uk/blog/files/2010/12/sine_plot.zip">sine_plot</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2010/12/28/plotting-a-sine-wave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCK and Joints visuals</title>
		<link>http://www.highlander.co.uk/blog/2010/11/28/wck-and-joints-visuals/</link>
		<comments>http://www.highlander.co.uk/blog/2010/11/28/wck-and-joints-visuals/#comments</comments>
		<pubDate>Sun, 28 Nov 2010 10:32:24 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[wck]]></category>
		<category><![CDATA[World Construction Kit]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=789</guid>
		<description><![CDATA[Going back to using WCK (World Construction Kit) and Joints, I thought I would post some more info, as someone looking at the blog post was having problems and needed some more visuals. So here are some WCK Joints visuals… Setup Library World1 Joint Ball Rectangle1 Stage various Rectangle1 objects (named) various Joint objects (not <a href='http://www.highlander.co.uk/blog/2010/11/28/wck-and-joints-visuals/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<div>Going back to using WCK (World Construction Kit) and Joints, I thought I would post some more info, as someone looking at the blog post was having problems and needed some more visuals. So here are some WCK Joints visuals…</div>
<div>Setup</div>
<div style="padding-left: 30px">Library</div>
<div style="padding-left: 60px">World1</div>
<div style="padding-left: 60px">Joint</div>
<div style="padding-left: 60px">Ball</div>
<div style="padding-left: 60px">Rectangle1</div>
<div style="padding-left: 30px">Stage</div>
<div style="padding-left: 60px">various Rectangle1 objects (named)</div>
<div style="padding-left: 60px">various Joint objects (not named)</div>
<div style="padding-left: 60px">One World1 object &#8211; all the other objects are inside this object</div>
<div>Drop a couple of Rectangle1 objects on to your stage (but inside the World1 object).</div>
<div>The Ball symbol is what I use for my Joints.</div>
<div>Now, drag over a Joint object, but position it on top of one of the Rectangle1 objects. This step is very important, as the WCK will use this overlap to work out how to make the Joint work.</div>
<div>Click on the Joint object on the stage (which should currently be on top of a Rectangle1 object). Then change the Joint properties as follows…</div>
<p><span id="more-789"></span></p>
<div>For a revolute joint…</div>
<div style="padding-left: 30px">type:revolute</div>
<div>This will create a joint around which your Rectangle1 object will revolve. Make sure you position the joint object on top of the object you wish to have revolve.</div>
<div>For a distance joint…</div>
<div style="padding-left: 30px">type:distance</div>
<div style="padding-left: 30px">target2Name: second (for example)</div>
<div>A distance joint will tie two objects together &#8211; the object the joint is actually on, and the object defined by target2Name.</div>
<div>Here are some screenshots to help…</div>
<div>
<div id="attachment_801" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.highlander.co.uk/blog/files/2010/11/distance-joint-setup.jpg"><img class="size-medium wp-image-801" src="http://www.highlander.co.uk/blog/files/2010/11/distance-joint-setup-300x112.jpg" alt="distance joint setup" width="300" height="112" /></a><p class="wp-caption-text">distance joint setup</p></div>
<div id="attachment_802" class="wp-caption aligncenter" style="width: 267px"><a href="http://www.highlander.co.uk/blog/files/2010/11/Joint-symbol-properties.jpg"><img class="size-medium wp-image-802" src="http://www.highlander.co.uk/blog/files/2010/11/Joint-symbol-properties-257x300.jpg" alt="Joint symbol properties" width="257" height="300" /></a><p class="wp-caption-text">Joint symbol properties</p></div>
<div id="attachment_803" class="wp-caption aligncenter" style="width: 291px"><a href="http://www.highlander.co.uk/blog/files/2010/11/library-setup.jpg"><img class="size-full wp-image-803" src="http://www.highlander.co.uk/blog/files/2010/11/library-setup.jpg" alt="library setup" width="281" height="97" /></a><p class="wp-caption-text">library setup</p></div>
<div id="attachment_804" class="wp-caption aligncenter" style="width: 110px"><a href="http://www.highlander.co.uk/blog/files/2010/11/distance-joint-properties.jpg"><img class="size-medium wp-image-804" src="http://www.highlander.co.uk/blog/files/2010/11/distance-joint-properties-100x300.jpg" alt="distance joint properties" width="100" height="300" /></a><p class="wp-caption-text">distance joint properties</p></div>
<div id="attachment_805" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.highlander.co.uk/blog/files/2010/11/revolute-joint-setup.jpg"><img class="size-medium wp-image-805" src="http://www.highlander.co.uk/blog/files/2010/11/revolute-joint-setup-300x42.jpg" alt="revolute joint setup" width="300" height="42" /></a><p class="wp-caption-text">revolute joint setup</p></div>
<div id="attachment_806" class="wp-caption aligncenter" style="width: 110px"><a href="http://www.highlander.co.uk/blog/files/2010/11/revolute-joint-properties.jpg"><img class="size-medium wp-image-806" src="http://www.highlander.co.uk/blog/files/2010/11/revolute-joint-properties-100x300.jpg" alt="revolute joint properties" width="100" height="300" /></a><p class="wp-caption-text">revolute joint properties</p></div>
<p>Hope this helps everyone &#8211; have fun, and play around with the other properties and see what you get.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2010/11/28/wck-and-joints-visuals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The World Construction Kit</title>
		<link>http://www.highlander.co.uk/blog/2010/09/23/the-world-construction-kit/</link>
		<comments>http://www.highlander.co.uk/blog/2010/09/23/the-world-construction-kit/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 09:27:40 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[Box2DFlash]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Flash CS5]]></category>
		<category><![CDATA[wck]]></category>
		<category><![CDATA[World Construction Kit]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=446</guid>
		<description><![CDATA[In the past, when looking for physics simulations in Actionscript 3, I used Box2DFlash. Although it worked very well, the problem was the documentation.  It was terrible, and it would take me days to work something out and go through various examples, most of which didn&#8217;t apply to the latest version of Box2DFlash, but they <a href='http://www.highlander.co.uk/blog/2010/09/23/the-world-construction-kit/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>In the past, when looking for physics simulations in Actionscript 3, I used Box2DFlash. Although it worked very well, the problem was the documentation.  It was terrible, and it would take me days to work something out and go through various examples, most of which didn&#8217;t apply to the latest version of Box2DFlash, but they were the only examples around.</p>
<p>Eventually I managed get a simple structure together, various boxes moving, bouncing and being able to be controlled by a mouse. I will eventually blog about the example I created as I think it will be a useful exercise for people usingBox2DFlash and for people who wish to see just what is possible in Actionscript 3.</p>
<p>However, when I started to get into more involved structures, joints, pulleys, etc &#8211; things rapidly wnet from bad to worse.  I just did not have the time to go through the morass of outdated tutorials and incorrect information.</p>
<p>Recently I found the World Construction Kit (WCK) &#8211; this a Flash port. It is a component framework for the Box2D Flash Alchemy Port, which allows 2D physics simulations for games / websites to be authored entirely within the Flash IDE.  Whereas, previously I would do everything in Flash Builder, now I can use Flash CS5.</p>
<p>I would also be able to use this in Flash Builder I assume, but I will try that another time. For now I thought I would put together a little example in Flash CS5 and see how easy it is compared to what I did before.</p>
<p>First off a few links…</p>
<p>This is the overview of the World Construction Kit…</p>
<p style="padding-left: 30px"><a target="_blank" rel="nofollow" href="https://github.com/jesses/wck/wiki/world-construction-kit">http://wiki.github.com/jesses/wck/world-construction-kit</a></p>
<p>Download all the files from here…</p>
<p style="padding-left: 30px"><a target="_blank" rel="nofollow" href="https://github.com/jesses/wck">http://github.com/jesses/wck</a></p>
<p>Step by step guide for setting up a simple example here…</p>
<p style="padding-left: 30px"><a target="_blank" rel="nofollow" href="https://github.com/jesses/wck/wiki/step-by-step-wck-quick-start-guide">http://wiki.github.com/jesses/wck/step-by-step-wck-quick-start-guide</a></p>
<p>I basically followed the step-by-step guide, so I will not re-create the whole set of instructions, but what I will do is give you screenshots of what you need to create and what you end up with.</p>
<p>Firstly, this what you end up with when you download your source files…</p>
<div id="attachment_488" class="wp-caption aligncenter" style="width: 187px"><a href="http://www.highlander.co.uk/blog/files/2010/09/dl-files.jpg"><img class="size-medium wp-image-488" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/dl-files-177x300.jpg" alt="downloaded files" width="177" height="300" /></a><p class="wp-caption-text">These are the files you see when you download and uncompress the source files</p></div>
<p>Next create a project folder, and create a test fla &#8211; I am using Flash CS5.  Inside that create a wck-lib folder and copy over the following…</p>
<div id="attachment_490" class="wp-caption aligncenter" style="width: 196px"><a href="http://www.highlander.co.uk/blog/files/2010/09/project-folder.jpg"><img class="size-medium wp-image-490" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/project-folder-186x300.jpg" alt="project folder" width="186" height="300" /></a><p class="wp-caption-text">This is the test project folder with all the source files copied over</p></div>
<p>Once that is done, go back to Flash and look at your fla. You need to create the following…</p>
<div id="attachment_493" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.highlander.co.uk/blog/files/2010/09/wck-test-notes.jpg"><img class="size-medium wp-image-493" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/wck-test-notes-300x147.jpg" alt="wck test file setup" width="300" height="147" /></a><p class="wp-caption-text">World Construction Kit setup</p></div>
<p>Basically you have one MovieClip set up as your world…</p>
<div id="attachment_494" class="wp-caption aligncenter" style="width: 267px"><a href="http://www.highlander.co.uk/blog/files/2010/09/world-setup.jpg"><img class="size-medium wp-image-494" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/world-setup-257x300.jpg" alt="world setup" width="257" height="300" /></a><p class="wp-caption-text">World MovieClip setup</p></div>
<p>Then you create another MovieClip that you will use as your objects within your world. These will be draggable (or not) and can act as walls, etc.</p>
<div id="attachment_495" class="wp-caption aligncenter" style="width: 267px"><a href="http://www.highlander.co.uk/blog/files/2010/09/Rectangle1-setup.jpg"><img class="size-medium wp-image-495" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/Rectangle1-setup-257x300.jpg" alt="Rectangle1 setup" width="257" height="300" /></a></p>
<p><p class="wp-caption-text">Rectangle1 MovieClip setup</p></div>
<p>This MovieClip also needs to have its Component Definition set (just RMB click on the item within the Library)…</p>
<div id="attachment_497" class="wp-caption aligncenter" style="width: 293px"><a href="http://www.highlander.co.uk/blog/files/2010/09/Rectangle1-component-definition1.jpg"><img class="size-medium wp-image-497" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/Rectangle1-component-definition1-283x300.jpg" alt="Rectangle1 component definition" width="283" height="300" /></a><p class="wp-caption-text">Rectangle1 component definition</p></div>
<p>Once this is all done you will have a world created within your fla file, and inside it are your rectangles, one of which will act as your floor. If you were to save and test your file straight away, however, you will notice that both objects fall away &#8211; this is because both are set as dynamic objects.  The object acting as your floor (or wall, etc) needs to be set as a static object.  This is done through the Properties panel…</p>
<div id="attachment_499" class="wp-caption aligncenter" style="width: 91px"><a href="http://www.highlander.co.uk/blog/files/2010/09/instance-properties.jpg"><img class="size-medium wp-image-499" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/instance-properties-81x300.jpg" alt="instance properties" width="81" height="300" /></a><p class="wp-caption-text">Instance properties</p></div>
<p>At the bottom are where you set the types…</p>
<div id="attachment_500" class="wp-caption aligncenter" style="width: 119px"><a href="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/instance-types.jpg"><img class="size-full wp-image-500" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/instance-types.jpg" alt="instance types" width="109" height="86" /></a><p class="wp-caption-text">Instance types</p></div>
<p>Once set to static, if you then save and test your file you will see one rectangle fall to the floor, the floor stays where it is, and the object can then be moved and thrown with the mouse.</p>
<p>Overall, I found the experience of setting up and working with wck very easy and enjoyable.  I am very impressed with the setup, and the ease with which I could create things. It took maybe half-an-hour of reading and testing to get this simple example working.</p>
<p>The only thing I have noticed is that when I am throwing things around, they sometimes go through other objects, rather than properly colliding &#8211; but this I suspect is down to the values of my settings, things like gravity, friction, restitution, etc. These I will play around with in another post.</p>
<p>My next example will be to see how easy it will be to make various joints and pulleys etc.</p>
<p>A few points…</p>
<p style="padding-left: 30px">the document class is wck.WCK</p>
<p style="padding-left: 30px">you also need to set the following Source and Library paths…</p>
<p style="padding-left: 30px">
<div class="mceTemp mceIEcenter" style="padding-left: 30px">
<dl>
<dt><a href="http://www.highlander.co.uk/blog/files/2010/09/Library-path.jpg"><img class="size-medium wp-image-504" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/Library-path-225x300.jpg" alt="Library path" width="225" height="300" /></a></dt>
<dd>Library path</dd>
</dl>
</div>
<p style="padding-left: 30px">
<div class="mceTemp mceIEcenter" style="padding-left: 30px">
<dl>
<dt><a href="http://www.highlander.co.uk/blog/files/2010/09/Source-path.jpg"><img class="size-medium wp-image-505" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/Source-path-225x300.jpg" alt="Source path" width="225" height="300" /></a></dt>
<dd>Source path</dd>
</dl>
</div>
<p style="padding-left: 30px">
<p style="padding-left: 30px">
<p style="padding-left: 30px">When creating new symbols, make sure that the registration point is in the centre &#8211; Box2D uses the centre point of an object for its calculations</p>
<p style="padding-left: 30px">The world symbol has a Linkage set to wck.World &#8211; all your other objects should exist within an instance of this symbol on the stage</p>
<p style="padding-left: 30px">The box symbols (Rectangle1 in this example) have a Linkage set to shapes.Box</p>
<p style="padding-left: 30px">The Rectangle1 symbol in the Library also has its Component Definition class set to wck.BodyShape</p>
<p>The great thing about this setup is that I can drag out the requisite symbol as many times as I like and position them how I like and change their properties very easily.  Each symbol can also have its own class for me to add whatever behaviours I wish. Very easy.</p>
<p style="padding-left: 30px">
<p>Here are the source files for you to play around with- let me know what you think.</p>
<p><a href="http://www.highlander.co.uk/blog/files/2010/09/wck-test.zip">wck test files</a></p>
<p>Try adding some more walls etc and see what you can do just by throwing around your objects!</p>
<p>Here is the first example that I created…</p>
<p><a href="http://www.highlander.co.uk/blog/files/2010/09/wck-test.swf">wck test1</a></p>
<p>…and here is the second version, I have just added some walls and a ceiling and another object …</p>
<p><a href="http://www.highlander.co.uk/blog/files/2010/09/wck-test2.swf">wck test2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2010/09/23/the-world-construction-kit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cleaning your Flash Builder projects</title>
		<link>http://www.highlander.co.uk/blog/2010/07/23/cleaning-your-flash-builder-projects/</link>
		<comments>http://www.highlander.co.uk/blog/2010/07/23/cleaning-your-flash-builder-projects/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 08:41:36 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[flash builder]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=383</guid>
		<description><![CDATA[In training, I frequently create examples on my mac, get them working, tweak them, and then copy them over to my trainees pcs. In doing so, I have come across a few problems that I thought I would share with you, and the solutions (not perfect) that I have  used to fix these issues. What <a href='http://www.highlander.co.uk/blog/2010/07/23/cleaning-your-flash-builder-projects/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>In training, I frequently create examples on my mac, get them working, tweak them, and then copy them over to my trainees pcs. In doing so, I have come across a few problems that I thought I would share with you, and the solutions (not perfect) that I have  used to fix these issues.</p>
<p>What I normally do is create a new Actionscript project on my mac. Create and test the files and get everything ready for the training.</p>
<p>Then I copy the whole project folder onto a training pc, and sometimes I end up with problems. For example…</p>
<p>I frequently copy a project and then paste it. then I re-name the project and also the main as file to the new project name. But doing this can cause problems sometimes…</p>
<p>…when copying and pasting projects you end up with copies of previous projects still in the bin-debug folder (which will bloat up your project size)</p>
<p>…and also there occasionally seems to crop up a problem whereby the project still looks for another as file (say Example13.as) when the project is Example15, and has been named as such, and the main application as file has been set as such. The project seems to get stuck.</p>
<p>So I found that if you go to Project &gt; Clean… and clean your projects, this should get rid of most of your problems.</p>
<p>The main issue that I could not seem to get rid of (sometimes) is that when you go to the properties of your project and look at the Application ActionScript section &#8211; you get a link to the old as file. Flash Builder knows it has been deleted, but it is still there. If you remove it from the list, something in the project still looks for it, and refuses to run your application without it.</p>
<p>The only solution I found then was to create a brand new project, name it how you want, and then copy/paste your code over.</p>
<p>So cleaning your Flash Builder projects seems to help a lot with problems like these, but not always.</p>
<p>I hope this helps everyone who gets issues like those mentioned above, and if anyone has any better solutions let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2010/07/23/cleaning-your-flash-builder-projects/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Blueprint &#8211; a Flash Builder extension</title>
		<link>http://www.highlander.co.uk/blog/2010/07/10/blueprint-a-flash-builder-extension/</link>
		<comments>http://www.highlander.co.uk/blog/2010/07/10/blueprint-a-flash-builder-extension/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 06:57:37 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[flash builder]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=372</guid>
		<description><![CDATA[Using Flash Builder a lot as I do I am always on the look out for new extensions.  Recently I came across a lovely new extension from Adobe. It is called Blueprint. Blueprint &#8211; a Flash Builder Extension, allows you to search the web for examples of code, directly within Flash Builder. For example, suppose <a href='http://www.highlander.co.uk/blog/2010/07/10/blueprint-a-flash-builder-extension/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Using Flash Builder a lot as I do I am always on the look out for new extensions.  Recently I came across a lovely new extension from Adobe. It is called Blueprint.</p>
<p>Blueprint &#8211; a Flash Builder Extension, allows you to search the web for examples of code, directly within Flash Builder.</p>
<p>For example, suppose you are  tweening and want to see what examples you can find regard the Tween class. Just highlight Tween and press CTL-B (Mac) or Alt &#8211; B (PC).</p>
<p>This brings up the Blueprint panel, with the search results.</p>
<p style="text-align: center;"><a href="http://www.highlander.co.uk/blog/files/2010/07/tween.jpg"><img class="size-medium wp-image-375 aligncenter" src="http://www.highlander.co.uk/blog/wp-content/uploads/2011/07/tween-300x149.jpg" alt="Blueprint panel" width="300" height="149" /></a></p>
<p style="text-align: left;">Now you will the results of a web search regarding the code you highlighted.</p>
<p style="text-align: left;">You can further refine your query by typing in additional terms, resize the Blueprint window to see more, and use the down arrow key to see the next example.</p>
<p style="text-align: left;">If you find something you like, just highlight it and press return and the code will be pasted into your file.</p>
<p style="text-align: left;">You do not have to highlight anything, you can just type something in a line and press CTL-B or just press CTL-B and type in something.</p>
<p style="text-align: left;">If you find something important, the current search can be pinned as a separate panel (just click on the pin icon top-right), so you can have it there permanently.</p>
<p style="text-align: left;">To install Blueprint just add the following to your software updates, as a new remote site…</p>
<p style="text-align: left;">http://download.macromedia.com/pub/labs/blueprint/fb4/</p>
<p style="text-align: left;">… and install. Here are the installation instructions…</p>
<p style="text-align: left;"><a target="_blank" rel="nofollow" href="http://labs.adobe.com/wiki/index.php/Blueprint:Installation_Instructions" target="_blank">http://labs.adobe.com/wiki/index.php/Blueprint:Installation_Instructions</a></p>
<p style="text-align: left;">This looks like a lovely utility and seems to work well, I would advise everyone to try it out and see for yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2010/07/10/blueprint-a-flash-builder-extension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ByteArrays and videos with Actionscript 3</title>
		<link>http://www.highlander.co.uk/blog/2010/05/15/bytearrays-and-videos-with-actionscript-3/</link>
		<comments>http://www.highlander.co.uk/blog/2010/05/15/bytearrays-and-videos-with-actionscript-3/#comments</comments>
		<pubDate>Sat, 15 May 2010 12:31:06 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash builder]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=316</guid>
		<description><![CDATA[ByteArrays are very useful. I use them when saving image data out in the form of jpgs or pngs. You can also use them with sound data. However someone recently asked me what about video? Can we use them to hold video data? Well, pre-flash player 10.1 the answer is no. But now with flash <a href='http://www.highlander.co.uk/blog/2010/05/15/bytearrays-and-videos-with-actionscript-3/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>ByteArrays are very useful. I use them when saving image data out in the form of jpgs or pngs. You can also use them with sound data.</p>
<p>However someone recently asked me what about video? Can we use them to hold video data?</p>
<p>Well, pre-flash player 10.1 the answer is no. But now with flash player 10.1 you can use ByteArrays and videos with Actionscript 3. The methods concerned are…</p>
<p>appendBytes()</p>
<p>appendBytesAction()</p>
<p>…running off the NetStream class.</p>
<p>I have not used them myself yet but it looks like to you may be able to now create, edit, and send your own video data (flvs only at this point from what I can make out). Something I will definitely keep an eye out for in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2010/05/15/bytearrays-and-videos-with-actionscript-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing class for Actionscript 3</title>
		<link>http://www.highlander.co.uk/blog/2010/04/08/testing-class/</link>
		<comments>http://www.highlander.co.uk/blog/2010/04/08/testing-class/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 18:24:28 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash builder]]></category>

		<guid isPermaLink="false">http://www.highlander.co.uk/blog/?p=144</guid>
		<description><![CDATA[Frequently when playing around with code I need an object to play around with. So I created a Ball.as class. This testing class for Actionscript 3  is useful because it will just create a ball, with a default size and colour, which I can override if I wish. I have also given it a bounceEffect() <a href='http://www.highlander.co.uk/blog/2010/04/08/testing-class/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Frequently when playing around with code I need an object to play around with. So I created a Ball.as class. This testing class for Actionscript 3  is useful because it will just create a ball, with a default size and colour, which I can override if I wish.</p>
<p>I have also given it a bounceEffect() and bounce() public methods.</p>
<p>These will give a bounce effect when it hits a boundary and the latter will make it move and bounce from the boundaries.  The boundary at the moment is just stage.stageWidth and stage.stageHeight, but I plan on allowing an object to be sent so that the instance can use its hight and width as the boundaries for bouncing.</p>
<p>There are also some getters and setters dealing with colour and radius, etc.</p>
<p>To stop the movement I created a haltObject() public function.</p>
<p>I just threw this together in a few minutes but I find it very useful so I thought I would share it with everyone.</p>
<p><a href="http://www.highlander.co.uk/blog/files/2010/04/Ball.zip">Ball</a></p>
<p>Here is an example of its use…</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px;font: 11.0px Monaco"><span> </span><span style="color: #80a9d4">var</span> myball:Ball = <span style="color: #343efc">new</span> Ball();</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px;font: 11.0px Monaco"><span> </span>addChild(myball);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px;font: 11.0px Monaco"><span> </span>myball.bounceEffect();</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px;font: 11.0px Monaco"><span> </span>myball.bounce();</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px;font: 11.0px Monaco">
<p style="margin: 0.0px 0.0px 0.0px 0.0px;font: 11.0px Monaco">
<p style="margin: 0.0px 0.0px 0.0px 0.0px;font: 11.0px Monaco">
<p style="margin: 0.0px 0.0px 0.0px 0.0px;font: 11.0px Monaco"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size: 13px;line-height: 19px">If anyone finds any issues, please let me know and I will update it, and if you find it useful let me know as well. I am sure that it is not perfect <img src='http://www.highlander.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </span></p>
<p>Any thoughts on improvements and additions I will also be happy to receive.</p>
<p>Also note that i have zipped up the file as a Flash Builder project, so that you can just import the whole project if you use Flash Builder. Otherwise just go to the src folder and dig out Ball.as</p>
]]></content:encoded>
			<wfw:commentRss>http://www.highlander.co.uk/blog/2010/04/08/testing-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

