Handling user upload of big images
Working a lot these days so few posts, but I made a class for a project that some may find handy. When you let users upload pictures using the Flash Player 10 local FileReference feature, you can get all kinds of image sizes (and content!). Most modern cameras have quite a few megapixels and Flash Player 10 can easily choke on large pictures.
FP10 has problems with images that have width or height larger than 8191 pixels. This is still much better than the 2880x2880 pixels we had to work with in FP9 so that alone is a great reason to insist on FP10 for this kind of applications. There is also another limitation mentioned in the official documentation that says "the total number of pixels cannot exceed 16,777,215 pixels". I've found that this isn't a problem for this implementation, so users can easily upload 8000x8000 pixel images without causing problems. The class will take the uploaded image and scale it to whatever max size you want. If the uploaded image is smaller than the max, it'll leave the image unchanged.
Using the class is straightforward. Just make an instance and pass in what you want returned as the maximum width/height:
var bigImageHandler:BigImagehandler;
bigImageHandler = new BigImagehandler( 1500 );
and then add listeners to respond to what the user does:
bigImageHandler.addEventListener(Event.CANCEL, userFail);
bigImageHandler.addEventListener(Event.COMPLETE, userSuccess);
bigImageHandler.addEventListener(Event.CLOSE, userCancel);
Click here for example (Source code)
The project I did this for is also quite cool and I'll give a small presentation of it on the next FUGN meetup. It's a small app that'll allow you to make yourself old. Just upload an image (or use a WebCam), position facial features and you can turn on/off wrinkles, hair and more. Feel free to give it a spin! Click the image my old self to get started making your own. (Note: the app is in Norwegian, but I'm sure you'll figure it out by just clicking around)














Working on a kids game now that we'll deliver as a projector for both Mac and PC and thought I'd share a few Gotcha's I've gotten in the process. These relate to unloading movieclips, FLV playback, Events, AS3 vs designers and Shared Objects. The game is a classic kids game with an animated story that ties together some 30 mini-games.
Papervision keeps amazing me. Today I saw 
Yesterday, I did a preso for my local Adobe User Group as part of the Norwegian Flash 10 year celebration. Before the session I made a small Keynote presentation that just cycled through screenshots from FutureSplash Animator/Flash 1 to Flash 8. I'm posting it here in case others need something similar and want to save the time installing all the trial versions. I found the first four over at
My old Toshiba P20 has been great, but it weighs a full 5,5 kilos. It's also 2,5 years old and I've worn it out. The mousepad is dead and the screen has started failing so I needed a new machine. I had already decided on an
Just picked up a XP disc as well, so I'm all set to try this out...
For a current project, I needed a datagrid with partially transparent rows. No problem I thought - I'll just extend the V2 datagrid and write my own versions of the required methods. All so simple in theory, not so simple in real life. There are two things that must be made transparent, the general component background and the background of each row. I first tried overwriting the methods I thought to control this but that did not work. The one who made the datagrid never thought that anyone would ever want partially transparent gridrows. The component just does not contain any code that enables this. Another thing is that no matter what you do, you cannot re-pack or alter the datagrid assets that are used to draw the grid.
Dreamweaver MX04 has been a real drag to work with. Every time I restarted my machine, I had to start Dreamweaver, force-quit it, wait for the program to close and then restart it. It's got something to do with the Flash movie in the startup screen. Today I got a wicked error message that made me yell out loud: "No error occured"... I mean - I know the program isn't the best piece of code written by Macromedia, but honestly - why on earth tell me that no error occured???
Today is Halloween. In case you didn't dress up and visit the neighbours, here's a treat for you: a
Now you can