2008
09.19

Google Maps AS3 Api

I using the new (ish) google maps Api for a mini-game, augmenting the map with some sprites etc… anyway, I wanted to put the word out about how amazing it is. In just a few lines of code you can have the map showing with all your customised overlays/markers the lot – all natively in AS3. So, if you’ve been putting off using google maps in your flash applications because you were worried about the complexity, worry no longer.

Google Maps Flash

Go map.

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
2008
09.14

iTunes + iTouch = lost music

Sorry to use this space for a rant but I have to get this off my chest.

I’ve just been told by an Apple rep that I can get back some music files I’ve lost on iTunes just this once, but I sholdn’t expect to be able to do it again “Please note that you may download your purchases only once, so this is an exception”. Fair enough you might say, that is if you didn’t know how I lost the files in the first place;

After downloading tracks off iTunes directly on my iTouch I decided to sync to my computer. Unfortunaly for me iTunes on the computer and my iTouch had decided they didn’t get along anymore and wouldn’t sync. After much fiddling it appeared the only way they would sync would be to totally reset my iTouch resulting in the lost music. Off to Apple I thought, they’ll give me my DRM’d music back since it’s there hardware and software that has eaten it all up, but as you now know, this is not the case…

So, the moral of the story is – don’t buy tracks off the iTunes store if you expect them to provide re-downloads in case of an accident, even if the cause of the accident is there software/hardward.

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
2008
07.31

The previously mentioned Samsung People site now has voting, plus a few new effects. Check it out.

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
2008
06.22

I was really struggling to find a fix for this whilst working on www.fortheloveofbeer.com.au so I thought I would post something here – to keep the transitions fast I had to take a bitmap of my screens (cacheAsBitmap just doesn’t seem to cut the mustard when you have a lot of text on stage) but I kept getting the following error;

SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: http://blah/main.swf cannot access unknown URL. No policy files granted access.

I tried every security fix I could think of but nothing helped. Trying to bitmap draw a screen with a custom video player component was causing the problem. If I tried to do the bitmap draw before an flv was loaded it would throw this error. Turns out that the NetStream object requires onCuePoint and onMetaData handlers to be defined or you will get this error. Why this should result in a security error I’ve no idea but if you come accross this problem yourself try the following and you should have a solution;

var clientObject:Object = new Object();
clientObject.onCuePoint = onCuePoint;
clientObject.onMetaData = onMetaData;

netStream = new NetStream(connection);
netStream.client = clientObject;

private function onCuePoint(e:Object):void {};
private function onMetaData(e:Object):void {};

If you get this problem yourself please leave me a comment letting me know… I couldn’t seem to find anything about this when I was looking for a solution.

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
2008
06.15

My First SOTD!

Super stoked to announce my latest project for Holler Sydney has scored SOTD on FWA! Here it is in full technicolour;

Samsung people wins FWA SOTD

Next site – hall of fame ;)

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
2008
05.14

It’s (A)live!

Finally launched the Samsung People site… have had to hold off posting until the client signed off. Checkout the transitioning background (perlin noise) and video flipping effect (image translation).

No, it’s not papervision.

Samsung People Flip

Samsung site screen

You should definitely check out this guy

Netball Man on Samsung People

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
2008
04.08

MouseEvent Bug

OK, I’ll try to word this as carefully as possible – as the bug may well be in my understanding of the Security model in flash.

I have a core as3 application that loads in external content, within the application I have some code that reads;

stage.addEventListener( MouseEvent.MOUSE_MOVE, move );

function move( e : MouseEvent ) { trace( e.target ) };

Which produces trace output wherever the mouse goes.

If I load an external SWF into the application and place it on stage – I lose the mouse move events unless the assets on stage has its mouseEnabled set to false. Fair enough you might say, but this only happens if the external assets are loaded from a different domain OR from a ‘../’ location when using the ‘file:’ protocol – if using http or loading a file locally the problem goes away.

This seems very odd, and has cost me a lot of time, is it something to do with the ‘root’ not changing if the asset isn’t the same domain? I’ve tried using Security.allowDomain in the asset file and no joy. Thoughts anyone?

Ian

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
2008
03.11

use-network and file:// sandbox errors

By now most of us are familiar with the need to specify -use-network=false when building flex apps that require local file access. One additional little feature/bug that still causes security sandbox errors is the usage of absolute paths. So, to access the file file://path/to/file/assets.swf we must first set use-network=false as a compiler option and then also modify our path so that it’s relative, e.g. ../assets.swf (relative to the swf). If like me you access your access swfs by appending relative paths to the loaderURL you’ll need to check for an indexOf(“http://”) and set the root url to “” if it’s not present.

Best of all you only see the sandbox violation in debug mode, otherwise you get a file not found IO error. Fun.

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
2008
02.27

Bitmap Mesh

I’ve been busy doing all kinds of fun stuff since starting my new role with these guys http://www.hollersydney.com.au/ – hence the lack of blog entries. I’m actually still pretty busy so this is going to be brief, below is a interactive bitmap distort – click on the corners and drag the image around. I have some outstanding issues when not dragging from a corner (dissipation of drag affect appears to be square rather than circular) but as soon as I’ve perfected it I’ll release the source.

I’d been keen for any input if anyone knows how best to calculate the lag from point to point so that the affect is circular (tried using radius from drag point but seems to cause other issues).

And before anybody asks yes the text is legible but the embed isn’t at 100%

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon
2008
01.04

A very brief note for anybody working with InteractiveScenes in Papervision. The InteractiveSceneManager creates a duplicate displayObject in which to render the ‘interactive’ elements. The InteractiveSceneManager keeps its displayObject aligned with that of the original display object provided by calling resizeStage. If, like me, you decide to move your scenes canvas (the original displayObject used for the scene) then you must call resizeStage after making your change. Furthermore InteractiveSceneManager will maintain the canvas position itself by calling resizeStage, but this is dependent on the stage resize event and hence dependent on the stages scale mode.

I wonder – has anybody had much luck disabling the culling of polygons that cross the near-plane? I’m trying to wrap the camera in a container and polygons that cross behind the camera get culled – which although correct is not what I’m after.

Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • StumbleUpon