Macromedia Director: Find in all scripts function




Director Message Window I often find myself using ctrl-F in Macromedia Director to look for a piece of code. It's quite useful and I use it to hop around from script to script a lot instead of finding and clicking on them in the cast window.

However, occassionally I'm searching for a needle in a haystack, and Director's Find and Find Again (ctrl-g) aren't very good for that. Especially when the needle I'm searching for is a common word that occurs a lot in comments.

I wrote this piece of code to solve that problem. It's a find command that's run from the Message Window. It will search through all the scripts in the movie looking for the word you entered, and by default it excludes comments. It outputs its results in the message window, which makes it easy to scan, and you won't lose your place in your current script. Continued

Adobe's own web problems




I find it hilarious, and perhaps a tad embarrassing, that Tom Higgins at Adobe/Macromedia had to delay the Shockwave 10th Anniversary contest results because it's "in the queue for some web team attention"

In the queue for some web team attention? This is the company that makes Dreamweaver, Cold Fusion, Contribute, GoLive, Acrobat, Flash, and Shockwave. You know, the web and print publishing specialists? They should be the last company in the universe to have a web publishing bottleneck. I've been worried about the Adobe/Macromedia merger since the day it was announced, and I hope this isn't a sign of more bad things ...

Taking Screenshots for your Blog




The blurry Google Desktop screenshotAre my eyes failing me? I was visiting Google's site after their CES announcement and looking at a lot of their different apps when I came across Google Desktop. But their screenshot was looking very blurry. Then I took a closer look. I was shocked. Even the mighty Google is capable of making rookie mistakes, and the blurriness I'm seeing is one of them. Continued

Macromedia Director: Stepframe and Me




Previously I blogged about using Stepframe instead of EnterFrame with sprites and I discussed the why and how of making it work.

After using it a bit I have an update to explain a tick to using it.

The trick is to make sure that when adding to the Actorlist, that "me" is a behavior instance. Check this out. When a behavior is started, "me" is a behavior instance:

On Beginsprite me
    put me 
end
 
result: 
-- < offspring "behaviorName" 4 307f148>


While the numbers at the end may vary, that result tells you that "me" is an instance of the behavior called "behaviorName". If you're not used to working with instance variables like this, then you should read up on them because they are pretty handy. Continued

Macromedia Director: Using Stepframe instead of EnterFrame with sprites




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.




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




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:
Continued

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




Here's a quick way to see auto-layer-selection with the Direct Selection and Path Selection tools. Continued

ReplayTV lives on




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?




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.





      
 

This site is mostly about

Video Game Design

User Interface Design

Creative & fun stuff

 

Your Host

I'm Hanford Lemoore. My parking skills are unparalleled.

I make things. From consumer electronics, to video games, to theme park attractions. Perhaps I can make things for you! Check out my portfolio.

When I'm not making things for other people, I'm usually experimenting.

 

Contact

Follow me on Twitter.

Message me on Facebook.

Email me using my contact form.

 

RSS 2.0

 

maquettegame.com

tikiroom.com

junkyardclubhouse.com

monolux.com

 

   


Copyright 2025 Hanford Lemoore | Blog | About | Portfolio | Contact
Powered by Olark