<?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>Ultraviolet Design Blog &#187; ActionScript</title>
	<atom:link href="http://blog.ultravioletdesign.co.uk/index.php/category/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ultravioletdesign.co.uk</link>
	<description>Follow our latest little ditties on our blog</description>
	<lastBuildDate>Fri, 03 Sep 2010 09:57:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flixel 2.0 &#8211; Flash game development</title>
		<link>http://blog.ultravioletdesign.co.uk/flixel-2-0-flash-game-development/</link>
		<comments>http://blog.ultravioletdesign.co.uk/flixel-2-0-flash-game-development/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 09:00:24 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.ultravioletdesign.co.uk/?p=254</guid>
		<description><![CDATA[
We have finished an enjoyable project for SPAR International, which involved creating an athletics game based around the button bashing classic, Daley Thomson&#8217;s Decathlon.  When creating the graphics and style for this game we wanted to utilise the nostalgic [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.ultravioletdesign.co.uk/wp-content/uploads/2010/06/beatbarni-blogimg.jpg"><img class="alignnone size-full wp-image-257" title="beatbarni-blogimg" src="http://blog.ultravioletdesign.co.uk/wp-content/uploads/2010/06/beatbarni-blogimg.jpg" alt="beatbarni-blogimg" width="528" height="185" /></a></p>
<p>We have finished an enjoyable project for <a href="http://www.spar-international.com/" target="_blank">SPAR International</a>, which involved creating an athletics game based around the button bashing classic, <a href="http://en.wikipedia.org/wiki/Daley_Thompson's_Decathlon">Daley Thomson&#8217;s Decathlon</a>.  When creating the graphics and style for this game we wanted to utilise the nostalgic bitmap effect which you see quite often in Flash games and in the graphic style of <a href="http://en.wikipedia.org/wiki/Pixel_art">Pixel Art</a>. From a development perspective this was very convenient because I have been looking for an excuse to try the Actionscript 3 game framework, <a href="http://flixel.org/">Flixel</a>, which I have seen lorded around the Internet as perfect for this purpose.</p>
<p>It has it&#8217;s own global <a href="http://en.wikipedia.org/wiki/Rendering_(computer_graphics)">render</a> cycle which simplifies the process of adding bitmap graphics to the stage and creates a predictable <a href="http://en.wikipedia.org/wiki/Frame_rate" target="_blank">fps</a> independent game loop. Forum posts on the Flixel site state that this rendering process is more efficient than Flash player alone due to the fact that is purely geared toward low resolution bitmapped graphics. There where many elements which increased the speed of development such as the inclusion of the <a href="http://flixel.org/docs/org/flixel/FlxObject.html" target="_blank">FlxObjects</a> which are already set-up with simple motion facilities such as acceleration and velocity on both x and y axis which allow for the simulation of horizontal character movement and also vertical forces (i.e. gravity).</p>
<p>There are many other noteworthy features of the Flixel framework such as Sprites for Animation and the global/static FlxG control class which have been very well designed to make game development in Flash easier. I will, however, not go into detail about these because <a href="http://www.insideria.com/2010/06/5-things-i-learned-from-flixel.html" target="_blank">a concise post about Flixel</a> from the Inside RIA blog has covered these. For those (developers mainly, I suspect) interested in understanding the affordances of using this framework over creating a game from scratch, reading this and also exploring the host of <a href="http://flixel.org/games/">games</a> and <a href="http://wiki.github.com/AdamAtomic/flixel/" target="_blank">tutorials</a> on the Flixel site will be worthwhile. <a href="http://adamatomic.com/canabalt/" target="_blank">Canabalt</a> is a particular favourite game due to the intense screen shaking and accompanying music.</p>
<p>The game we created is called <strong><a href="http://www.ultravioletdesign.co.uk/work/project/BeatBarni">Beat Barni</a></strong> and is <strong><a href="http://www.spar-hellosummer.com/playbeatbarni/" target="_blank">online now</a></strong>. Due to time constraints we created a pentathlon (5 events) rather than a decathlon, so feel free to challenge Barni to any of the following events; 100m, 400m Hurdles, Javelin, Pole-vault and Long Jump.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ultravioletdesign.co.uk/flixel-2-0-flash-game-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Action Message Format (AMF)</title>
		<link>http://blog.ultravioletdesign.co.uk/action-message-format-amf/</link>
		<comments>http://blog.ultravioletdesign.co.uk/action-message-format-amf/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 12:55:47 +0000</pubDate>
		<dc:creator>Kirsten</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[AMF]]></category>

		<guid isPermaLink="false">http://blog.ultravioletdesign.co.uk/?p=236</guid>
		<description><![CDATA[




We have recently built a Flash Game â€“ Traitors â€“ for the Top Gear website:
The game, sponsored by Nissan, requires the user to speed through 3 levels controlling their speed by repeatedly pressing X-Y buttons as fast as they can [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter">
<dl id="attachment_237" class="wp-caption aligncenter" style="width: 538px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-237" title="Traitors Flash game title image" src="http://blog.ultravioletdesign.co.uk/wp-content/uploads/2010/04/traitor.jpg" alt="Traitors Flash game title image" width="528" height="185" /></dt>
</dl>
</div>
<p>We have recently built a Flash Game â€“ <a title="Link to Traitors Flash game" href="http://traitors.topgear.com/game/" target="_blank">Traitors</a> â€“ for the <a title="Link to Top Gear website" href="http://www.topgear.com/uk/games/" target="_blank">Top Gear website</a>:</p>
<p>The game, sponsored by Nissan, requires the user to speed through 3 levels controlling their speed by repeatedly pressing X-Y buttons as fast as they can and using their booster. For the purpose of data submission and receiving data while interacting with the webserver we decided to use <a title="AMFPHP website" href="http://www.amfphp.org/" target="_blank">AMFPHP</a> which is open-source implementation of the <a title="Action Message Format Wiki page" href="http://en.wikipedia.org/wiki/Action_Message_Format" target="_blank">Action Message Format (AMF)</a> and allows binary serialisation of Action Script (AS2 and AS3) native types and objects to be sent directly to server side services. Phew&#8230;</p>
<p>The crux of this is the ease of implementing data transfers to and from the webserver (less code on both client application and on the webserver) and the efficiency of the resultant transfer (the data being transferred is binary format which is also compressed further in AMF3 so the amount of data being transferred is smaller). This is brilliant for rapid development (which we do a lot of) and performance of the finished article.</p>
<p>For instance, on the webserver you donâ€™t have to loop through a database recordset, compose some XML and return that XML to Flash which would then load and parse the XML: you can essentially return the recordset directly from php to Flash and the query is automatically converted to the corresponding ActionScript type. There are several processes being skipped and the data being transferred is far smaller (being compressed binary as opposed to XML).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ultravioletdesign.co.uk/action-message-format-amf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sneak peek :: Physics</title>
		<link>http://blog.ultravioletdesign.co.uk/sneak-peek-physics/</link>
		<comments>http://blog.ultravioletdesign.co.uk/sneak-peek-physics/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 12:19:12 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[UV]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[physics]]></category>

		<guid isPermaLink="false">http://blog.ultravioletdesign.co.uk/?p=112</guid>
		<description><![CDATA[
We&#8217;re so close; I can smell it! Our new site is careering dangerously towards completion. One element of the homepage is a frivolous physics environment which I was kindly allowed the time to make in Flash using the Box2DFlash physics [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://demos.ultravioletdesign.co.uk/physics/"><img src="http://blog.ultravioletdesign.co.uk/wp-content/uploads/2009/09/hero.jpg" alt="Physics Hero" title="Physics Hero" width="528" height="300" class="size-full wp-image-116" /></a></p>
<p>We&#8217;re so close; I can smell it! Our new site is careering dangerously towards completion. One element of the homepage is a frivolous physics environment which I was kindly allowed the time to make in Flash using the <a href="http://box2dflash.sourceforge.net/">Box2DFlash physics engin</a>e. </p>
<p>The engine has been ported from Eric Cattoâ€™s powerful C++ physics engine (Box2D). It took a little time to adjust to some of the coding conventions that have also found their way from the C++ version but after that initial steep learning curve the engine is fantastic to work with. </p>
<p>Iâ€™ve released this today before the site launch so that people can play with it and inevitably find the bugs which Iâ€™ve lovingly engineered into it. Feel free to put it through its paces!</p>
<p><a href="http://demos.ultravioletdesign.co.uk/physics/">http://demos.ultravioletdesign.co.uk/physics/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ultravioletdesign.co.uk/sneak-peek-physics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Builder 3 &#8211; Internal Build Error bug</title>
		<link>http://blog.ultravioletdesign.co.uk/flex-builder-3-internal-build-error-bug/</link>
		<comments>http://blog.ultravioletdesign.co.uk/flex-builder-3-internal-build-error-bug/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 08:35:13 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[flex builder]]></category>

		<guid isPermaLink="false">http://blog.ultravioletdesign.co.uk/?p=44</guid>
		<description><![CDATA[I&#8217;ve been struggling with a Flex Builder 3 bug for the last two days where an Error is dispalyed which rotates between:
An internal build error has occurred. Right-click for more information.
&#38;
Classes must not be nested
..neither of which specify a file [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been struggling with a Flex Builder 3 bug for the last two days where an Error is dispalyed which rotates between:</p>
<blockquote><p>An internal build error has occurred. Right-click for more information.</p></blockquote>
<p>&amp;</p>
<blockquote><p>Classes must not be nested</p></blockquote>
<p>..neither of which specify a file or line at which the error occurs. Very helpful.</p>
<p>This is not a new bug by any account and from my research seemed to be particularly prominent in Flex Builder 2. <a href="http://rjowen.wordpress.com/2007/06/21/internal-build-error-or-classes-must-not-be-nested-error/">This article</a> which lists a few of the reasons which this may happen is very useful and I&#8217;ve just noticed that in the comments there is the solution I was looking for. I however didn&#8217;t get that far through the comments and have had to painstakingly comment out my code, line by line until the error dissapeared. To add to the fun, it was a possibility that leaving comments within conditionals could have been the cause of the problem as well. Eventually I discovered that the cause of my bug was an empty switch statement:</p>
<p><code>switch(pageId){</p>
<p>}</code></p>
<p>&#8230;..why I dont&#8217; know.</p>
<p>Anyway I thought I&#8217;d add to the documentation about this as it is a very annoying time consuming bug. I hope this will be resolved in Flash Builder!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ultravioletdesign.co.uk/flex-builder-3-internal-build-error-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIR app review: Doc? and Polaris</title>
		<link>http://blog.ultravioletdesign.co.uk/air-app-review-doc-and-polaris/</link>
		<comments>http://blog.ultravioletdesign.co.uk/air-app-review-doc-and-polaris/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 12:09:51 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[UI/UX]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.ultravioletdesign.co.uk/?p=43</guid>
		<description><![CDATA[
I have recently been researching small scale desktop application design for a video project we are producing in Flash. The obvious place to start in this instance was with showcases of Adobe AIR applications. Due to the ease with which [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone" src="http://blog.ultravioletdesign.co.uk/wp-content/uploads/air_appicon.gif" alt="Adobe AIR app icon" /></p>
<p>I have recently been researching small scale desktop application design for a video project we are producing in Flash. The obvious place to start in this instance was with showcases of <a href="http://www.adobe.com/products/air/">Adobe AIR</a> applications. Due to the ease with which applications can now be deployed using the AIR runtime, it already seems to have encouraged the development of applications with greater focus spent on the usability and aesthetics of the user interface and experience. Critics of this low threshold may say that this will lead to a lower standard of overall application functionality and perhaps to dirty code powering inefficient and buggy applications. I&#8217;m sure there will be many examples of this but considering the small scale and usually simple nature of AIR apps, I think this will not be the case in the long term. </p>
<p>In any case the main reason I wrote this post was in order to make note of two applications that I found during my research, which are notable more for their utility than their design.</p>
<p><a href="http://airdoc.be/">Doc? Air Local LiveDocs</a><br />
As an Actionscript developer without a photographic memory I am forced to regularly visit LiveDocs for Actionscript3 and Flex component references. If Iâ€™m unfortunate enough to be coding in the Flash IDE then I use the built in help docs which are slow and clunky and in Flex Builder 3 they are not much better. Doc? enables you to access LiveDocs for Flash CS3/CS4 and Flex all in the one application providing you have those applications installed (you have to point Doc? to the location on your hard disk where the reference files are installed &#8211; instructions for this are on the <a href="http://airdoc.be/faq/">site FAQ</a>). You can also create bookmarks for the pages which you use regularly. </p>
<p><a href="http://www.desktop-reporting.com/polaris.html">Polaris</a><br />
Polaris is quite simply a desktop application for viewing you Google Analytics accounts on your desktop. It&#8217;s incredibly compact and easy to use plus you still get all the lovely graphs and visuals which you&#8217;ll be used to from the Google Analytics web interface.</p>
<p>These are currently my two favourite AIR apps but I&#8217;m sure there&#8217;s a plethora of others which I&#8217;m yet to find. Feel free to present us with any further contenders.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ultravioletdesign.co.uk/air-app-review-doc-and-polaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creative Tools for e-assessment</title>
		<link>http://blog.ultravioletdesign.co.uk/creative-tools-for-e-assessment/</link>
		<comments>http://blog.ultravioletdesign.co.uk/creative-tools-for-e-assessment/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 13:01:40 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://blog.ultravioletdesign.co.uk/index.php/2008/12/creative-tools-for-e-assessment/</guid>
		<description><![CDATA[One of our most recent projects has involved developing a set of creative tools in Flex / AS3 which are part of a larger academically funded project in which digital tools are used in Design and Technology to encourage creativity [...]]]></description>
			<content:encoded><![CDATA[<p>One of our most recent projects has involved developing a set of creative tools in Flex / AS3 which are part of a larger <a title="http://www.goldsmiths.ac.uk/teru/projectinfo.php?projectName=projectescape" href="http://www.goldsmiths.ac.uk/teru/projectinfo.php?projectName=projectescape" target="_blank">academically funded project</a> in which digital tools are used in Design and Technology to encourage creativity and teamwork. This is part of broader <a title="Teacher's TV - E-Assessment - Where Next?" href="http://www.teachers.tv/video/5431" target="_blank">discourse in education</a> as to the value of the pen and paper, exam structured methods of assessment which we are all familiar with.</p>
<p>The main point of contention between the traditionalists and those wishing to push the bar on technology in education is whether or not traditional exam assessment is indicative of a students abilities in a certain subject areas. Throughout modern education ICT is used to support and enhance learning yet when it comes to the all important exam assessments students are forced into sweaty school halls and, in isolation, encouraged to recall facts and figures under pressured circumstances. I think I may be showing my opinion in this matter however this is not an academic paper so never mind!!!</p>
<p>The project which we have developed these tools for enables students to be assessed for their Design and Technology course work through various different means; photographs, voice recordings, drawings, written work and mind-mapping. These tools are all controlled through a parent/client application which leads the students through predefined questions or requests which require them to use the creative tools to evidence parts of their work. e.g. Sketch your initial designs for new type of pill holder / Take a photo of your prototype / Mind-map some ideas for new features.</p>
<p>Whilst the work is being created it is being immediately stored in the individual students online portfolio. The evidence and work collected facilitates a more subjective approach to student assessment called <a title="TAG deliver a highly innovative Comparative Pairs Assessment Engine" href="http://www.tagdev.co.uk/content/tag-deliver-highly-innovative-comparative-pairs-assessment-engine" target="_blank">&#8216;Comparitive Pairs&#8217;</a>.</p>
<p>Although this system is currently being piloted for Design and Technology only, I hope that further down the line that this type of assessment could be used more widely and potentially offer an alternative to archaic pen and paper type assessment.</p>
<p>The creative tools we have developed at Ultraviolet are a <a title="Ultraviolet Painter Tool" href="http://ultravioletdesign.co.uk/tag/e-scape/PainterTool/v1/" target="_blank">painter tool</a>, <a title="Ultraviolet Text Editor" href="http://ultravioletdesign.co.uk/tag/e-scape/TextEditor/" target="_blank">text editor</a> and <a title="Ultraviolet Mind Mapper" href="http://ultravioletdesign.co.uk/tag/e-scape/mindmapper/" target="_blank">mind mapper</a>. All the tools were created in Flex / AS3. As concepts they are in no way groundbreaking, in fact at some points during development it seemed a little fruitless re-inventing the wheel, but the functionality for each tool is prescriptive to the project and clients needs.</p>
<p>Feel free to play and let us know what you think. Or if you find any bugs!! *Gulp*</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ultravioletdesign.co.uk/creative-tools-for-e-assessment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Friday feeling (x52)</title>
		<link>http://blog.ultravioletdesign.co.uk/friday-feeling-x52/</link>
		<comments>http://blog.ultravioletdesign.co.uk/friday-feeling-x52/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 18:18:44 +0000</pubDate>
		<dc:creator>Kirsten</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[CD-ROM]]></category>
		<category><![CDATA[illustration]]></category>

		<guid isPermaLink="false">http://blog.ultravioletdesign.co.uk/?p=15</guid>
		<description><![CDATA[Everyone must have had that project? The one that keeps on trukin right through the project deadline, right through the next week and for whatever reason (and there are numerous legitimate ones) right through to a point when you donâ€™t [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone must have had <em>that </em>project? The one that keeps on trukin right through the project deadline, right through the next week and for whatever reason (and there are numerous legitimate ones) right through to a point when you donâ€™t remember a time without it? I *think* we have just completed one of those projects and somehow, although there is relief that we may well get paid for our hard work, itâ€™s left a hole where once it existed as wee bit of code!</p>
<p>Anyhow, the project is pretty decent, itâ€™s built as an actionscript project using Flex to compile and an example of it is posted online <a title="Link to Putting You in the Picture" href="http://www.ultravioletdesign.co.uk/DVMS" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ultravioletdesign.co.uk/friday-feeling-x52/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importing a swc into Flex Builder for pure actionscript projects</title>
		<link>http://blog.ultravioletdesign.co.uk/importing-a-swc-into-flex-builder-for-pure-actionscript-projects/</link>
		<comments>http://blog.ultravioletdesign.co.uk/importing-a-swc-into-flex-builder-for-pure-actionscript-projects/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 11:20:05 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[flex builder]]></category>
		<category><![CDATA[swcs]]></category>

		<guid isPermaLink="false">http://blog.ultravioletdesign.co.uk/?p=14</guid>
		<description><![CDATA[I have previously written a post about the potential bug which seems to occur when importing multiple swcs into Flex Builder 3 for pure actionscript projects. Despite this I cannot express how handy it is to be able to import [...]]]></description>
			<content:encoded><![CDATA[<p>I have previously written a <a title="Issue using mutliple swcs in Flex BUilder 3.0" href="http://blog.ultravioletdesign.co.uk/?p=12" target="_blank">post</a> about the potential bug which seems to occur when importing multiple swcs into Flex Builder 3 for pure actionscript projects. Despite this I cannot express how handy it is to be able to import swcs into Flex Builder; for one reason because it renders the Flash IDE even more redundant (which is a good thing).</p>
<p>Whilst talking to a friend who has recently started using Flex Builder for AS projects I discovered that he hadn&#8217;t as yet used the method of importing swcs to gain access to graphics, sounds, animations, etc which have been created in Flash IDE.</p>
<p>So far he has been using the Loader class to import the swf at runtime and then to gain access to the individual items in the fla/swf library. There are obvious advantages to this method, for example loading the swf at runtime avoids the increased file size of your project which you will incur from importing the swc which will add the graphics/sounds at compile time.</p>
<p>However for smaller projects where file size isn&#8217;t an issue or for importing the fundamental graphical elements which will be re-used throughout the project a swc is a quick and easy solution.</p>
<p>Firstly when creating you or a designer is creating the graphical elements in the flash library you can also add a class path to each movieclip or asset in the library.</p>
<p>1) Right click on the assets in the library and click <em>Linkage&#8230;..</em></p>
<p><em>2)</em> Tick the checkbox marked <em>Export for Actionscript</em></p>
<p><em>3)</em> Enter a class path which relates to the path structure of your application into the <em>Class</em> text field <em>e.g. uk.co.ultravioletdesign.graphics.ThisAsset -</em> <span style="color: #5b5b5b;">nb If you just put a simply identifier/class name without a full class/package path (e.g. ThisAsset) the item will be available throughout your application which sounds useful but is the same as making classes public which if avoidable is good practice and good for application performance.</span></p>
<p><span style="color: #5b5b5b;">This also enables you to organise your assets in the Flash library into convenient packages. For example putting all sound assets in <em>uk.co.ultravioletdesign.assets.sounds</em> and all graphics into <em>uk.co.ultravioletdesign.assets.graphics</em>. You don&#8217;t need to worry about creating the equivalent folders and packages within Flex Builder because they will be discreetly generated when the swc is imported.</span></p>
<p><em>4)</em> Go to Publish Settings (<em>File &gt; Publish Settings</em>) and then click the <em>Flash</em> tab. Providing the Fla is AS3 the checkbox <em>Export SWC</em> will be available. Check it!</p>
<p><em>5)</em> Now once the movie is published a .swc file will be snuggling up next to your .swf which you can promptly delete (if you feel the need).</p>
<p>In Flex Builder:</p>
<p><em>6)</em> Right click on your Actionscript project in the <em>Flex Navigator</em> window and click properties. Click on <em>Actionscript Build Path</em> and then on the <em>Library path tab</em>.</p>
<p><em>7)</em> Click on the <em>Add SWC</em> button and <em>browse</em> to your newly generated .swc file.</p>
<p>Flex now adds your library assets to your project and these are made available within classes using the <a title="Import directive on Livedocs" href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#import" target="_blank">import directive</a>:</p>
<p><code>import uk.co.ultravioletdesign.graphics.ThisAsset;<br />
</code></p>
<p><code>var thisAsset : ThisAsset = new ThisAsset();</code></p>
<p><span style="font-family: Verdana;">Using this method in my experience has been invaluable and a massive timesaver. Despite this it is very useful to have the knowledge to be able to import assets from swfs at runtime. There is very handy for other strategies and techniques such as the importing fonts at runtime. This <a title="Importing fonts to pure AS3 projects in Flex Builder" href="http://www.chrisrebstock.com/blog/?p=34" target="_blank">article</a> by Chris Rebstock has been very valuable.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ultravioletdesign.co.uk/importing-a-swc-into-flex-builder-for-pure-actionscript-projects/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Issues using multiple swcs in Flex Builder 3.0</title>
		<link>http://blog.ultravioletdesign.co.uk/using-multiple-swcs-in-flex-builder-30/</link>
		<comments>http://blog.ultravioletdesign.co.uk/using-multiple-swcs-in-flex-builder-30/#comments</comments>
		<pubDate>Mon, 01 Sep 2008 15:56:34 +0000</pubDate>
		<dc:creator>Gareth</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[flex builder]]></category>
		<category><![CDATA[swcs]]></category>

		<guid isPermaLink="false">http://blog.ultravioletdesign.co.uk/?p=12</guid>
		<description><![CDATA[As most of the Flash development here is now pure object-oriented in AS3 my IDE of choice is now Flex Builder 3.0 for all ActionScript projects. We left behind Flash IDE for the same reasons as most: it&#8217;s text editor [...]]]></description>
			<content:encoded><![CDATA[<p>As most of the Flash development here is now pure object-oriented in AS3 my IDE of choice is now Flex Builder 3.0 for all ActionScript projects. We left behind Flash IDE for the same reasons as most: it&#8217;s text editor is inadequate and the code visualisation for pure object-oriented projects is not sufficient; it also enables us to bring in line our development tools with other languages such as Java. Let&#8217;s face it, the Flash timeline IDE was never going to cut it as a serious development model!</p>
<p>An aspect of not developing in Flash that I had to adjust to was coping without a convenient library of graphical assets to drag into my application. There are various ways of importing or loading graphical assets into a 100% code application which nearly all involve and temporary return to Flash IDE. My preferred method is to create my graphical assets in Flash IDE, giving each of them linkage names relevant to the class/package structure of my application. I then publish a swc and import this into my ActionScript project within Flex Builder (project Properties &gt; ActionScript Build Path &gt; Library path &gt; AddSWC).</p>
<p>So far everything works like a dream. All of  my graphical assets are appearing within code hinting in Flex and are totally accessible. During a large scale project I decided to try to segregate my graphical assets into different swcs to help me organise my assets. This alone did not present any problems however I occasionally needed to go back into Flash to change or add a graphic to a swc. On exporting the amended swc, I returned to Flex Builder and found that all of the graphics contained in this swc where missing from the project. I tried renaming the swc and re-exporting it in Flash and also removing it in Flex Builder and adding it again. The only solution to this problem was to create and entirely new Flash file and copy all the graphical assets from the old (broken) fla file into the new one and re-export it again.</p>
<p>In a later project the same issue occurred again and this time it only began when I added more than one swc. That is essentially the solution I came to however it does not by any means explain the problem in the first place. Anyone who can fill in the gaps please feel free.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ultravioletdesign.co.uk/using-multiple-swcs-in-flex-builder-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
