Welcome to Mediasparkles

News : Flash

Undefined vs. undeclared

Undefined and undeclared variables are two different things. This is probably obvious to some, but in ActionScript, it isn't always so obvious. An undefined variable is a variable that has a value of undefined. An undeclared variable has never been set to a value or established with var. In ActionScript right now, undefined and undeclared variables have pretty much the same effect.

var a;
if (a == undefined) {
trace("a is undefined");
}


is the same as

a = undefined;
if (a == undefined) {
trace("a is undefined");
}


and also the same as

if (a == undefined) {
trace("a is undefined");
}
.

The if statement evaluates to true, i.e. the value of a is undefined, in all three cases. In reality though, a is undefined only in the first and second examples while it is undeclared in the last one. In some other languages, the last example is not legal. It will result in a compiler error because we are trying to get the value of the variable before it is declared. Descpite the relative leniency of ActionScript, this is a good thing to keep in mind. Sometimes, when we think we are dealing with undefined variables, they are really undeclared.

 posted by Vera (9/23/2004 09:21:00 PM);




Flash apps not web apps?

While doing research on Flickr, I came across a very interesting post titled Organizr is Nice, But Not a Web App. The post is already a month old (which makes it at least a year and a half in internet years, right?), but I wanted to comment on it anyway because it doesn't seem to have been mentioned very much in the Flash community. JD commented on it briefly, but I think that's it.

Organizr is a Flash app that utilizes the Flickr ActionScript APIs. You can use it to organize your photos into sets/albums and rearrange their order via drag and drop. Here is a screenshot for those of you without Flickr accounts:

Organizr screenshot

Olivier argues that Organizr is not a web app. Here is the quote I find most interesting:

[...] please stop calling it and others like it web applications (I'm not saying its creators do, but others introduce that confusion, starting with Macromedia). This is a Flash application that doesn't expose its state to its host browser (to the best of my knowledge, by definition).

And here is the second most interesting statement:

[...] Organizr behaves like a desktop app, that's basically what it is, because what is Flash but a desktop runtime that happens to be integrated with most browsers?

I had never considered the Flash Player a desktop runtime, especially not now that we have Central, the desktop version of the Flash Player.

Olivier distinguishes between the internet and the web; he seems to think that it's always okay to call Flash apps internet apps, but not web apps. If this is true, we're okay for the most part because we do tend to call them rich internet apps much more often than web apps (see RIAs).

However, after several people left comments on the post disagreeing and arguing that Organizr should indeed be considered a web app, Olivier concedes:

update: read the comments, Organizr is actually a web app once you put it in the broader Flickr context.

So there. Quod erat demonstrandum.

 posted by Vera (9/17/2004 06:47:00 PM);




Flickr ActionScript APIs

You probably know that Flickr is a relatively new photo sharing, photo blogging and social networking tool. You probably also know that a lot of its interface was done in Flash. (If you didn't know these two things, where have you been? Just kidding.) The photos are loaded and displayed in Flash, and fast too! The coolest feature, I think, is that you can then add notes to your own or other people's photos. While looking at a picture, just click the Add Note button and you'll get a draggable and sizable rectangle to mark the section of the photo you are commenting on and a text field to add your note. Very well-suited use of Flash.

But did you know that Flickr also provides web services? You can sign up for a developer account similar to those offered by Google and Amazon. I was pleased to see that the ActionScript kit is listed right there alongside the PERL, .NET and Python kits. That speaks volumes about the growing respectability of ActionScript as a programming language. Go ActionScript! The REST interfaces (for REST-based web services) are written in AS1 but the rest is in AS2 (no pun intended). I can't wait to start playing with these APIs.

And now for the most exciting in Flickr Flash news. While looking around to see what people were saying about all of this, I noticed a comment that Mike Lyda had left on somebody's post about Flickr:

have you checked into the AOL IM deal that Macromedia made to bring the AIM API into Central applications?

Context is everything and when I read that in the context of Flickr, I almost passed out. An AIM-powered Central app that accesses the Flickr services! Photo sharing, organizing, commenting, CHATTING, all in Central. When browsing someobody's photos, you could try to see if they are online and then start chatting with them, all in the same app. The Flickr profile page already asks for your AIM screen name; now the flickr.people.getInfo API method just has to be modified to return a user's IM information. I don't think it currently does. This has got to be too good to be true. Thanks for the inspiration, Mike.

 posted by Vera (9/17/2004 07:43:00 AM);




Central in the desert

I know it's been a really long time since I have written anything on here. The reason is that my personal life has taken over most of my spare time over the last few months, and I haven't done anything to stop it.

Last week I went on a really amazing trip. I went to Burning Man for the first time. For those of you who don't know, Burning Man is an annual week-long festival held on a flat dry lake bed in the desert of Nevada. A city of population 30,000+ is built for the week and then torn down again to leave no trace. In this city you will find lots of art, lots of outlandish costumes, lots of loud music, lots of bikes, and lots of dust. Aside from that, it's entirely what you make of it.

What does this have to do with Flash or Macromedia? Well. Take a look at what the city looks like from above.

Black Rock City, NV

It looks just like the Central logo, doesn't it? Thanks to Christian Cantrell for pointing this out to me.

 posted by Vera (9/10/2004 07:53:00 AM);