25
Jun 10

Blue lego block of ambiguity

At the risk of getting sucked into the Apple vs Adobe shitstorm, my own response to Apple chosing to block Flash content from their mobile devices is to at least tell users why – because Apple left it at the rather obscure blue lego block, with no explanation (great experiential design guys). Simply include this code in your page/s to redirect mobile safari users to a page of your chosing …I direct them here.


22
Jun 10

How to correct 3-D projection on stage resize

The problem:
You're using Flash 10's native 3-D API and notice the projection goes a little skewiff when resizing the window.

The solution:
You need to reset the stage's projection centre on stage resize, like so...

var centre:Point = new Point(stage.stageWidth/2, stage.stageHeight/2);
root.transform.perspectiveProjection.projectionCenter = centre;


04
Jun 10

Migrating to Flex SDK 4

In moving to compiling projects with the new Flex SDK 4, in noticed a couple of gotchas to do with the EMBED metatag that I thought I'd better share:

Runtime shared libraries
If you're like me and want to embed assets in your project with the EMBED Flex metatag, so you can manage and update things easily, there's a an extra compiler parameter you must add, in order for your project to compile properly:

--static-link-runtime-shared-libraries=true

This is already added as a new default parameter to the new version of FlashDevelop. But if you're planning to build projects from outside of FlashDevelop, you must add this to your compiler string. Otherwise, the compiler will think you have uninitialised constants and warn you so.

Embedding fonts
Using the EMBED metatag (or runtime loading) for fonts is the sensible way forward. The amount of projects I've seen where you need to build from an FLA file full of fonts you need to install that you can't find is crazy. With Flex SDK 4, you'll need to add an extra attribute to your embed tag for fonts, called 'embedAsCFF':

[Embed(source='myfont.ttf', fontName='MY_FONT', fontWeight='regular', unicodeRange='U+0020-U+0040,U+0041-U+005A', mimeType='application/x-font', embedAsCFF='false')]
public static const MY_FONT :Class;


02
Jun 10

FlashSize – simple browser resizing

How to allow SWFs to display at 100% width/height in your browser - but enforce a minimum width and height, in case of a smaller browser window size than you've designed for.

Until recently, I'd used other Flash/browser resize managers when I needed to ensure a SWF is embedded in HTML at 100% width and height, but with support for a minimum width and height setting. But I recently needed a solution the didn't depend on external JavaScript, due to not having control of the page the SWF is embedded in.

With my simple FlashSize script, all you need do is call:

import com.spikything.utils.FlashSize;
FlashSize.setup(minWidth, minHeight);


30
Apr 10

Who moved my files?

DropBoxI'm in love with DropBox! If you're like me, always freelancing on new machines and resorting to keeping your useful files on a USB stick - then you might find DropBox useful. If you're not using it already, give it a go! It's a free online storage and automatic file syncronisation tool that even has basic version control and is the easiest way to keep your important stuff backed up and updated automatically, across multiple computers.


29
Apr 10

How geek are you?

I recently made up a truly geek puzzle for the location of a hidden birthday present. I thought I'd post it, in case any of you are feeling geek enough to tackle it:

UEsDBBQAAwAAAN1sbTuK6fmOlwEAAIsBAAAKAAAAUEkxNURQLnBuZzfI6BMIzVST7bjgCkdnlo7H
afP8ge40fQLne8XJCzD0K4KRLCh5JgMvbckjBsyobcxV0bKog+T1Z1BEhZtg+S5qUUnl1u0b/8aB
xRc8lhALd+DCK4jgp0eveGT6SdTP1XjgX2UJmOOU8P6O3wj9rmQI8G94MI27DOwQdYRW3uICMv7B
cNxoEan5oSZrdAHLIBetevO7DkLvqsWNm/pEj0VDF1t6dgrFNauhNRrabi+1LG8cyKbFi7VK2QaF
RBRXWdLGuRAzpsWEi/xxWkb6leSnVK+DEKy6O7hk2QTm0tlkYkTsRFn93NpdXnnUJ4MtpMzxyQCR
zXgWUf1gCeRmfVE7/cuL4LCF466TflgJNGVhSg1NmzzC398SJH8xmBDNaJ5DU297I59M07qje+G9
TL/oNWTWioXgkvjjovGhP3UAAPh1de6DRkd1E+RvTNV3ASj/BQsr1oBvPJFbPp0yMsncIcVshOVG
y+XKE2kxoVQsVsIcLE+W6sXv4BBN4opIrNWqPnioEIk9FTa76EEvA0Q34UfKWi/pUEsBAhQAFAAD
AAAA3WxtO4rp+Y6XAQAAiwEAAAoAAAAAAAAAAAAgAAAAAAAAAFBJMTVEUC5wbmdQSwUGAAAAAAEA
AQA4AAAAvwEAAAAA


03
Apr 10

MouseWheelTrap now at GoogleCode

I've put the latest version of my Flash/browser scrolling fixer over on GoogleCode and will be updating it there, as necessary.


19
Jan 10

A History of the World

I just returned from a trip round SE Asia to see my last project launch. Called 'A History of the World in 100 Objects', it's a joint venture between BBC Radio 4 and the British Museum to chart human history in a new way. I developed the concept for the Flash 3D object explorer with the guys at GT and built it using Flash 10's native 3D capabilities. Users are able to explorer objects from throughout human history in a sort of 3D timeline and even make history by adding their own. Here's the TV advert for the series:

Since it is expected to grow to up to 10,000 objects over the next 5 years, I used all the tricks in the book to optimise loading, rendering and memory management - which will bore most people to tears, so that's for another time. Check out the Flash site itself here.