Archive for December, 2005

Macromedia Director: Using Stepframe instead of EnterFrame with sprites

Tuesday, December 27th, 2005
I often use state machines inside of ExitFrame events in sprites. For example, I might have an ExitFrame event or EnterFrame event in a sprite to handle the occasional fade in and fade out:
On ExitFrame Me
  case mode of
    #off:-- Do nothing
    #fadein:
      -- Do my fade in code
      blend = blend + 10
      -- Etc. Etc.
    #fadeout:
      -- Do my fade out code
      blend = blend - 10
      -- Etc. Etc.
 end case
end

In the state machine above, the states switch based on the value of “mode”. It can be #off, #fadein, or #fadeout. And I’d use an Exitframe script like that to have a sprite fade in, then sit there silently until it’s told to fade out. So 99% of the sprite’s life is spent with mode = #off and therefore not doing anything. But Exitframe is still being triggered every frame. There’s a little bit of overhead in this. Multiply it by 100s of sprites and it results some significant slowdown.

But I wanted better results. I didn’t like the thought of sprites having their ExitFrame event called every single frame when 99% of the time they were’nt doing anything. What I wanted was a way to turn ExitFrame on and off.

And so I decided to try the StepFrame event. I had been using StepFrame for years in parent scripts, but never in sprite scripts. The great thing about StepFrame is it can be turned on and off at will.

To trigger Stepframe events in an object, do this:

add the actorlist, me

and to stop the triggering of stepframe events in an object, do this:

deleteone the actorlist,me

The default mode for a sprite like this would be to not have Stepframe events, and to only turn on StepFrame events when they’re needed. For example, let’s say we wanted to have the sprite fade out. We could use Stepframe in the following way:

property mode

on FadeOut me
    if mode <> #fade then
        add the actorlist, me
    end if
    mode = #fadeout
end

on StepFrame me
    case mode of
        #fadeout:
        currentBlend = sprite(me.spritenum).blendlevel
        sprite(me.spritenum).blendlevel = max(0,currentBlend - 10)
        if sprite(me.spritenum).blendlevel = 0 then
            deleteone the actorlist, me
            mode = #off
        end if
    end case
end

The FadeOut function adds the current object (me) to the Actorlist. This will cause the sprite to start receiving StepFrame events. It also sets a Mode variable to be “fadein”. This keeps the object from being added to the Actorlist twice.

The Stepframe code itself includes a case statement to check the mode. It’s not needed in the example above since there’s only one mode, but it would be used if I were to add a “fadeIn” state as well. The Stepframe code also reduces the sprite’s blendlevel value by 10 every frame, until it reaches zero. When it does, it deletes itself from the actorlist and turns the mode to #off. Once it’s deleted from the Actorlist, it will stop getting Stepframe events.

I’ve been using it in sprites as a replacement for EnterFrame and so far it’s been working great. I am sure it has it’s own set of issues. There is a bit of upkeep in keeping close track of the state to make sure the object doesn’t get added to the actorlist multiple times. And it’s also important to have a sprite remove itself from the actorlist in an EndSprite event.

Like I wrote earlier, I’ve been using StepFrame for a while now but I’m new to using it within a sprite itself, so I don’t know all the pros and cons yet. As I discover more, I’ll post here.

Update: Make sure you see my next post, which follows up on the caveats of dealing with Stepframe in sprites.

Yahoo Mail has a communication problem.

Wednesday, December 21st, 2005

I’ve blogged about this before but it continues to get sillier and sillier. Want to keep track of What’s New With Yahoo Mail?! There’s now three different ways to get only part of the full picture:

  • Use Yahoo Mail’s What’s New Page link at the top of the Mail Page (which I will call the “What’s New Page” from now on). If you subscribe to Yahoo Mail Plus you’ll get a different page that looks broken to me.
  • Look at the “What’s New” section of Yahoo Help (which I will call “What’s New Help” from now on). Hey, it’s got info about Avatars!
  • Subscribe to the Yahoo Mail Beta Update Blog (which I will call the “Mail Blog” from now on) where you’ll get another set of info.
The problem with this is, of course, that none of these three-and-a-half sources provide all the info. The What’s New Page informs us of a Beta, Mobile Phone Alerts, and some sort of award they won. The What’s New Help section informs us of the new Avatar, the PhotoMail beta, and a change to saving copies of messages. And the Mail Blog informs us of the Blog itself and the new “dot” yahoo email addresses feature. There appears to be no crossover.

So, now I’ve got three places I need to look in order to find out what’s new with Yahoo Mail, and that’s still not full coverage. The Mail Blog is a bit confusing. I think it’s fine to have beta news in a different place because not everyone has the Beta. But parts of the blog claim “beta” while other parts claim “everything”. In fact it’s missing info on new beta features (RSS reading) and including info for non-beta-exclusive features (the “dot” email addresses). Which is it, Yahoo?

All of this gives me the impression that the Yahoo Mail group has a communication problem. They need to cut the marketing hype out of their What’s New Pages (Come on Yahoo, your PC Magazine award is not exactly “What’s New” material), they need to be inclusive of all that’s new (none of the News pages mentioned the addition of RSS which apparently was announced on the 29th of Nov. ) and they need to pick one place for all the news to go.

Come on Yahoo! I’m rooting for you!

Photoshop UI: Vector tool Auto-Layer-Select problems

Sunday, December 18th, 2005

I love Photoshop. I use it almost every day, and I’ve been using it since at least 1994. It really is a great program. And I fully realize it’s a program for professionals, which means a lot of it is optimized for efficient workflows for professionals, as opposed to being optimized for a shallow learning curve for new users.

But for the last few versions of Photoshop I’ve been driven crazy by what appears to be an oversight by the Photoshop developers in how their vector art tools work. The problem is not entirely apparent until it’s been seen in a real situation, so let’s walk through one.

The problem

Here’s a clipping of the image for my blog and homepage. The entire image was done in Photoshop, and a lot of it is done with Photoshop’s Vector tools. I’ve simplified the document to isolate just a few elements, in order to make things easier to explain. Here you can see we’ve got three vector art layers:

The problem I’m running into is with Photoshop’s two vector selection tools, the Path Selection Tool and the Direct Selection Tool. These two tools are used for manipulating control points on vector shapes, and they have an auto-layer-select function built into them that is flawed. Let’s say I’m trying to select and manipulate the points in the upper-left serif in the H logotype. I can use the Direct Selection Tool to do so, and if I click inside of the H or directly on the points, I’m okay:

But if I accidentally click outside of the H and on one of the purple hexagons, Photoshop automatically selects the hexagon layer:

Read the rest of this entry

Quickly re-create Auto-Layer-Select conditions in Photoshop

Sunday, December 18th, 2005

Here’s a quick way to see auto-layer-selection with the Direct Selection and Path Selection tools. Read the rest of this entry

ReplayTV lives on

Sunday, December 18th, 2005

As the Product Designer of the original ReplayTV DVR, I am happy to see that ReplayTV continues to live on, or at least it’s name, with an announcement about new DVR software for PCs.

I am anxious to see if the software looks or feels anything like the ReplayTV standlone DVR does. I am hoping for the best, but I wouldn’t be suprised if this new software is just another piece of DVR software with the ReplayTV brand name slapped on it.

Yahoo Mail Beta: Easter egg? Time-killer? Spam generator?

Saturday, December 17th, 2005

I discovered that clicking the “subject” button in the compose tab of the new Yahoo Mail Beta will give you a random, silly subject line that reads like spam. Good work Yahoo.

Yahoo Mail Avatars: The final chapter

Friday, December 16th, 2005

I’ve been ranting for the last few weeks about the functionless and Yahoo Avatar and how to remove it.

Perhaps it’s dumb luck, or perhaps someone at Yahoo Mail has been reading my rants and decided to throw me a bone, because two days ago my Yahoo Mail Plus account got upgraded to the new Yahoo Mail Beta. I’ve been a huge fan of Oddpost and I’ve been waiting for this for a while.

And guess what? There’s no Yahoo Avatar in the new user interface. In fact, there’s not even a place for it since the old mail “home page” is gone, with the new UI defaulting to the Inbox view. This is good news. Of course, it doesn’t mean that the Yahoo Avatar won’t debut in the new UI at some point, but the professional feel of the Yahoo Mail beta makes me hopeful.

I’m not going to bother with a full review of Yahoo Mail Beta since it’s been convered by many other blogs. There are choices they made that I don’t agree with (that I’m going to blog about later) but my first impression is that it is extremely cool. Good job Yahoo, for both the great new UI and for not having the Avatar. I can now sleep again.

The Multi-line Map Tool on Tour

Tuesday, December 13th, 2005

I was recently invited to one of Silicon Valley’s big search/map companies to do a UI presentation, where I demonstrated the simplicity of my multi-line map tool UI solution.

The multi-line mapper is so trivial design-wise that at first glance it appears as though it shouldn’t even be considered UI design, much less highlighted in a User Interface presentation. However, that’s the beauty of it, and the beauty of user interface design in general; that something like this eluded all the major map sites since they’ve existed, and the key to solving it was simply reconizing the problem existed.

Hopefully we’ll see multi-line input implemented in at least one of the big map sites before too long, but only time will tell. And if you work for a map site and you didn’t see my presentation recently, I am still available.

Bad User Interface: A frustrating first experience with Google Picasa

Sunday, December 11th, 2005

Picasa LogoMy good friend Chad Spacey has told me a lot about Picasa. It’s a photo thumbnail/organizer from Google. Kind of like Adobe Bridge, Adobe Photoshop Album, and my personal favorite ThumbsPlus.

But Picasa is from Google. And it’s free. And it looks like it has some cool features. And I trust my friend Chad’s opinion (he has great ideas). So I decided to give it a try. Once I got it working it seemed pretty cool (although I still prefer ThumbsPlus) but getting it working was another story. Read the rest of this entry

Third time’s a charm: Yahoo Answers

Thursday, December 8th, 2005

There’s been some buzz today about the new Yahoo Answers. It’s a site where users can ask questions, and other users can answer them. Yahoo used to have a section called Yahoo Experts which was virtually the same thing IIRC. It’s been gone for a quite a while, but it appears as though the Help for Yahoo Experts is still around (I may use that help link to compare the old Experts site to Answers). Yahoo replaced Experts with Yahoo Advice which also dried up a long time ago. I wonder what Yahoo has done differently with Answers to ensure it doesn’t end up disappearing like Experts and Advice. Better get this one right Yahoo, you’re running out of name.

On a related note: Does Yahoo’s Help Section need an overhaul, or what?! Still having help for a service that disappeared in 2002 isn’t a good sign, Yahoo. I’ve been finding Bad User Experiences left and right with Yahoo’s Help these days. Just see my previous blogs on Yahoo Mail for more. I’m don’t want to write about Bad UI all the time, honestly …