home about | services artwork blog

simple property setter

Wednesday, February 27, 2008

still working on that post mardi gras thing. actually, my tablet has become disabled, so writing is slow. but i don't make excuses.


this idea just came to me, and i don't know why it too so long but i really wish it hadn't. i'll start with this simple code snippet:

var bla = {x:200,y:100,alpha:50};

// box_mc is just a square movieclip on the stage
for(var props in bla){
box_mc[props] = bla[props];
}


I've been trying to think of ways to reconstruct my flash work-flow in AS3 in the post-AS2 world, replacing attachMovie with something similarly easy to use. I don't like to have anything on my timelines. Not code, not graphics. I want everything to be drawn from libraries within swfs. In AS3 everything is an object. A graphic in your library is a...

var gfx = new LibraryItem();

...custom object that does or does not have a corresponding class.

So i was thinking about creating a base class for my library item movieclips that extends MovieClip but that accepts properties that can be dynamically set. But how to set those properties? With a for ... in loop, duh. Something like:

var gfx = new LibraryLinkageName({x:200,y:100,alpha:50});

so much easier than

var gfx = new LibraryItem();
gfx.x = 200;
gfx.y = 100;
gfx.alpha = 50;
addChild(gfx);

I haven't decided about having objects attach and remove themselves from the display list yet, but I'm thinking probably not.

Labels: ,

posted by j. Permanent Link 0 comments

I don't even like youtube

Thursday, February 14, 2008

Allowing people to upload videos of themselves being idiots isn't a revolution. I will not go overboard.

My mental space is all cluttered lately, but I am gonna tell you all about mardi gras... maybe even later today. How about a little teaser?

Labels:

posted by j. Permanent Link 0 comments

Wiimote Head Tracking

Tuesday, February 12, 2008

This is something I'm playing around with this week -- using a wiimote with Flash via the Wiiflash API. This guy, Johnny Lee, is doing some interesting stuff with wiimotes, but this is the coolest yet. What an awesome way to engage users.

posted by j. Permanent Link 0 comments