<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>wezside</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/" />
    <link rel="self" type="application/atom+xml" href="http://www.wezside.co.za/blog/atom.xml" />
    <id>tag:www.wezside.co.za,2008-03-05:/blog/2</id>
    <updated>2009-12-23T19:35:08Z</updated>
    <subtitle>A blog about the Flash platform development and other tech stuff.</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Open Source 4.1</generator>

<entry>
    <title>Openness</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/12/openness.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.71</id>

    <published>2009-12-23T19:31:23Z</published>
    <updated>2009-12-23T19:35:08Z</updated>

    <summary>Pretty amazing blog post by Jonathan Rosenberg, Senior Vice President, Product Management of Google. Some might argue Google isn&apos;t open about search algorythms etc. But I think they have proved that the opposite business model of the traditional hook, line and sinker is worth a consider....</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="google" label="Google" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[Pretty amazing blog post <span class="byline-author">by Jonathan Rosenberg, Senior Vice President, Product Management of Google. Some might argue Google isn't open about search algorythms etc. But I think they have proved that the opposite business model of the traditional hook, line and sinker is worth a consider.</span> ]]>
        <![CDATA[My favourite paragraph:<br /><br />"Open will win. It will win on the Internet and will then cascade across
many walks of life: The future of government is transparency. The
future of commerce is information symmetry. The future of culture is
freedom. The future of science and medicine is collaboration. The
future of entertainment is participation. Each of these futures depends
on an open Internet."<br /><br />Read the full article <a href="http://googleblog.blogspot.com/2009/12/meaning-of-open.html">here</a>.<br />]]>
    </content>
</entry>

<entry>
    <title>How Accessible is your Flash?</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/12/how-accessible.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.70</id>

    <published>2009-12-11T12:40:02Z</published>
    <updated>2009-12-11T12:40:22Z</updated>

    <summary>Recently I was looking into Continuous Integration and as you do I started thinking of all the automation I&apos;d like to integrate in an ideal world. One of them was running accessibility tests. As this is a bit of an unknown subject to me, I thought the ideal time arose to learn more on this topic and not to just accept the vanilla response that Flash is accessible....</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Eclipse" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="accessible" label="Accessible" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="eclipse" label="Eclipse" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flash" label="Flash" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tools" label="Tools" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[Recently I was looking into <a href="http://en.wikipedia.org/wiki/Continuous_integration">Continuous Integration</a> and as you do I started thinking of all the automation I'd like to integrate in an ideal world. One of them was running accessibility tests. As this is a bit of an unknown subject to me, I thought the ideal time arose to learn more on this topic and not to just accept the vanilla response that Flash is accessible. ]]>
        <![CDATA[So just how much do you need to worry about your Flash content. Well it would seem not that much. Adobe has worked hard to improve Accessibility throughout the years. And the result is quite impressive. However I think awareness among developers are thin and needs to improve as there are still things that each developer need to do to ensure the project is accessible. Adobe has released <a href="http://www.adobe.com/accessibility/best_practices.html">Accessible Best Practices</a> which too be honest I haven't heard of before I started on this venture. More resources at the end of this post.<br /><br />
<h3>Open Government</h3>
Open Government is something that was introduced by President Obama in a <a href="http://www.whitehouse.gov/the_press_office/TransparencyandOpenGovernment/">memo </a>calling for his government to be open. Open how you say? Well his idea is to "establish a system of transparency, public participation, and collaboration". Sounds familiar? No? Long live <a href="http://www.ubuntu.com/">Ubuntu</a>! 

<br /><br />So what does open government have to do with Flash and more so with accessibility? Adobe recently launched a <a href="http://www.adobe.com/opengov/">website </a>dedicated to the Open Government initiative. Adobe PDF and Flash technologies are at the forefront and in use within the US Government. Many feel that this is a problem but it would seem more to do with the transparency of the data than the tools used to display the data. Granted PDF's aren't the most open format to use for distributing data but it works a charm for forms etc. 
<br /><br />
The biggest problem with the Open Government website was it wasn't accessible and many flaws were pointed out by the public. Define irony. Like iron. <br /><br />Commercial websites have no obligation to be accessible, but government websites are required by law to be accessible, US Government sites and a few other countries that is. Don't floor me on this technicality. The point is, openness is important to all of us whether you are the US government, Adobe or just a single contract Actionscripter doing yet another microsite. Openness and Accessibility more often than not hold hands as they walk off in the sunset. Remember that.

<br /><br />
<h3>Accessibility Tools Framework (ACTF)</h3>
What a wonderful thing being open is. Eclipse may have a bad rep for new comers but the power and extensibility underneath this open IDE is unmatched. ACTF is an Eclipse plugin perspective to test HTML and Flash Accessibility. It started as a headless piece of work and was quickly supported by IBM and integrated into the Eclipse environment. Below is an excerpt from the site:
<br />
<br />
<i>"ACTF is a framework that serves as an extensible infrastructure upon which developers can build a variety of utilities that help to evaluate and enhance the accessibility of applications and content for people with disabilities. A collection of example utilities will also be provided which were created on top of the framework such as compliance validation tools, assistive technology simulation applications, usability visualization tools, unit-testing utilities, and alternative accessible interfaces for applications. The ACTF componentry and the utilities will be integrated into a single tooling environment on top of the Eclipse framework. The framework components will function cooperatively with each other and with other Eclipse projects to provide a comprehensive development environment for creating accessible applications and content. "</i>


<br /><br />
Let's put it to the test. I ran my own website which is nothing big but have the standard microsite components. Buttons, dynamic content and some animation through scripting. Below is a screen of what you get when running ACTF. Notice the Flash Outline giving me <i>Nameless instance</i> values for my DisplayObjects. <br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.wezside.co.za/blog/actf/ACTF-GUI-Report.html" onclick="window.open('http://www.wezside.co.za/blog/actf/ACTF-GUI-Report.html','popup','width=1275,height=945,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.wezside.co.za/blog/actf/ACTF-GUI-Report-thumb-600x444.png" alt="ACTF-GUI-Report.png" class="mt-image-none" style="" width="600" height="444" /></a></span>&nbsp;<br />The power in ACTF is the GUI Report. This report will show any accessible problems. If this is clear you can sigh a relief. Clicking on any of the items within the GUI Outline will highlight it in the output window.<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.wezside.co.za/blog/actf/ACTF-Hover.html" onclick="window.open('http://www.wezside.co.za/blog/actf/ACTF-Hover.html','popup','width=1278,height=941,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.wezside.co.za/blog/actf/ACTF-Hover-thumb-600x441.png" alt="ACTF-Hover.png" class="mt-image-none" style="" width="600" height="441" /></a></span><br />
<br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.wezside.co.za/blog/actf/ACTF-Namesless-Item.html" onclick="window.open('http://www.wezside.co.za/blog/actf/ACTF-Namesless-Item.html','popup','width=1280,height=948,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.wezside.co.za/blog/actf/ACTF-Namesless-Item-thumb-600x444.png" alt="ACTF-Namesless-Item.png" class="mt-image-none" style="" width="600" height="444" /></a></span><br /><br /><br />As you can I need to do some work on specifying names for my buttons and alternative text to the graphic.<br /><br />This is an amazing tool. It works well with HTML too so play around with it and it will become quite evident why this is important. I've yet to integrate this in my automation process but I fear not. It will be mine.&nbsp; 

<br /><br />
<h3>Resource</h3><ul><li><a href="http://www.eclipse.org/actf/">ACTF</a><br /></li><li><a href="http://www.mediaclubsouthafrica.com/index.php?option=com_content&amp;view=article&amp;id=1060:supercomputer-020409&amp;catid=48:innovation_news&amp;Itemid=115">South African Government moves to Open Source</a></li><li><a href="http://arstechnica.com/tech-policy/news/2009/10/adobe-pushes-flash-and-pdf-for-open-government-misses-irony.ars">Adobe pushes Flash and PDF for open government, misses irony</a></li><li><a href="http://www.sunlightlabs.com/blog/2009/adobe-bad-open-government/">Adobe is Bad for Open Government</a></li><li><a href="http://blogs.adobe.com/accessibility/">Adobe Accessibility blog</a></li><li><a href="http://www.adobe.com/accessibility/index.html">Adobe Accessibility resources</a></li><li><a href="http://www.adobe.com/accessibility/best_practices.html">Adobe Accessibility Best Practices</a> (Select Flash from the dropdown)<br /></li></ul>




<div><br /></div><div><br /></div>]]>
    </content>
</entry>

<entry>
    <title>UML we heart you</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/11/uml-tools-for-f.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.69</id>

    <published>2009-11-17T13:50:23Z</published>
    <updated>2009-11-18T10:09:34Z</updated>

    <summary>Chances are you&apos;ve heard of the term or read some tutorials on how to use these diagrams to help with documenting your thought process when building a slick Flash project. I basically only wanted to share a little gem I&apos;ve recently discovered but ended up writing propaganda. I digress....</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Eclipse" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="actionscript" label="Actionscript" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="eclipse" label="Eclipse" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flash" label="Flash" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="uml" label="UML" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[Chances are you've heard of the term or read some tutorials on how to use these diagrams to help with documenting your thought process when building a slick Flash project. I basically only wanted to share a little gem I've recently discovered but ended up writing propaganda. I digress. <br />]]>
        <![CDATA[<h3>UML definition</h3>
"UML includes a set of graphical notation techniques to create visual models of software-intensive systems." - Wikipedia<br /><br />

This description is quite heavy as it stereo types UML diagrams to hardcore software engineering. The truth is I've found UML useful in various scenarios. In some cases I'm sure software engineers will shudder when they hear when or how UML became useful. For this post we will focus on Class Diagrams as this is one of the most popular diagrams but by far not the only one. 

<br /><br />
<h3>What is UML useful for?</h3>
These days UML is defintely not just for software engineers. Although, having said that I recently noticed some Actionscripters calling themselves engineers (*sigh*). Here are some scenarios where I've found UML greatly improve my workflow, reduced overheads during building, debugging and general courtesy when dealing with legacy code.

<br /><br />
<b>Maintenance or Reverse Engineering</b><br />
Some UML tools allow for reverse engineering through auto generation. The only Actionscript supported tool that does this (that I know of) is Sparx Systems Enterprise Architect (EA). This baby in my opinion is the daddy of all UML but it comes at a cost. There are a variety of tools available and if you use one you particularly like please share. With EA you can create a new diagram and drag and drop classes which will autogenerate all the models with their operations and properties. This will then create a link between your classes and the diagram. Should your class change then all you would have to do is hit refresh within EA and all your changes will reflect in the diagram. The only problem with EA is the support for Actionscript needs a bit of upgrading, no MXML support and its a tricky interface to get use to in my opinion. Apart from these two points is the price. These days I'm a bit cheap and tend to support the Open Source community alternatives more often. In most cases these alternatives works better in my humble opinion. <br /><br />

<b>Planning and Technical design</b><br />
Some of us do this on paper, others do it in the extreme way (i.e. your head), the point is every Actionscripter does this in one way or another. We plan how we build stuff. That is how we work. The more experienced we get the more we plan as experience have taught us that planning is vital to not only produce quality code but also to produce readable, robust and maintanable code. So often do I work with Actionscripters that are used to working solo - and it's difficult for her/him comprehend why we need to do this, very much the same way it is to convince an account team member the extra time required to make a component reusable is worth it. Obviously not all Actionscripters work this way, most of you understand that leaving your code behind requires handover and also reflects on your professional skills. 

<br /><br />
<h3>It's all about relationships</h3>
The relationship between classes is what a UML Class diagram is all about. So what kind of relationship is it? Break it down.<br /><br />

<b>Instance-level and Class-level</b><br />
UML relationships are broken down into these two levels. Instance level relationship refer to the instance of an object and the relation it has to other instances. Class level refer to the relationship one class has with another.<br /><br />

<b>Multiplicity</b><br />
Multiplicity refers to the reference counts one class makes to another. So for example a class that inherits from another class (Generalization) will have a multiplicity of 0..1. This means either no instances or one instance. Below is a list of multiplciities used in UML:
<br /><br />
<ul>
<li><b>0..1 »</b> No instances, or one instance (optional, may)</li>
<li><b>1 »</b> Exactly one instance</li>
<li><b>0..* or * »</b> Zero or more instances</li>
<li><b>1..* »</b> One or more instances (at least one)</li>
</ul>

<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.wezside.co.za/blog/uml/multiplicity.jpg"><img alt="multiplicity.jpg" src="http://www.wezside.co.za/blog/uml/multiplicity-thumb-600x231.jpg" class="mt-image-none" style="" width="600" height="231" /></a></span>
<br />
<b>Example relationships</b><br />
To show how classes relate to each other below we focus on the relationship of Composition and Aggregation. 
<br /><br />
<ul>
<li><b>A car and its engine » Composition</b><br />
Without an engine the car is pretty much useless, unless you have a drive-in in your backyard. Just like the car has only one engine, this relationship between classes refers to a multiplicity of zero to one. Also important, in most cases, if the car gets blown up, the engine doesn't exist anymore. <br /><br /></li>
<li><b>Family member » Aggregration</b><br />
Just like having family, Aggregation refers to a class that has a multiplicity of one to many with other classes, i.e. you can have more than one family member in relation to you and chances are that should any member fade away, you will still be here.</li>
</ul>


<br /><br />
<h3>The Basics</h3>
UML can be a lot to digest for a newbie, but there are a few simple concepts you need to grasp in order to get started. The idea with these are to get you going and thinking about how you write your code. There are loads of tutorials available and good books if you want to dive deeper.

<br /><br />
<h3>Class Diagrams</h3>
Class diagrams are mostly what we will cover but for a description of other useful diagrams please see below. 

<br /><br />
<b>Composition</b><br />
Composition is represented by a filled diamond. Composition is what you are probably most accustomed to and a familiar term if you've read about design patterns. Usually composition is referred to with inheritance but in UML you'll find composition and aggregation is commonly mentioned in the same sentence. We'll get to aggregation later. Composition indicates one object containing another. For example:
<br /><br />
<pre class="brush: as3">package  
{
	public class UMLComposition 
	{
		
		private var child:Object;		
		
		public function UMLComposition() 
		{
			child = new Object();	
		}
	}
}
</pre>
The child instance relationship with the class UMLComposition is of type composition. Should the UMLComposition instance be deleted, usually the child object will be too. The multiplicity of Composition is zero to one. 
<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.wezside.co.za/blog/uml/composition.jpg"><img alt="composition.jpg" src="http://www.wezside.co.za/blog/uml/composition-thumb-600x244.jpg" class="mt-image-none" style="" width="600" height="244" /></a></span>&nbsp;<br /><br />

<b>Aggregation</b><br />
Aggregation is represented by an empty diamond. Aggregation unlike Composition has a multiplicity of one to many
<br /><br />
An example of aggregation:<br />
A tree object contains branches, leafs and a squirrel. Yes a squirrel. The relationship between the leafs and branches are strong as without branches, the leafs won't exist. The same is true of the relationship between the branches and the tree. However the squirrel, will only need to find another tree should the one he is in suddenly be deleted (or die).<br />&nbsp;<br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.wezside.co.za/blog/uml/aggregation.jpg"><img alt="aggregation.jpg" src="http://www.wezside.co.za/blog/uml/aggregation-thumb-600x328.jpg" class="mt-image-none" style="" width="600" height="328" /></a></span><br /><br />

<b>Generalization</b><br />
More commonly known as inheritance, generalization is a class-level relationship. Up till now we've been dealing with instance-level relationships. Generalization means that one of the two classes specified is actually a more complete implementation of the other (super). Generalization is represented by an empty arrow rectangle join.<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.wezside.co.za/blog/uml/generalization.jpg"><img alt="generalization.jpg" src="http://www.wezside.co.za/blog/uml/generalization-thumb-600x393.jpg" class="mt-image-none" style="" width="600" height="393" /></a></span>&nbsp;<br /><br />
<b>Realization</b><br />
If you've guessed Interface well done. If not don't sweat it, maybe next time. Realization is the relationship where one model realizes the behaviour specified by another. 

<pre class="brush: as3">package 
{
	public class Tree implements ISway 
	{
		
		private var child:Object;		
		
		public function Tree() 
		{
			branch = new Branch();	
		}
		
		public function sway():void
		{
                ...
		}
	}
}</pre><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.wezside.co.za/blog/uml/realization.jpg"><img alt="realization.jpg" src="http://www.wezside.co.za/blog/uml/realization-thumb-600x269.jpg" class="mt-image-none" style="" width="600" height="269" /></a></span><br />
<br />It is worth pointing out that Composition and Aggregation are very much confused as either the same or only known as one or the other. For the sake of explanation I've decided to keep these two relationships seperate even though some may disagree and argue that only Aggregation exists with different types, i.e. strong and weak. I'm writing this as I understand it and hopefully give some clarity as this can become really confusing with different interpretations.

<br /><br />
<h3>Useful UML Diagrams</h3>
We've mainly touched on class diagrams but actually there are quite a few diagrams that can be beneficial to know. I'm only covering the ones I've had exposure to but feel free to browse the resources list at the end of this post to get more than you bargained for.<br />

<br />
<h3>Structure Diagrams</h3>
The purpose is in the name really. These are diagrams to help identify the structure of the system you are trying to model. And by system I obviously mean Flash application.
<br /><br />
<b>Class Diagram</b><br />
A structured diagram based on the classes that will be required to make up your system. The hierarchy and relationship between classes are defined here. 
<br /><br />
<b>Component Diagram</b><br />
Modelling a system's component and the relation of these components depicts a component diagram. Components can be recursive and thus understanding this relationship with the system can highlight many flaws, improvements or just generel knowledge of the component architecture (think of Flex).
<br /><br />
<h3>Behaviour Diagrams</h3>
Behaviour diagrams models the system's behaviour in response to startup, idel, input etc. 
<br /><br />
<b>Use case</b><br />
Use cases are specific behaviours by Actors. An Actor can be a user or the application or a system like a server. A use case is very useful for outlining how a specific behaviour should work. A use case can take an abstract form at the beginning of a project and become more granular as the project progress. A use case coupled with a Sequence diagram is great way to establish how a specific task that occurs from a behaviour should happen. Often use case diagrams are referred to during QA to help understand the application's behaviour.
<br /><br />

<b>State machine</b><br />
In a more complex system it is useful to model the system's state through the triggering events as well as actions involved. State machines are often used in Flash in conjunction with Browser Integration and breadcrumb implementations. But most of the time the applications aren't large enough to validate using a state machine.
<br /><br />
<h3>Interaction Diagrams</h3>
Interaction diagrams is a type of behaviour diagram but shows the flow of control and data within an application.<br /><br />
<b>Sequence Diagrams</b><br />
Sequence diagrams show the sequence of execution within an application. This could be a load sequence or just a general method call sequence. A very useful diagram to have when coupled with a use case. 

<br /><br />
<h3>Benefits</h3>
UML can greatly improve the planning process, regardless of which tools you use. Some benefits I personally had from doing UML diagrams:<br /><br />
<ul>
<li><b>Reverse Engineering</b><br />Working out how another developer thinks by mapping out their code through UML makes for interesting reading. It helps you find things and connect the dots way quicker than any other process. I do this very often done on paper depending on size of the project. There is no harm in taking a photo of your drawings and keeping them within a doc for developers per usal.</li>
<li><b>Planning</b><br /> UML is a good place to start before coding. Quite often seeing things from a bird-eye perspective will enhance your understanding of what is required. Also, by doing UML up front you have a good base to start your tech docs from.</li>
<li><b>Documentation</b><br />
Your code. Your legacy. Remember this as more often than not it will haunt you if you haven't done enough to create an understanding of your throught process during development. Some of the worst code I've seen have been rectified in my opinion through good documentation. UML is one step closer to this. It's always difficult to work under pressure and against a deadline and docs are the last thing on your mind, but this doesn't mean it should be forgotten. Even at the worst where there is no time for docs and you have done UML diagrams, it gives your code some respect and context to which I can assure you the next developer working on your code within a few months will value and appreciate.</li>
</ul>

<br />
<h3>The gem</h3>
The tool that inspired this post is an Eclipse plugin called UML2. I prefer to keep all my development within one IDE and this suits my needs perfectly. It's very easy to use and doesn't require any change of perspective. It's a view which means I can have an Actionscript class open and a UML diagram. There is no auto reverse engineer feature as with EA, but I think that the support EA gives to Actionscript is not sufficient. Also, I've found that removing the language from UML diagrams allows a developer to focus more on the Object Orientated Approach.<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.wezside.co.za/blog/uml2-screenshot-thumb-600x3751.html" onclick="window.open('http://www.wezside.co.za/blog/uml2-screenshot-thumb-600x3751.html','popup','width=600,height=375,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.wezside.co.za/blog/assets_c/2009/11/uml2-screenshot-thumb-600x375-thumb-600x375.jpg" alt="Thumbnail image for uml2-screenshot.jpg" class="mt-image-none" style="" width="600" height="375" /></a></span>&nbsp;<br /><br />
<b>Install (Eclipse Galileo)</b><br />
<ul>
<li>Help » Install new software...</li>
<li>In the Work with drop-down select Galileo - http://download.eclipse.org/releases/galileo</li>
<li>Expand the Modelling tree</li>
<li>Check UML Tools SDK » Finish</li>
</ul>

<br />
<h3>Conclusion</h3>
I hope the take away from this post is that UML is there to help rather than hinder. If the process of creating or learning UML still doesn't appeal to you, I'd be hesitant to say that's cool. As even something simplistic as paper drawings could be what seperates understanding from misinterpretation or even worse, hours into days.
<br /><br />
<h3>Resources</h3>
<ul>
<li><b><a href="http://en.wikiversity.org/wiki/UML/Glossary#About_this_glossary" target="_blank">UML Glossary »</a></b></li>
<li><b><a href="http://en.wikipedia.org/wiki/Class_diagram" target="_blank">Class Diagram »</a></b></li>
<li><b><a href="http://www.agilemodeling.com/artifacts/classDiagram.htm#Classes" target="_blank">Good tutorial on class diagram »</a></b></li>
</ul><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div>]]>
    </content>
</entry>

<entry>
    <title>I like black.</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/09/i-like-black.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.67</id>

    <published>2009-09-10T11:58:18Z</published>
    <updated>2009-09-11T08:57:42Z</updated>

    <summary>Maybe you&apos;ve guessed it but keeping with my black theme I&apos;ve utilised my spare time to design a new set of Eclipse icons and splash screen. What I haven&apos;t had time for was writing some script to install these on different OS&apos; but my guess is you will figure it out....</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Eclipse" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="eclipse" label="Eclipse" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        Maybe you&apos;ve guessed it but keeping with my black theme I&apos;ve utilised my spare time to design a new set of Eclipse icons and splash screen. What I haven&apos;t had time for was writing some script to install these on different OS&apos; but my guess is you will figure it out.
        <![CDATA[I'll attempt to give some best-in-show running commentary to make this a little more interesting.<br /><br /><h3>Splash Screen</h3>
I've gone for the black theme here with a total eclipse graphical representation, representing well... an eclipse. Pretty heavy stuff in my humble opinion or should I say imho. You'll notice the loading text straying a little towards the border and this is purely because I can't change this. Period.<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="splash.jpg" src="http://www.wezside.co.za/blog/2009/09/10/eclipse_themes/splash.jpg" class="mt-image-none" style="" width="455" height="295" /></span><br /><br /><h3>Icon set</h3>
Again keeping with the black theme I couldn't resist using a visual representation of what a programmer might feel when using this superb IDE... Yes I know it's another Eclipse but that is part of the theme.<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="eclipse128.gif" src="http://www.wezside.co.za/blog/2009/09/10/eclipse_themes/eclipse128.gif" class="mt-image-none" style="" width="128" height="128" /></span><br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="eclipse48.gif" src="http://www.wezside.co.za/blog/2009/09/10/eclipse_themes/eclipse48.gif" class="mt-image-none" style="" width="48" height="48" /></span><br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="eclipse32.gif" src="http://www.wezside.co.za/blog/2009/09/10/eclipse_themes/eclipse32.gif" class="mt-image-none" style="" width="32" height="32" /></span><br /><br /><h3>Install</h3>
Pretty easy. Just do a wildcard search for "eclipse*" on your eclipse installtion folder and replace the images with the same name. If you are worried this might break anything just rename your existing images to something other than what they are currently called. You could use the plugin Random Splash Screen if you just want to change the splash screen and require a GUI to do so. 

<br /><br /><a href="http://blog.wezside.co.za/eclipse_themes/EclipseThemeBlack.zip">Download the zip file here »

</a><br /><br />Selah.
<br /><br />
<i class="update">[Update: Someone asked about Flex/Flash Builder: Just change your wildcard search to flexbuilder* and all the icons should appear. There does seem to be .ico files being used - so for those you will have to convert one of the PNG's using some program to .ico]</i>]]>
    </content>
</entry>

<entry>
    <title>Linux and Flash: A workflow perspective</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/07/linux-and-flash.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.66</id>

    <published>2009-07-14T10:13:45Z</published>
    <updated>2009-07-14T16:45:47Z</updated>

    <summary>Initially I wanted to do a complete write-up on what it would take to move your entire Flash operation away from Windows. How much fun that would&apos;ve been. Instead I opted for a more mashed-up approach on ethical philosophies and how they relate to the workflow of building RIA&apos;s and Flash websites mmkay....</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ubuntu" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="flash" label="Flash" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="general" label="General" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="Ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        Initially I wanted to do a complete write-up on what it would take to move your entire Flash operation away from Windows. How much fun that would&apos;ve been. Instead I opted for a more mashed-up approach on ethical philosophies and how they relate to the workflow of building RIA&apos;s and Flash websites mmkay. 
        <![CDATA[Like loads of people, I have my own reasons for working on the Windows platform for the last 8 years (professionally that is). The lure of working on a Mac has always been there, although only until recently, with the release of the iPhone have I realised Apple and Microsoft are very much the same. Both companies need to make money. Nothing wrong with that, but as a consumer I started to think that I don't want be limited to one platform. Remember the old "plug-n-play" concept from Creative Labs? Well I want to plug in any computer and be able to play. What is the point of showing one conglomerate (not sure if they are?) the finger when the other is sticking it where the sun don't shine. I am of course referring to the required Mac should you want to develop apps for the iPhone to name but one example. It's like Apple are saying only cool kids allowed here. Oooh, look at me! Look at me! A bit jealous are we? You bet your ass I am. As an aspiring technologist, some of the coolest technology is not available to me. It's expensive, and from what I've seen the extra money does not value "the experience". All hail apples through windows.<br /><br />

<h3>Ubuntu</h3>But alas, something appeared on the horizon which tickled my fancy. I couldn't believe it. The same OS I ripped off at varsity, is now the sole driving force behind a movement that is known as <a href="http://www.ubuntu.com/">Ubuntu</a>. Ubuntu is an old humanistic philosophy which basically translates to "I am because you are". I like that. I like the idea of being a unique and pretty (grain of salt) snowflake because other snowflakes exist around me. That is cool. Can I play too? Best of all it's free. A release happens every 6 months. What more do you want?<br /><br />So head first I dive into Ubuntu. Installation was a breeze. A boot menu was created for me as I already had Vista installed. From there on it took some getting used to. Customisation is in abundance with Ubuntu. For a lot of people this isn't new. It was however only until I had to start doing my work at home that things got a bit hairy. My dreams shattered fairly quickly. It became more of an i-am-not-doing-anything-cause-you-run-something-different philosophy. <br /><br />

<h3>The Case study</h3>The decision was made to give this move a real go. That would mean designing a Flash website and building it on Ubuntu. It was established very quickly that I wasn't able to design on Linux. Searching high and low all results kept on pointing to the same application - Gimp. I'm not going to say the interface is not intuitive enough because that is cop-out comment in my opinion. I think it's because in most cases people feel it's not Photoshop. Being different doesn't mean you suck, it means you need to get use to it and spend a little time. I can hear Different in the background shouting "Please give me another chance!" I'm sure Gimp runs some wicked code under the hood to produce algorithms that Photoshop could learn from or have already "learned" from. No? This was a real life project and time was of the essence and I decided not to pursue this avenue nor the other version of Gimp that mimics Photoshop's interface. The expiration date (last updated) on this website made me nervous. I am after all a newbie and should anything go wrong, it will take me hours to fix. Such is my trust in the open source community. Shame on me. It's Linux and if something goes wrong you probably just don't have The Right Stuff. But the truth is, I've successfully added and removed a few applications, used the terminal to get and install Eclipse. Nothing was going wrong and I'm starting to feel a little elite. Now if I can just find a program to design a website with.<br /><br />This quest resulted in using <a href="http://www.inkscape.org/">Inkscape </a>which is a fantastic little vector based drawing program. It was a little slow at times partially due to me sticking bitmaps in there but still seriously cool in my opinion. In fact, I will be happy to use Inkscape for all my projects. I did have some problems in converting my final design to Adobe's Creative Suite for client preview but that is partly due to the inconsistencies in the SVG format. Working with Inkscape, it felt a lot like the Flash IDE without the timeline. Obviously a different interface but still intuitive enough to get to grips with quite quickly. Because the SWF file format is open source (thanks Adobe), someone in the community must be able to write an exporter/plug-in to be able to export the design as a SWF with linkage ID's. This would mean that my dependency on the Flash IDE will disappear, and I will be able to develop only on my preferred platform Ubuntu.<br /><br />What became evident very quickly was Ubuntu is super cool for programming. I know I know. Eclipse actually runs a lot quicker. Start-up times are unbeatable, there is simply no comparison. I can't compare this to Eclipse on a Mac as you may recall I'm not part of the iPooped-club. I know I know. Also, for all the die hard Linux users out there, you've been right all along. I admit it but with a caveat. It's not for everyone, and I'm hoping there will emerge more programs like Inkscape for Linux to sway some designer/developer folk. I think what Ubuntu has done is show that the once secluded world (some call it a secret society) of developers who use Linux, is now opening up to novices buying cheap netbooks with a variation of this operating system. Ubuntu is gaining ground and at a reasonable pace too. Ubuntu has embraced all people wanting to use the operating system, and you'll notice this when reading or posting a question in the forums. The Ubuntu forums even shed some light on some of the secret society handshakes and practices. The community seem to be different to what I've known before when I was introduced to Linux at varsity. It's more welcoming and for a novice like myself this is an indication that Ubuntu is on the right track.<br />&nbsp;<br />

<h3>Adobe Flash Builder</h3>Adobe is pushing for more market visibility with Flash Builder in the current economic climate in other development communities, specifically in the Java world. Even though the Flash community is tight knit, it has some way to go to meet the needs of other developers from other backgrounds. And here is where I agree with <a href="http://www.insideria.com/2009/06/flex-builder-linux-and-open-so.html">Mike Slinn</a>, if you want to tap into this secret society, you have to make a substantial effort to meet their needs. One way this effort was somewhat offered and then removed again in the form of Flex Builder 3 for Linux. By branding Flash as a "platform", Adobe should learn from other giant's mistakes. Having said all this, I'm somewhat torn as my livelihood is depending on Adobe moving the technology forward albeit only on two platforms. This means my preferred choice is still not an option unless of course Inkscape manages that feature. But until then I'll be on the edge of the fence - waiting to jump. <br /><br />

<h3>Adobe Catalyst hype</h3>As far as the Flash Builder and Catalyst
workflow go, I think what Adobe has done is very impressive and I can
see the problem they are trying to address. However, I'm not sure I
would want to work with that much automation. How will catalyst
integrate into existing and well supported frameworks? There is no
doubt that for wire frames, rapid prototyping Catalyst is ideal. I
cringe every time I get an FLA and I'm dealing with thousands of nested
MovieClips and Symbols with automagically generated names. In the same
way Catalyst will name instances if you don't name them but I have yet
to meet a designer that gives their library items descriptive sensical
names. Different strokes for different blokes I guess. The amount of
ways of doing things in Flash is partially responsible for this. Trying
to have a one-size-fits-all solution is nearly impossible.<br /><br />So, to summarise, I still have to boot up in Windows to use any of Adobe's software, which happens all the time. This means I end up having to use Eclipse on Windows as I'm too lazy to reboot into Ubuntu for most maintenance projects. But for projects where I get to choose the process, I get some valuable time on Ubuntu. And that makes it all worth while. <br /><br />Understandably so, Adobe has opted to freeze development for Flash Builder on Linux until further notice and there is no intention for any of the other programs other than Flash Builder to potentially move to Linux. All valid reasons are listed by Adobe, but I think as market share changes, eventually they will have to succumb to the secret society. And that my friend will be a glorious day.<br /><br />
<h3>Resources:</h3>
<ul>
<li><a href="http://www.insideria.com/2009/06/flex-builder-linux-and-open-so.html">http://www.insideria.com/2009/06/flex-builder-linux-and-open-so.html</a></li>
<li><a href="http://ria.dzone.com/news/whats-new-flash-builder-4-beta">http://ria.dzone.com/news/whats-new-flash-builder-4-beta</a></li>
<li><a href="http://asserttrue.blogspot.com/2009/04/how-ria-wars-will-affect-future-of.html">http://asserttrue.blogspot.com/2009/04/how-ria-wars-will-affect-future-of.html</a></li>
</ul>]]>
    </content>
</entry>

<entry>
    <title>FlexUnit 4 alpha 1.0</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/05/flexunit-4-alph.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.64</id>

    <published>2009-05-15T10:41:53Z</published>
    <updated>2009-07-15T09:23:48Z</updated>

    <summary>Just read through the overview and the new FlexUnit4 alpha is looking pretty good. Using meta tags to create Tests and Suites and the addition of user defined tags, makes me think that I have to start including this in my own project workflow. I wonder how many Actionscripters actually use Unit tests. I&apos;m sure there are a lot of Enterprise Flex developers but any pure Actionscripter takers?[Update: Updated the link to FlexUnit]...</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Flex" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="unittests" label="unit tests" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[Just read through the overview and the new <a href="http://opensource.adobe.com/wiki/display/flexunit">FlexUnit4 alpha</a> is looking pretty good. Using meta tags to create Tests and Suites and the addition of user defined tags, makes me think that I have to start including this in my own project workflow. I wonder how many Actionscripters actually use Unit tests. I'm sure there are a lot of Enterprise Flex developers but any pure Actionscripter takers?<br /><br /><i class="update">[Update: Updated the link to FlexUnit]</i><br />]]>
        <![CDATA[I also wonder how they plan/cost/build that into their project workflow. I think the idea of writing tests before you start is really cool, however how would that work in a 3D project for example. I can't help but wonder that sometimes the build of a test will be post production to show any weakensses in your own code. And isn't it too late at this point? <br /><br /><br /><br />]]>
    </content>
</entry>

<entry>
    <title>FDT 3.2 with MXML support</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/05/fdt-32-with-mxm.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.58</id>

    <published>2009-05-01T11:18:05Z</published>
    <updated>2009-05-01T11:24:51Z</updated>

    <summary><![CDATA[Looks like my XSD4MXML tutorial post was like so 1999 'cause the boys over at FDT delivered the beta release 3.2 with MXML support the 13th of March already. I can't keep up these days. What are you waiting for? Get it now!&nbsp;...]]></summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Eclipse" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="FDT" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Flex" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="fdt" label="FDT" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flex" label="Flex" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mxml" label="MXML" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[Looks like my <a href="http://blog.wezside.co.za/2009/03/xsd4mxml.html">XSD4MXML</a> tutorial post was like so 1999 'cause the boys over at FDT delivered the beta release 3.2 with MXML support the 13th of March already. I can't keep up these days. What are you waiting for? Get it now!&nbsp; ]]>
        <![CDATA[Some of the features include:<br /><br /><strong></strong><p><strong>MXML Support</strong></p>
<ul><li>Semantic Highlighting</li><li>Templates</li><li>Wizard for MXML Classes</li><li>Flex-Builder Project Importer</li></ul><a href="http://fdt.powerflasher.com/blog/?p=476">For more info click here »</a><br />


<br />]]>
    </content>
</entry>

<entry>
    <title>XSD4MXML</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/03/xsd4mxml.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.57</id>

    <published>2009-03-27T12:13:55Z</published>
    <updated>2009-03-27T12:14:08Z</updated>

    <summary>For those of you who want to get some MXML support in FDT I thought I&apos;d share this little tutorial. I can&apos;t take credit for this as it was the guys from FDT who pointed this out at recent visit to LFPUG and Adobe MAX Milano way back in 2008. Lets hope we get FDT to support MXML natively so this isn&apos;t required but until then here goes. A small caveat, this will probably not...</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Eclipse" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="FDT" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Flex" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="eclipse" label="Eclipse" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="fdt" label="FDT" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flex" label="Flex" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mxml" label="MXML" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        For those of you who want to get some MXML support in FDT I thought I&apos;d share this little tutorial. I can&apos;t take credit for this as it was the guys from FDT who pointed this out at recent visit to LFPUG and Adobe MAX Milano way back in 2008. Lets hope we get FDT to support MXML natively so this isn&apos;t required but until then here goes. A small caveat, this will probably not work in Flex 4 as I remember them removing the mx namespace for the framework. 
        <![CDATA[<br /><h3>First things first - Get Eclipse Ganymede</h3>
Why Ganymede? Well since 3.4 Eclipse has overhaulled it's built-in update system to make it way more friendlier when adding new plugins or updating existing ones. First it's easier to access Help » Software Updates and second it tries to resolve all dependencies for you. This is a big one as I remember thinking while writing the <a href="http://blog.wezside.co.za/2008/01/complete-starter-guide-to-develop-flash.html">Complete Starter Guide</a> tutorial that resolving dependencies is a real pain in the ass. To download the latest version go <a href="http://www.eclipse.org/downloads/" target="_blank">here</a> and select Eclispe Classic.<br /><br /><h3>Get the Eclipse XML Editor</h3>
You will need a better than default XML editor to give you syntax colouring and code highlighting. So we install the Web Tools like so:
<ul>
<li>Help » Software Updates » Available Software Tab</li>
<li>Expand Ganymede Update Site</li>
<li>Expand Web and Java EE Development</li>
<li>Select Eclipse XML Editor</li>
<li>Click OK</li>
</ul><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="SoftwareUpdates.gif" src="http://www.wezside.co.za/blog/xsd4mxml/SoftwareUpdates.gif" class="mt-image-none" style="" width="269" height="232" /></span><br /><br /><b><i>Fig A. Help » Software Updates</i></b><br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="GanymedeUpdateSite.gif" src="http://www.wezside.co.za/blog/xsd4mxml/GanymedeUpdateSite.gif" class="mt-image-none" style="" width="667" height="565" /></span><br /><b><i>Fig B. Ganymede Update Site</i></b><br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="Eclipse-XML-Editors.gif" src="http://www.wezside.co.za/blog/xsd4mxml/Eclipse-XML-Editors.gif" class="mt-image-none" style="" width="775" height="545" /></span><br /><b><i>Fig C. </i><i>Ganymede Update Site </i></b><b><i>» </i><i>Web and Java EE Development</i></b><br /><br />
<b>Note:</b> You can also install the HTML/CSS/Javascript editor in exactly the same way as above by selecting Web Developer Tools.<br /><br /><h3>Change Eclipse to support .mxml</h3>
Eclipse will need to kow that we want to use the XML Editor for .mxml files so we will have to add this extension to the extensions associated with the Eclipse XML Editor. Do the following:<br /><br />

<ul>
<li>Window » Preferences » General » Content Types</li>
<li>Expand the Text node</li>
<li>Select XML</li><li>
</li><li>In the <i>File associations</i> box click on <i>add...</i>
</li><li>Click OK » OK</li>
</ul><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="FileAssocitations.gif" src="http://www.wezside.co.za/blog/xsd4mxml/FileAssocitations.gif" class="mt-image-none" style="" width="720" height="495" /></span><br /><b><i><br />Fig D. Window » Preferences » General » Content Types »  File Associations</i></b><br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="FileAssociationsb.gif" src="http://www.wezside.co.za/blog/xsd4mxml/FileAssociationsb.gif" class="mt-image-none" style="" width="720" height="495" /></span><br /><b><i><br />
Fig E. Window » Preferences » General » Content Types »  File Associations</i> </b><b><i>» Add</i></b><br /><br /><h3>Install XSD schema for MXML</h3>
You may have figured this out from the title but that is exactly what <a href="http://code.google.com/p/xsd4mxml/" target="_blank">xsd4mxml</a> is. It's a <a href="http://code.google.com/p/xsd4mxml/" target="_blank">googlecode project</a> which was stumbled upon by the FDT guys and the kryptonite for making this whole tutorial work. Go to the location above and download the flex3.xsd from the <a href="http://code.google.com/p/xsd4mxml/downloads/list" target="_blank">download page</a>.

In Eclipse do the following:<br /><br />
<ul>
<li>Window » Preferences » XML » XMLCatalog</li>
<li>Add...</li>
<li>Next to the Location input field click on the little folder icon</li>
<li>Filesystem... and browse to where you downloaded the xsd file</li>
<li>Click OK </li>
</ul><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="XMLCatalog.gif" src="http://www.wezside.co.za/blog/xsd4mxml/XMLCatalog.gif" class="mt-image-none" style="" width="620" height="437" /></span><b><i><br />
</i><i>Fig F. Window » Preferences » XML » XMLCatalog » Add</i></b><br /><br />

After selecting it you should now see the Adobe 2006 namespace under <i>User Specified Entries</i>. 

The result is as follows. Code hinting for MXML. 



<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="Result.gif" src="http://www.wezside.co.za/blog/xsd4mxml/Result.gif" class="mt-image-none" style="" width="485" height="207" /></span><br /><br /><i><b>Fig G. Result of using XSD4MXML in Eclipse + FDT</b></i><br /><br />Remember you won't get code hinting for your own custom components as FDT doesn't parse your files just yet. The XSD file is loaded when you start up Eclipse and then used to lookup code hinting for Flex components. <br /><br />It's better than nothing!
<div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div><div><br /></div>]]>
    </content>
</entry>

<entry>
    <title>Creating View Source with Ant</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/03/creating-viewsrc.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.56</id>

    <published>2009-03-23T22:27:39Z</published>
    <updated>2009-11-16T14:47:07Z</updated>

    <summary>This is a simple Ant script that will transform your code into an HTML equivelant which you can target with a context menu item to generate a &quot;View source&quot; like page. Works well with Eclipse and FDT as you can execute the script post compilation. I&apos;ve included some nice Kuler skins but feel free to use, abuse or misuse....</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Ant" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Eclipse" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="FDT" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ant" label="Ant" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="eclipse" label="Eclipse" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="general" label="General" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[This is a simple Ant script that will transform your code into an HTML equivelant which you can target with a context menu item to generate a "View source" like page. Works well with Eclipse and FDT as you can execute the script post compilation. I've included some nice Kuler skins but feel free to use, abuse or misuse.<br />]]>
        <![CDATA[Below is a detailed step guide to using this ant script. This does not show Flex Builder usage although I can't imagine it being much different.<br /><br />The top part fo the script contains changeable properties that can be used to customise the output HTML to suit your needs or alternatively look at the how-to's below.<br /><br />

<h3>Installation</h3>
To install the ant script download the <a href="http://blog.wezside.co.za/examples/viewsrc/viewsrclib20090323.zip">zip file</a> and extract to your project folder root. You should now have an <i>ant </i>folder containing the <i>viewsrc.xml</i> file and a <i>viewsrclib </i>folder in your project root. 
<br /><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="InstallationFolders.gif" src="http://www.wezside.co.za/blog/2009/03/23/viewsrc/InstallationFolders.gif" class="mt-image-none" style="" width="710" height="326" /></span><br /><br /><h3>How to add the Ant file to external run configuration</h3>Click on the arrow next to the Green play icon with the little toolbox. Select <i>External Tools Configuration</i>.<br /><br /><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="External-Tools-Config.jpg" src="http://www.wezside.co.za/blog/2009/03/23/viewsrc/External-Tools-Config.jpg" class="mt-image-none" style="" width="608" height="194" /></span>
<br /><i>External Run Configurations</i><br /><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="ExternalToolsConfigurationDialog.gif" src="http://www.wezside.co.za/blog/2009/03/23/viewsrc/ExternalToolsConfigurationDialog.gif" class="mt-image-none" style="" width="715" height="444" /></span><br /><i><br />
External Tools Configuration Dialog</i><br /><br />
<ul>
<li>Double click on the <i>Ant Build</i> tree to create a new run configuration</li>
<li>In the <i>Main </i>tab click on <i>Browse Workspace</i> and browse to the <i>ant</i> folder<br /></li>
<li>To run the Ant script click on the arrow next to the green play icon and toolbox and select your Ant script.<br /></li>
</ul>
<h3>How to update the title?</h3>
Update the value attribute in the property <i>project.title</i> as shown below.
<br />
<pre class="brush: xml">	&lt;!-- Project title --&gt;
	&lt;property name="project.title" value="Project Title | Page Source" /&gt;
</pre>

<h3>How to exclude folders</h3>
Create a new exclude property with the value attribute specifying which folder to ignore. Below is an example of a excluding Tweener, PV3D and a framework.
<pre class="brush: xml">	&lt;!-- Folders to exclude --&gt;
	&lt;property name="exclude.folder.1" value="caurina" /&gt;
	&lt;property name="exclude.folder.2" value="org" /&gt;
	&lt;property name="exclude.folder.3" value="fl" /&gt;
	&lt;property name="exclude.folder.4" value="nochump" /&gt;
	&lt;property name="exclude.folder.5" value="com/blitzagency" /&gt;
	&lt;property name="exclude.folder.6" value="com/wezside/framework" /&gt;
</pre>

<h3>How to create a context menu item in Actionscript</h3>
<pre class="brush: as3">private function setContextMenu():void
{
	var cmItemCopyright:ContextMenuItem = new ContextMenuItem( Version.COPYRIGHT, true, false );
	var cmItemBuild:ContextMenuItem = new ContextMenuItem( Version.BUILD_VERSION, false, false );
	var viewSrc:ContextMenuItem = new ContextMenuItem( "View Source", false, true );
	viewSrc.addEventListener( ContextMenuEvent.MENU_ITEM_SELECT, viewSrcClick );
	
	var cm:ContextMenu = new ContextMenu();
	cm.customItems = [viewSrc, cmItemCopyright, cmItemBuild ];
	cm.hideBuiltInItems();
	contextMenu = cm;			 
}

private function viewSrcClick( event:ContextMenuEvent ):void
{
	if ( event.target.caption == "View Source" )
		navigateToURL( new URLRequest( "viewsrc/" ));
}
</pre>
<h3>Updating the colour scheme</h3>
Updating the colour scheme is easy. Just change the CSS of the tempate index.html file. To view the alternative Kuler scheme simply do the following:
<ul>
<li>Open index.html in <i>viewsrc/lib/</i>
</li><li>Update the css href to <i>css/index.css</i> to load a darker scheme</li>
</ul>

<h3><a href="http://blog.wezside.co.za/examples/viewsrc/viewsrclib20090323.zip">Download the script here »</a></h3>
<h3> Example</h3>
To see the result visit my site at <a href="http://www.wezside.co.za/">wezside.co.za</a> and right click - select <i>View Source</i>.]]>
    </content>
</entry>

<entry>
    <title>Processing Particle Storm</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/02/processing-part.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.55</id>

    <published>2009-02-16T15:22:39Z</published>
    <updated>2009-02-16T15:41:22Z</updated>

    <summary>A Particle Storm created with Processing. The particles are created based on an FFT spectrum by the ESS library. My first result using this cool language. Music by Sibot (African Dope Recordings)...</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Processing" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="processing" label="processing" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="visualprogramming" label="visual programming" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[A Particle Storm created with Processing. The particles are created based on an FFT spectrum by the ESS library. My first result using this cool language. <br /><br />Music by Sibot (African Dope Recordings) ]]>
        <![CDATA[<object width="700" height="385"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=3238824&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=3238824&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="700" height="385"></object><br /><a href="http://vimeo.com/3238824">Particle Storm</a> from <a href="http://vimeo.com/wezside">Wesley Swanepoel</a> on <a href="http://vimeo.com">Vimeo</a>.]]>
    </content>
</entry>

<entry>
    <title>MXML + ANT + ASDOC = And then some</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2009/01/mxml-ant-asdoc.html" />
    <id>tag:www.wezside.co.za,2009:/blog//2.54</id>

    <published>2009-01-28T15:00:02Z</published>
    <updated>2009-03-23T21:49:18Z</updated>

    <summary>I&apos;m currently working on a project of which the source will be distributed across the globe. So I want my code to be nice and tidy and send over some HTML docs to show off. Only problem is it&apos;s a Flex project and I&apos;ve been out of touch with Flex for a while. As I don&apos;t use Flex Builder, getting ASDoc to work ended up on the things-I-will-sort-out-later-pile. For this project however, it was a...</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Ant" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Eclipse" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="FDT" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Flex" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="actionscript" label="Actionscript" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ant" label="Ant" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="asdoc" label="ASDoc" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flex" label="Flex" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[I'm currently working on a project of which the source will be distributed across the globe. So I want my code to be nice and tidy and send over some HTML docs to show off. Only problem is it's a Flex project and I've been out of touch with Flex for a while. As I don't use Flex Builder, getting ASDoc to work ended up on the things-I-will-sort-out-later-pile. For this project however, it was a requirement. So no easy way out.<br />]]>
        <![CDATA[<h3>ASDoc aint easy...</h3>I think that is an understatement. The
majority of the flash community (my opinion) doesn't work directly with
command-line compilers. In fact I think it is safe to say that most of
us work indirectly with command-line compilers. That is why we use an
Integrated Development Environment (IDE) like the Adobe Flash IDE,
Flex Builder, Eclipse or FlashDevelop. <br /><br />Having said that I do
feel we need to be grateful here as ASDoc in particular is one of
Adobe's internal tools that have surfaced as being quite popular in the
flash community. All the others available were either too expensive or
didn't quite work. Only problem is, everyone wants to use it but there seem to be little documentation on it which makes loads of people lose their hair way too early. Unless you use Flex Builder, this is not a straight forward process (or so I've heard).&nbsp; <br /><br /><h3>The tool<br /></h3>Very cool stuff from Adobe. It's no secret we can use their nifty tool ASDoc to generate our own project class documentation, but up till now the support for MXML has been a little on the thin side. That is until now. There isn't much info on this yet but in my quest for perfect class documentation, and that means including MXML files, I have found a <a href="http://opensource.adobe.com/wiki/display/flexsdk/ASDoc+in+MXML">functional and design</a> specification for ASDoc in MXML. You gotta love open source. A little searching showed the new ASDoc compiler is available in the new release of Flex 4.&nbsp; So I download a nightly build for free. Nice. Write an Ant script. Run it. Errors. Not so nice.<br /><br /><h3>Getting it to work</h3>If you are using the Flash IDE or FlashDevelop this section is probably not for you. Only because I don't know how to run Ant scripts using these IDEs. Not even sure if you can. I use Ant to run command-line compilers as it makes things a lot easier. You can <a href="http://ant.apache.org/bindownload.cgi">download Ant</a> for free but I use it through my IDE which is Eclipse, so won't be able to assist in running a script standalone.<br /><br />At first I managed to get it to generate without too much difficulties. The log file with errors is quite descriptive of what the problem is. The compiler errors on the other hand is like a politician, artfully vague. So after making sure I don't have any &amp; signs lurking in my comments and my html tags are closed, I was able to generate some cool docs. Only problem was it didn't include any MXML files. Which kinda defeats the purpose.<br /><br /><h3>MXML problem</h3>I had a problem with my MXML files not being found. The error was something like <i>Error: Definition &lt;classname&gt; could not be found</i>. I should probably add that I instantiated my MXML inside an Actionscript class. Another error I got was <i>Error: Type was not found or was not a compile-time constant: &lt;classname&gt;</i>. The Ant script I used looked like this extract (will provide the working version at the end):<br />
<pre name="code" class="actionscript" rows="10" cols="80">&lt;target name="compile"&gt;
	&lt;echo message="Generating new docs..." /&gt;
	&lt;exec executable="${asdoc.dir}" failonerror="true" &gt;
		&lt;arg line="-doc-sources ${srcpath.dir}" /&gt;
		&lt;arg line="-window-title "${title}"" /&gt;
		&lt;arg line="-output ${output.dir}" /&gt;
		&lt;arg line="-external-library-path=${basedir}/swc" /&gt;
		&lt;arg line="-left-frameset-width 300" /&gt;
	&lt;/exec&gt;
&lt;/target&gt;
</pre>
<br />After doing some searching I found that I need to add the argument -source-path to tell the ASDoc compiler to include my source folder to the path that will be searched. So I did and then I got the obscure error that looked a little something like this:<br />
<pre name="code" class="actionscript" rows="10" cols="80">     [echo] Generating new docs...
     [exec] Loading configuration file C:\flex_sdk_4.0.0.3988\frameworks\flex-config.xml
     [exec] java.lang.StringIndexOutOfBoundsException: String index out of range: -28
</pre>
After doing some more digging I found the manifest file. The manifest file is an XML file that lists the full package of your cusotm MXML components. This will be used by the compiler should it come across a custom component it can't find. Here is what the manifest file looks like:<br />
<pre name="code" class="actionscript" rows="10" cols="80">&lt;?xml version="1.0"?&gt;
&lt;componentPackage&gt;
           &lt;component id="ClassName" class="com.full.package.ClassName" /&gt;
&lt;/componentPackage&gt;
</pre>
<br />All we need to do now is tell the ASDoc compiler to use this manifest file and we do it like so:<br />
<pre name="code" class="actionscript" rows="10" cols="80">&lt;arg line="-namespace comp ${basedir}\ant\Manifest.xml"/&gt;
&lt;arg line="-doc-namespaces comp"/&gt;
</pre>
<br /><h3>Complete ant script</h3><b></b>You will have to update the example Ant script properties to suit your environment:<br />
<pre name="code" class="actionscript" rows="10" cols="80">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project name="asdoc" default="main" basedir=".."&gt;

    &lt;property name="title" value="Project Title" /&gt;
	&lt;property name="flexsdk.dir" location="C:\flex_sdk_4.0.0.3988" /&gt;
	&lt;property name="asdoc.dir" location="${flexsdk.dir}\bin\asdoc.exe" /&gt;
	&lt;property name="srcpath.dir" location="${basedir}\src" /&gt;
	&lt;property name="output.dir" location="${basedir}\html_docs" /&gt;
	&lt;property name="externallib.dir" location="${basedir}/swc" /&gt;
	&lt;property name="manifest.file" location="${basedir}\ant\Manifest.xml" /&gt;

	&lt;target name="clean"&gt;
		&lt;echo message="Removing old docs folder..." /&gt;
		&lt;delete dir="${output.dir}" failOnError="false" includeEmptyDirs="true"/&gt;
		&lt;mkdir dir="${output.dir}"/&gt;
	&lt;/target&gt;	

	&lt;target name="compile"&gt;
		&lt;echo message="Generating new docs..." /&gt;
		&lt;exec executable="${asdoc.dir}" failonerror="true"&gt;
			&lt;arg line="-source-path ${srcpath.dir}"/&gt;
			&lt;arg line="-namespace comp ${manifest.file}"/&gt;
			&lt;arg line="-doc-namespaces comp"/&gt;
			&lt;arg line="-window-title ${title}"/&gt;
			&lt;arg line="-output ${output.dir}"/&gt;
			&lt;arg line="-external-library-path=${externallib.dir}" /&gt;
			&lt;arg line="-left-frameset-width 300" /&gt;
		&lt;/exec&gt;
	&lt;/target&gt;
	
	&lt;target name="main" depends="clean,compile" description="Complete build of ASDocs"/&gt;
	
&lt;/project&gt;
</pre><br />All that is required now is to run it. To run the Ant script in Eclipse do the following:<br /><ul><li>Window -&gt; Show view -&gt; Ant</li><li>In the Ant view click on the little icon with the ant and plus sign</li><li>Select the Ant script and click on the green play button</li></ul><br /><h3>Resources<br /></h3><ul><li><a href="http://livedocs.adobe.com/flex/3/html/help.html?content=asdoc_1.html">ASDoc help</a></li></ul>]]>
    </content>
</entry>

<entry>
    <title>Pixel Bender colour filter</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2008/12/simple-colour-f.html" />
    <id>tag:www.wezside.co.za,2008:/blog//2.53</id>

    <published>2008-12-11T09:44:31Z</published>
    <updated>2008-12-11T12:45:50Z</updated>

    <summary>After a great Max in Milano, I was inspired to start playing around with Pixel Bender. Granted, I wasn&apos;t going to create a raytracer and for someone who still struggles to understand the ColorMatrixFilter I thought the outcome of this tinker is pretty useful....</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="FDT" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PixelBender" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="actionscript" label="Actionscript" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flash" label="Flash" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="pixelbender" label="PixelBender" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[After a great Max in Milano, I was inspired to start playing around with Pixel Bender. Granted, I wasn't going to create a raytracer and for someone who still struggles to understand the ColorMatrixFilter I thought the outcome of this tinker is pretty useful.<br />]]>
        <![CDATA[<h3>Pixel Bender</h3>If by now you don't know what Pixel Bender is, step away from that dial-up connection. Pixel Bender is a toolkit that allows you to write your own filters for Flash, AfterEffects or Photoshop. How cool is that? So why do we want to write our own filters in PixelBender? Because it is fast. Very very fast. The Flash Player use multi-threading to apply bitmap filters, the only process that is multi-threaded to my knowledge. More accurately Pixel Bender creates pixel shaders, each pixel is shaded to a specific mathematical formula. By applying these formulas we can create cool effects like a fish-eye lens. <br /><br />
<h3>The filter</h3>The colour filter allows you to set the saturation, contrast, rgb tint and vignette value for any Actionscript DisplayObject. The Vignette needs a bit of work but you'll ge the idea.&nbsp; <br /><br />
<h3>Example</h3>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="myFlashContent" width="640" height="292">
	<param name="movie" value="http://blog.wezside.co.za/examples/colourFilter/PixelBenderColourFilter.swf" />
	<!--[if !IE]>-->
	<object type="application/x-shockwave-flash" data="http://blog.wezside.co.za/examples/colourFilter/PixelBenderColourFilter.swf" width="640" height="292">
	<!--<![endif]-->
		<a href="http://www.adobe.com/go/getflashplayer">
			<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
		</a>
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<br /><i>Requires Flash Player 10</i>
<br /><br />Move your mouse around to dynamically adjust the saturation (horizontal) and contrast (vertical). I also encoded the video with cuepoints as I thought it would be interesting to see what effect using different channel tints might have on the video at different stages. It is known that colours invoke emotion, and the reason why so many films use different tint filters is to invoke specific emotions. Blue can be cold, orange, yellow can be warm to give but a basic example. Combined with music this can be of great use to submerge the viewer further into the visuals. The cue points are set at 10sec (red), 28sec (blue), 73sec (green). To see what tint is currently set just move your mouse to the far left of the video, reducing saturation will show what tint is currently showing. Ok enough fairy talk. Lets see some code!<br />
<pre name="code" class="actionscript" rows="10" cols="80"> 
package com.wezside.filters 
{
	import flash.display.DisplayObject;
	import flash.display.Shader;
	import flash.display.Sprite;
	import flash.display.Stage;
	import flash.events.Event;
	import flash.filters.ShaderFilter;
	import flash.media.Video;
	import flash.net.NetConnection;
	import flash.net.NetStream;
	import flash.net.URLLoader;
	import flash.net.URLLoaderDataFormat;
	import flash.net.URLRequest;
	import flash.utils.getQualifiedClassName;		

	/**
	 * @author Wesley.Swanepoel
	 * 
	 * Compiler settings:
	 * -default-size 320 240 -default-frame-rate 31 -default-background-color 0x000000 -library-path {flexSDK}/frameworks/locale/en_US
	 */
	public class PixelBenderColourFilter extends Sprite 
	{

		
		private var video:Video;
		private var ns:NetStream;
		private var nc:NetConnection;
		private var colourFilter:ShaderFilter;
		private var shader:Shader;

		
		public function PixelBenderColourFilter() 
		{
			createVideoPlayer( ); 
			loadShader( );
			play( );
		}

		private function loadShader():void
		{
			var loader:URLLoader = new URLLoader( );
			loader.dataFormat = URLLoaderDataFormat.BINARY;
			loader.addEventListener( Event.COMPLETE, complete );
			loader.load( new URLRequest( "http://blog.wezside.co.za/examples/colourFilter/ColourFilter.pbj" ) );
		}

		private function complete( event:Event ):void 
		{
			shader = new Shader( event.target.data );
			addEventListener( Event.ENTER_FRAME, enterFrame );
		}

		private function enterFrame( event:Event ):void 
		{
			shader.data.center.value = [video.width / 2, video.height / 2];
			shader.data.vignetteInnerSize.value = [0.5];
			shader.data.vignetteOuterSize.value = [500];
			shader.data.saturation.value = [mouseX / stage.stageWidth * 2];
			shader.data.contrast.value = [mouseY / stage.stageHeight * 2];			
			colourFilter = new ShaderFilter( shader );
			video.filters = [ colourFilter ];
		}
		
		private function createVideoPlayer():void
		{
			nc = new NetConnection( );
			nc.client = new Object( );
			nc.connect( null );
			
			ns = new NetStream( nc );
			ns.client = {onCuePoint: cuePointHandler};
			ns.bufferTime = 6;
			
			video = new Video( 640, 292 );
			video.attachNetStream( ns );
			video.smoothing = true;
			addChild( video );
		}
		
		private function cuePointHandler( info:Object ):void
		{
			switch ( info.name )
			{
				case "Red"	 : shader.data.tintR.value = [0.3]; break;	
				case "Green" : shader.data.tintG.value = [0.5];break;	
				case "Blue"  : shader.data.tintB.value = [0.5];break;	
				case "exit"  : shader.data.tintR.value = [0.0];
							   shader.data.tintG.value = [0.0];
							   shader.data.tintB.value = [0.0];
							   break;	
				default		 : break;
			}
		}	
		
		public function play():void
		{
			ns.play( "flv/test.flv" );
		}

		override public function toString():String 
		{
			return getQualifiedClassName( this );
		}
	}
}


</pre><br /><br />
<a href="http://blog.wezside.co.za/examples/colourFilter/ColourFilter.pbj"><b>Download the PixelBender filter here »</b></a><br /><br />

<h3>Resource</h3>
<ul>
<li><a href="http://labs.adobe.com/wiki/index.php/Pixel_Bender_Toolkit">http://labs.adobe.com/wiki/index.php/Pixel_Bender_Toolkit</a></li>
</ul>]]>
    </content>
</entry>

<entry>
    <title>Generate PDF&apos;s on the fly</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2008/11/generate-pdfs-o.html" />
    <id>tag:www.wezside.co.za,2008:/blog//2.52</id>

    <published>2008-11-03T17:50:15Z</published>
    <updated>2008-11-03T18:45:08Z</updated>

    <summary><![CDATA[I read this post from DevGirl about AlivePDF, an AS3 API to save Flash content to PDF. The examples showed how to use a server-side script or using AIR. Hmmm...&nbsp; this could be a nice little introduction into the world of FP10 me thinks. I haven't spend any time looking into the FP10 features but thought this could be fairly quick and easy to do... and it was!...]]></summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="actionscript" label="Actionscript" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flash" label="Flash" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[I read this post from <a href="http://devgirl.wordpress.com/">DevGirl</a> about <a href="http://alivepdf.bytearray.org/">AlivePDF</a>, an AS3 API to save Flash content to PDF. The examples showed how to use a server-side script or using AIR. Hmmm...&nbsp; this could be a nice little introduction into the world of FP10 me thinks. I haven't spend any time looking into the FP10 features but thought this could be fairly quick and easy to do... and it was!<br />]]>
        <![CDATA[The example shows two textfields. Enter some text in the title and also some in the body. If you're lazy no worries I added some already for you. I used the AlivePDF (0.1.4.6) API which is dead easy to use. Here is the example and the full source. <a href="http://get.adobe.com/flashplayer/">(Flash Player 10 required)</a><br />Selah.<br /><br />

<h3>Example</h3>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="myFlashContent" width="550" height="400">
	<param name="movie" value="http://blog.wezside.co.za/examples/alivepdf/main.swf" />
	<!--[if !IE]>-->
	<object type="application/x-shockwave-flash" data="http://blog.wezside.co.za/examples/alivepdf/main.swf" width="550" height="400">
	<!--<![endif]-->
		<a href="http://www.adobe.com/go/getflashplayer">
			<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
		</a>
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<h3>Source</h3>
<pre name="code" class="actionscript" rows="10" cols="80"> 
package com.wezside.alive.pdf.core
{
	import org.alivepdf.colors.RGBColor;
	import org.alivepdf.fonts.FontFamily;
	import org.alivepdf.layout.Orientation;
	import org.alivepdf.layout.Size;
	import org.alivepdf.layout.Unit;
	import org.alivepdf.pages.Page;
	import org.alivepdf.pdf.PDF;
	import org.alivepdf.saving.Method;
	
	import flash.display.Sprite;
	import flash.events.IOErrorEvent;
	import flash.events.SecurityErrorEvent;
	import flash.events.TextEvent;
	import flash.net.FileReference;
	import flash.text.StyleSheet;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFieldType;
	import flash.text.TextFormat;
	import flash.utils.ByteArray;	

	/**
	 * @author Wesley.Swanepoel
	 * @version .001
	 */
	public class Main extends Sprite
	{
		
		private var pdf:PDF;
		private var page:Page;
		private var body:TextField;
		private var title:TextField;
		private var ba:ByteArray;

		public function Main() 
		{
			ba = new ByteArray();
			title = new TextField();
			title.type = TextFieldType.INPUT;
			title.border = true;
			title.borderColor = 0xefefef;
			title.width = 500;
			title.height = 50;
			title.defaultTextFormat = new TextFormat( "Times", 40, 0x666666 );
			title.x = 20;
			title.y = 20;		
			title.text = "Title";
			addChild( title );
			
			body = new TextField();
			body.type = TextFieldType.INPUT;
			body.border = true;
			body.borderColor = 0xefefef;
			body.width = 500;
			body.height = 200;
			body.wordWrap = true;
			body.multiline = true;
			body.x = 20;
			body.y = 75;		
			body.text = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent tempor ultricies eros. Sed erat ipsum, ultrices fermentum, euismod ac, commodo nec, tellus. Curabitur faucibus. Proin at sapien. Aliquam ullamcorper. \n\nAliquam tincidunt. Nunc blandit, mauris eu egestas consectetuer, enim lacus ullamcorper mi, sed dignissim nisl erat sed nulla. Donec nisl. Vestibulum volutpat congue odio. Maecenas nibh sem, congue vel, scelerisque non, placerat sed, nisl. Cras congue. Nam iaculis. Fusce adipiscing ipsum vitae sem lacinia congue. Pellentesque luctus ultrices nisi. Etiam ut mi nec arcu pellentesque sagittis. Duis accumsan est a nibh. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi vulputate turpis suscipit ipsum. Nunc posuere tortor id est. ";
			body.defaultTextFormat = new TextFormat( "Arial", 12, 0x666666 );
			body.setTextFormat(new TextFormat( "Arial", 12, 0x666666 ));
			addChild( body );
			
			
			var buttonCSS:StyleSheet = new StyleSheet();
			buttonCSS.setStyle("a:link", {textDecoration: "none", fontSize: 24});
			buttonCSS.setStyle("a:hover", {textDecoration: "underline", fontSize: 24});
			var button:TextField = new TextField();
			button.autoSize = TextFieldAutoSize.LEFT;
			button.width = 200;
			button.addEventListener(TextEvent.LINK, generatePDF );
			button.htmlText = "<a href="event:generate">[ Generate PDF ]</a>";
			button.styleSheet = buttonCSS;
			button.x = body.x + body.width - button.textWidth;
			button.y = body.y + body.height;
			addChild( button);
		}
		
		
		private function generatePDF(event:TextEvent):void
		{
			
			page = new Page(Orientation.PORTRAIT, Unit.MM, Size.A4 );
			pdf = new PDF();
			
			pdf.addPage( page );
			pdf.textStyle(new RGBColor(0x666666));
			pdf.setFont( FontFamily.TIMES, "", 40 );
			pdf.addText( title.text, title.x, title.y );
						
			pdf.setFont( FontFamily.ARIAL, "", 12 );
			pdf.setAuthor( "wezside" );
			pdf.setXY( body.x, 30 );
			pdf.addMultiCell( 150, 5, body.text );
			pdf.setTitle( title.text );
			
			ba = pdf.save( Method.LOCAL );
			
			var file:FileReference = new FileReference();
			file.addEventListener( IOErrorEvent.IO_ERROR, error );
			file.addEventListener( SecurityErrorEvent.SECURITY_ERROR, error );
			file.save( ba, title.text + ".pdf");
		}
		
		private function error( event:IOErrorEvent ):void
		{
			body.text = event.type + " | Error occured | " + event.text;
		}	

	}
}
	
</pre>

<h3>Resources</h3>
<ul>
<li><a href="http://alivepdf.bytearray.org/" target="_blank">http://alivepdf.bytearray.org/</a></li>
</ul>]]>
    </content>
</entry>

<entry>
    <title>Fullscreen flash with browser scrollbar</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2008/10/fullscreen-flas.html" />
    <id>tag:www.wezside.co.za,2008:/blog//2.51</id>

    <published>2008-10-29T09:07:57Z</published>
    <updated>2010-02-03T12:02:55Z</updated>

    <summary>A lot of people have blogged about this and there have been a few attempts at libraries which solves the problem. Some have gained status and some have gracefully failed silently. It&apos;s only recently that I encountered the need to use this method and frankly I prefer browser scrollbars as most users do in my opinion. I feel they are more responsive and have better performance. But damn it ain&apos;t easy getting this to work...</summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="actionscript" label="Actionscript" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flash" label="Flash" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[A lot of people have blogged about this and there have been a few attempts at libraries which solves the problem. Some have gained status and some have gracefully failed silently. It's only recently that I encountered the need to use this method and frankly I prefer browser scrollbars as most users do in my opinion. I feel they are more responsive and have better performance. But damn it ain't easy getting this to work properly and at one point I wondered if it is actually worth the trouble. <br />]]>
        <![CDATA[<h3>Quick overview of the problem</h3>It may be worth pointing out that in most cases there are two distinct reasons a flash website might have, for wanting to enable the browser scrollbar. <br /><br /><ul><li>If the window is resized to a smaller size that was designed for - a scrollbar would be nice.<br /></li><li>If the content is larger than the original design - a scrollbar would be nice</li></ul><br />

<h3>SWFResize, SWFForcesize and SWFObject</h3>

SWFResize is a nice little add-on to the SWFObject solution. Inducted into the OSFlash hall of fame, it is with regret that this add-on doesn't work anymore. Reasons not being for lack of development but rather the release of SWFObject version 2. Enter SWFForcesize, another attempt to solve the fullscreen flash with browser scrollbar. Very similar to SWFResize this add-on too worked quite well but also only with SWFObject version prior to 2. <br />

<br />We all love SWFObject. It's the next best thing since sliced bread. It kicked dust in all the proverbial cowboy faces and irritates the crap out of Jakob Nielson purists. Before the release of the mighty version 2, SWFObject seemed to work quite well with the afore mentioned add-ons. <br /><br />Lucky for us Bobby van der Sluis and Geoff Stearns did some sterling work and included an example for solving the first requirement when showing full flash with a browser scrollbar in the latest version of SWFObject. This doesn't however solve the problem of content being larger than the original design. For this we need to make some changes to Bobby's example code. <br />

<br /><h3>SWFObject original code</h3>

<pre class="brush: as3" rows="10" cols="80"> 

<script type="text/javascript">
//<![CDATA[
function getViewportSize() { 
	var size = [0, 0]; 
	if (typeof window.innerWidth != "undefined") { 
		size = [window.innerWidth, window.innerHeight];
	} 
	else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
		size = [document.documentElement.clientWidth, document.documentElement.clientHeight]; 
	}
	else {
		size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight]; 
	}
	return size; 
}
function createFullBrowserFlash() {
	swfobject.createCSS("html", "height:100%;");
	swfobject.createCSS("body", "height:100%;");
	swfobject.createCSS("#container", "margin:0; width:100%; height:100%; min-width:980px; min-height:553px;");
	window.onresize = function() {
		var el = document.getElementById("container");
		var size = getViewportSize(); 
		el.style.width = size[0] < 980 ? "980px" : "100%";
		el.style.height = size[1] < 553 ? "553px" : "100%";
	};
	window.onresize();
}	
swfobject.embedSWF("main.swf", "content", "100%", "100%", "9.0.0");
if (swfobject.hasFlashPlayerVersion("9.0.0")) {
	swfobject.addDomLoadEvent(createFullBrowserFlash);
}
//]]&gt;
</script>
</pre>

<h3><br /></h3><h3>The solution</h3>

<pre class="brush: as3"  rows="10" cols="80"> 
<script type="text/javascript">
//<![CDATA[

var size = getViewportSize();	 
function getViewportSize() 
{ 
	var size = [0, 0]; 
	if (typeof window.innerWidth != "undefined") { 
		size = [window.innerWidth, window.innerHeight];
	} 
	else if (typeof document.documentElement != "undefined" && typeof document.documentElement.clientWidth != "undefined" && document.documentElement.clientWidth != 0) {
		size = [document.documentElement.clientWidth, document.documentElement.clientHeight]; 
	}
	else {
		size = [document.getElementsByTagName("body")[0].clientWidth, document.getElementsByTagName("body")[0].clientHeight]; 
	}
	return size; 
}
function createFullBrowserFlash() 
{
	swfobject.createCSS("html", "height:100%;");
	swfobject.createCSS("body", "height:100%;");
	swfobject.createCSS("#container", "margin:0; width:100%; height:100%; min-width:980px; min-height:553px;");
}	
function setHeight( h )
{
	if ( h < size[1] ) h = "100%";
	var el = document.getElementById("container");
	if ( h != "100%" ) el.style.height = h < 553 ? "553px" : h + "px";
	else el.style.height = "100%";
}

var flashvars = { };
var params = { "allowscriptaccess": "samedomain" };

swfobject.embedSWF("main.swf", "content", "100%", "100%", "9.0.0", false, flashvars, params);
if (swfobject.hasFlashPlayerVersion("9.0.0")) {
	swfobject.addDomLoadEvent( createFullBrowserFlash );
}
//]]&gt;
</script>
</pre>
The basic changes are the removal of the window.resize listener as this is now handled through Actionscript and the addition of a setHeight() Javascript method. This method will be called from each Flash page with a new height. It checks to see if the value supplied is less than the minimum height, if it is then use 100% as the height. If not, set the container div's height to the new value. Easy peasy.<br /><br />I only set the hight as that was all I required from the resize, although in some cases you might need to add the width too. <br /><br />Selah.<br />&nbsp;<br /><h3>Tested</h3><ul><li>IE6, IE7<br /></li><li>FF 3.0.3</li><li>Safari 3.1<br /></li></ul><br /><h3>Resources</h3><ul><li><a href="http://www.bobbyvandersluis.com/swfobject/testsuite_2_1/test_dynamic_fullbrowserflash_adv.html">Example of first requirement, i.e. minimum size restriction</a></li>
<li><s><a href="#" rel="nofollow">Example of second requirement. Click on the "Scrutinize the fact" links and any sub link to view extended page content.</a></s><p class="update">[Updated: Removed example due to website being changed to HTML</p><br /></li></ul>&nbsp;<br /><br /><br />]]>
    </content>
</entry>

<entry>
    <title>Interview: Powerflasher FDT&apos;s Frank Piotraschke</title>
    <link rel="alternate" type="text/html" href="http://www.wezside.co.za/blog/2008/10/interview-fdts.html" />
    <id>tag:www.wezside.co.za,2008:/blog//2.49</id>

    <published>2008-10-06T10:53:53Z</published>
    <updated>2008-10-30T14:22:24Z</updated>

    <summary><![CDATA[It should be quite evident by now that I am a huge fan of Eclipse and FDT for Flash development. I thought it might be cool to drop the guys at FDT an email and get an update of where things are &nbsp;in the world of Powerflashers!...]]></summary>
    <author>
        <name>Wesley Swanepoel</name>
        
    </author>
    
        <category term="Actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Eclipse" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="FDT" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="General" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="actionscript" label="Actionscript" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="fdt" label="FDT" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flash" label="Flash" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="general" label="General" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.wezside.co.za/blog/">
        <![CDATA[It should be quite evident by now that I am a huge fan of Eclipse and FDT for Flash development. I thought it might be cool to drop the guys at FDT an email and get an update of where things are &nbsp;in the world of Powerflashers!<div><br /></div>]]>
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="FrankPiotraschke.jpg" src="http://www.wezside.co.za/blog/2008/10/06/fdt_interview/FrankPiotraschke.jpg" class="mt-image-right" style="margin: 0pt 0pt 20px 20px; float: right;" width="167" height="211" /></span><h3>FDT has come along away since the early days, why do you think it is doing so well?</h3>
I don't know if you know it but FDT was never meant to be a comercial product. Nico Zimmermann developed FDT in 2004 because there was no professional tool on the market. He developed it only for himself, then for our company (Powerflasher) from there it went to our freelancers, and the rest is history. From the first days till today, we kept the focus on the professional developers like ourselves at Powerflasher. Moreover we keep guys like <a href="http://void.andre-michelle.com/">André Michelle</a> and <a href="http://blog.joa-ebert.com/">Joa Ebert</a> in the loop and ask them what they think of FDT and what they are missing. This we include in the development process for FDT. And new developments like our Jira system <a href="http://bugs.powerflasher.com/jira/secure/Dashboard.jspa">bugs.powerflasher.com</a> are also a great help. But also the increase of the market demand for professional tools in AS3 helped us a lot.
<br /><br />
<h3>Do you know how many people are currently using FDT?</h3>This is hard to answer, first of company policy and for different other reasons. But fact is that the user figues increased since FDT 3 by more then 400%.<div>&nbsp;
<br /><br />
<h3>How many members are in the FDT team?</h3>
The FDT Team consists in total of 8 people.<div>&nbsp;
<br /><br />
<h3>FDT's performance has increased over last few releases, how much more performance can be squeezed out of Eclipse before contemplating a standalone version like Flex Builder?</h3>
Flex Builder is also an Eclipse Plug-in. And many reasons for our increased performance are based on Eclipse. Eclipse is such a great platform, we are not intending to leave it. We still have tons of features and ideas in our heads that can be implemented in the eclipse platform, and also the eclipse platform is developing further.
</div><div><br /><br />
<h3>Any chance Eclipse 3.4 Ganymede enhancements will be taken advantage of by FDT in the future?</h3>
Sure :)
</div><div><br /><br />
<h3>I work on a large amount of projects and have separate workspaces for each client. Any chance of seeing the Export Preference feature or something similar for exporting workspace settings?</h3>
We get a lot of feature requests of differen developers. I always recommend to file them under bugs.powerflasher.com as a feature request, and we can score it, and very often, build it in. That is how we try to develop software, by getting feedback of the community.</div><div><br /><br />
<h3>Rumour has it you guys are working on MXML support, is this true?</h3>
True :) Give us a few more weeks, and we will bring it out, first in beta. Can be expected before the end of the year.
</div><div><br /><br />
<h3>The AIR run configuration included in 3.1 is a huge help, any more AIR developments expected in the near future?</h3>
We are constantly improving FDT, and AIR is definitely a good thing for the future. But first off we are implementing FP10 and MXML into FDT.
</div><div><br /><br />
<h3>Flash Gurus like Andre Michelle are paving the way for the rest of us Actionscripters, who in your opinion have made a big impact on FDT?</h3>
André definitely had a big impact on FDT. But all our Flash Heroes (check our blog) are big supporters of ours and have their impact on FDT. Guys like Branden Hall or Chris Allen, Joa Ebert, Marcel Fahle, they do a lot of good things for FDT. But the best Actionscripter I have ever seen and who also "invented" FDT was definitely Nico Zimmermann!!
</div><div><br /><br />
<h3>And finally, are you planning on taking over the world? If so, who's Pinky and who's Brain?</h3>
Haha... I wouldn't object taking over the AS3-Editor world. We are travelling a lot and try to show FDT to as many coders as possible to spread the word. We think FDT can help to make the Flashworld get more professional and efficient. Saying this, you have to say if this is more pinky-like or more like brain :)</div></div>]]>
    </content>
</entry>

</feed>
