Actionscript 3.0 Abolishes the Singleton!

In my quick exploration of AS 3.0, I have found a somewhat interesting issue: you cannot set a constructor’s accessibility to anything other than ‘public’ in Actionscript 3.0. It seems.
(I qualify that with ‘It Seems’ because, while I did get an error stating exactly that, I didn’t delve into it too deeply because I didn’t have time. Anyone in the MM world want to confirm or deny this? I will, of course, look into it further as soon as I get the chance…)

Truth be told, this doesn’t only affect Singletons. Arguably, you could still build Singletons, but it’d just be a PITA and be totally unenforceable by the compiler, but that’s beside the point. What this means is that any class that consists of only static methods will still have a public constructor, and people might be fooled into thinking they can (and should) use an instance, instead of calling the static methods…well…statically.

Really, this just kills my whole Actionscript almost-but-not-quite ‘enum’ concept
(Well, ok, it’s not ‘my’ concept…it’s Steve McConnell’s…but you knew that already, because you read that post already, right?)

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

Fun With AS 3.0 and Images

Tinic Uro has been posting some great stuff regarding encoding images from within Flash to ship out (or use within Flash)…he’s posted both a PNG and a JPG encoder. Very, very wild.

It’s so cool, in fact, that Anonymous has figured out just how far you can really take it:

A thought, if we can access the byteArray of an object before it is uploaded to the server then then any number of things can be done from virus checking to pornographic image detection and prevent malicious users from uploading anything dodgy so that it is never transefered to the server at all

I don’t know about you, but…man…that would be wild. If nothing else, it could save all those people trolling through Flickr and Google Images tonnes of time getting to what they really want…

Jon, you think can you do that with your Ajax? Phaw. It’d make a wicked WordPress plugin, though…

Read more @ kaourantin.net

(Have I mentioned that I have some cool Flex 2/AS 3.0 stuff coming down the pipes? No? Really…I could’ve sworn I’d mentioned it…)

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

Actionscript 2.0: Base64 Encoder

I’ve gotten a bit of a chance to play around with the Flex 2 Alpha, and I have to say - I’m pretty impressed. I like what Macromedia has done with it, and I’m sure it will get better as it gets closer to RTM. I’m cooking up something that will hopefully be pretty cool…probably just saying that has relegated it to NTBC status, but I’ve got my fingers crossed.

In the meanwhile, here’s something I’ve had kicking around for a bit: an AS 2.0 Base 64 Encoder. It’s ported more or less directly from Stephen Ostermiller’s Javascript Base 64 Encoder. I was using it to play around with Http Authentication in Flash, which requires username/passwords to be sent Base 64 encoded. The main port was pulling it from being a bunch of global functions into a class, encoding and decoding through Static methods.

Download below the fold…
(more…)

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

Bush Fights the Superflu

Doesn’t it make you happy all warm and fuzzy inside to know that there are people out there looking out for your health?

Especially when they look like this?

Already the government is buying $162.5 million worth of vaccine against that bird flu strain, called H5N1, from two companies — Sanofi-Aventis and Chiron Corp. — in case that happens. It also is ordering millions of doses of Tamiflu and Relenza, two antiflu drugs believed to offer some protection against the bird flu, stockpiles that the pandemic plan is expected to order be augmented.

And that’s your irregular dose of not-quite-but-almost-completely-non daily world issue updates from me.

[Note: this is somewhat tongue in cheek, but I am in no way, shape or form trying to take away from the importance and impact of this issue. But that picture was too much for me pass up…]

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

ASP.NET Image Resize Handler

Ever wish you could resize or change the format of an image on the fly? Maybe to get a gif or png into your Flash movie (pre-Flash Player 8, of course), or to save the hassle of creating thumbnails for every hi-res image that you put on your site?

Not that you couldn’t before, but now you have another tool to do the job: Enter the Image Resize And Other Good Stuff HttpHandler. Implemented as a .NET Http Handler and written in C#, this tool makes it a breeze to do all of the above.
(more…)

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati

XML Is Gonna Cost You

Really. This is just ridiculous. Some dumb company is claiming that it’s patent on transferring “data in neutral forms” is infringed upon by XML.

My favourite quote:

“You can wish them good luck if you want, but there is a lot of history this patent will have to deal with, and the fat lady has not finished singing on this one yet.”

This software patent fiasco is getting way out of control…

Read the article @ news.com.

Share me: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati