I have been freelancing for the past year and was getting on okay, but in July I stumbled across a job advert that spiked my curiosity. Anyway, to cut a long story short, I applied for the job, got an interview, trialed - part time over 2 months and started full-time again in October. I am now helping to build an army of robots to take over the world*
Continue reading ‘Best Job Ever…’
Archive for the 'actionscript' Category
Best Job Ever…
SWFAddress and a tip
Working on a revamp of a website, I decided to try out SWFAddress to make the back button work instead of a hand-rolled solution…
I managed to get this up and running really quickly, which was nice, but then I spent 2 hours working out why it no longer worked when I integrated the SWFAddress into the site…
The Flash bit worked okay - change something and the address bar got updated, but the back button never worked - or did not send any events back to Flash.
2 Hours later, after stripping my code back, I found the problem:
If you are using SWFObject, the javascript for this needs to be included before the SWFAddress javascript. Doh!
Apart from that small hiccup, it’s nice and fairly simple to use…
SAS SOS
I finished a big project last week for Surfers Against Sewage called Save Our Seas.
This is another free educational resource like Operation Beach Clean which I had done previously.
Anyway, this time I did some animation myself and also re-used part of the intro from OBC, adding some extra audio and lip-sync’ing to this.
The Flash is a bit more modular this time, so we can easily create new content and add it to the XML sitemap to be loaded in. It still runs in AS2 as it borrows some code from the OBC project.
Some cool stuff which helped a lot: the XPath implementation from XFactorStudio, Jobe Makar’s Wordsearch game from Flash MX Game Programming Demystified was ported to AS2 and I used the Tween Lite package for the first time when the ripple transitions started slowing everything down - nice and simple. I also had some great help from the FlashCoders mailing list with some tricky problems, cheers guys.
Anyway, check out the finished project and if you know any teachers who might like it, let them know too.
http://www.sas.org.uk/education/sos/
Tip - don’t launch PDF documents as a URL in Firefox, Acrobat Reader keeps hanging the browser for some reason…
Here is some code to help:
Quick Code
private function _showPDF(_pdfURL:String):Void {
//use JS to pass in the browser variable to Flash: - http://www.quirksmode.org/js/detect.html
var browser:String = String(_root.browser).toLowerCase();
if ("firefox" == browser) {
_useDownload = true;
}
if (true == _useDownload) {
var fileRef:FileReference = new FileReference();
if(!fileRef.download(_pdfURL)) {
trace("Failed to download.");
}
} else {
getURL(_pdfURLl, "_blank");
}
}

