Tinting the colour of a MovieClip

Here’s an old snippet that I use quite often to set the tint of a MovieClip. It’s useful if you put all of these sorts of utilities in a class and access them via public static methods. So in a utility class called MovieClipUtils.as you could call:
MovieClipUtils.tint(myMovieClip, 0xff0000, 0.5);

[code]
//Color an MC with option amount  (0-1)
public static function tint(target:MovieClip, color:Number, amount:Number = 1):void
{
//create a new Color object
var c:Color=new Color();
//set the color of the tint and set the multiplier
c.setTint(color, amount);
//apply the tint to the colorTransform property of the desired MovieClip/DisplayObject
target.transform.colorTransform = c; //mc is a MovieClip
}
[/code]

WordPress iPhone app – incorrect username or password

After trying to setup the WordPress iPhone app and running into “incorrect username or password” errors, I finally sorted it out. It looks like there are quite a few other people with the same problem so I thought I would post it up. For the record I have a self-host setup.

Firstly – go online on your computer (not your iPhone!) and make sure in your wordpress dashboard you have XML-RPC turned on. It’s located in Settings>Writing>Remote Publishing. Turn it off and on again if its already on (I tried that and it seemed to work!)

Then back on your iPhone – try entering your username and password again. You might as I experienced then get past the login screen but now be met with a “Communication Error – Bad user name or password” error! No fear – patience is needed here!

Now try deleting the blank blog that has been created by clicking on the top right edit button. Then restart the app and try entering all your login details again. It should now work. (fingers crossed)

No guarantees as it worked for me after a few attempts but that’s not to say it will for you!

Opening Safari from your iPhone app

A very simple task I know but when you are starting out its nice to find it on a blog!
Somewhat similar to using URLRequest in AS3 really.
[code]
NSString *urlString = @”http://www.mywebsite.com”;
NSURL *url = [[NSURL alloc] initWithString: urlString];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];

[webView loadRequest:request];//UIWebView instance named webView declared earlier
[request release];
[url release];
[/code]

Common XML character codes

Sometime when using XML data in Flash/FLex you need to use special characters to save your XML breaking and I always forget what they are! So to save me a google search or two here they are again:

//XML character codes

& Ampersand &
> greater-than >
< less-than &lt;
‘ apostrophe &apos;
“ quote &quot;


Compiling multiple SWFs from FlashDevelop

I use FlashDevelop for Actionscripting and sometimes I need to export multiple SWFs from a single project. You just need to use the mxmlc compiler tags in your AS class file (make sure the class extends a displayObject) and use Flash Tools > Build Current File.

Here is an example of the mxmlc with a bunch of settings that are fairly self-explanatory. For multiple SWC files just define the -l lib tag again. To see a list of all the tags use the @mxmlc -help tag.

[code]
/**
* @mxmlc -help
* @mxmlc -o bin/create_banner.swf -debug=true -default-size 1024 768 -default-background-color 0x000000 -use-network=false -l lib/login_all.swc -l lib/customFont.swc -l lib/CreateABannerAssets.swc -l lib/aether.swc -source-path=Z:\AS3_classes\
*/
[/code]

AFL 2011 Flash Interactive

Baldscone recently completed developing this commercial kids CD-ROM for the Australian Football League. The disk comprises of puzzles, 3D games, skills videos and activities for kids ranging from 5-12 years old. In conjunction with a back-end database it allows the users to compete against each other in AFL teams and individually whilst also tracking statistics of usage and screens visited etc.

The disk makes use of a lot of Papervision 3D interactions which presented a challenge to optimise to work on a vast array of computers. All games, puzzles and disk programming was done by Baldscone in AS3 – using Papervision, Greensock and an MVC pattern to hold it all in place.

For a sneak peak click on the header image to see some of the screens. Demos coming soon when it is released.

Partnerships in Care

I recently worked on a search tool for this website to allow users to find the correct PiC hospital or facility for them. It makes use of a Model View Controller design pattern so I could output different Flash files with the same functionality but with different “views” . They were destined for different pages – with differing layout and dimensions. The locations are based in XML and the user can filter and sort locations by various different categories. It also makes use of the Google Maps API to do geolocation lookups and display location Maps within Flash.

I was also asked to design and develop the homepage Flash component for this site a day before it went live – so I thought of using a bit of Papervision.

Sony Despatches MP3 Player

I just completed a small reusable, re-skinnable, XML driven music player for a Sony intranet site. Quite a simple job really but fun to do.  It loads in a bunch of tracks and their titles etc. plus a bunch of different background skins for each language. As well as the normal playback controls etc. – all in a custom scrolling interface. Small but nice.

Its obviously an intranet site so Ive hosted a demo of it here.

Wavelab 7 Help Manual

In a break from pure coding, I was lucky enough to be involved in writing the help manual for Steinberg’s new release of WaveLab 7 recently. A mammoth task of distilling a thousand page manual into an inline help system.

WaveLab 7 is a professional audio engineering package for Mac and PC that allows you to do everything from audio restoration to professional CD mastering. Along with Colin at CDA Cambridge, we wrote the copy for the inline help system. Not only was it a technical writing job but we also had to script and compile the Help system in a proprietary markup language for a documentation system called Doxygen.

Needless to say it was a long on-and-off job as the software was developed in various iterations. Each new feature meant some more learning for us as we figured out how the software worked. In terms of instructional design it was an interesting project as not only was the GUI design out of our hands but the complexity of the interface of WaveLab with its various “Workspaces” and thousands of functions created a lot of thought on how best to present it all to the user.

I was also responsible for making sure the Doxygen system we compiled the Help with all ran smoothly which was challenging at times after language translations and updates. Its now been released into the wild and selling well – you can read more about its new features at http://www.steinberg.net/en/products/wavelab/whats_new.html