Articles Archive
Articles Search
Director Wiki

Stupid Director Tricks

June 9, 1997
by Zac Belado

Dumb Things performed by Director professionals.


command-d (duplicate) You know, the one beside command-f (find) and command-z (undo) and command-a (select all) and command-x (cut) and command-s (save) ... jeez, I can't begin to tell you how many hours I've burned trying to figure out why the changes in my scripts were not working. If only some kind soul at Macromedia would give me a command-shift-d to protect myself from ...

<Cary Newfeldt>


Copying a snippet of code from one handler to another, some if/else/end if, only I copied an extra end if. Director barked all right but then pointed me to the last end if in that handler, not the one I inserted wrongly. Now comes the fatal error: I out-commented the one director pointed me to. Finetuned a bit here, a bit there, saved, started: and the whole thing had gone absolutely berzerk.

<Daniel Plaenitz>


because of the continuation character ( ¬ ), the third line will never get executed, as it is a continuation of a commented-out line. And since it's a single line if-statement (without a "then"), indentation of all the following scripts is fine. Wasted a few hours on this one.

-- if the castnum of sprite spriteIndex <> 0 and ¬
-- the castnum of sprite spriteIndex <> firstSprite then ¬
if the castnum of sprite spriteIndex <> 0 then set firstSprite = lastSprite

<Edwin Veltman>


Deleting castmembers or score scripts from the cast without deleting them from the score first. Its fun to maintain a totally ungainly score only to find that many of the sprites aren't really used.

Um, errr...not that I ever did this before....

<Peter Glover>


Here's one for the books. I wrote an animation object that took over a sprite channel (in d4) played an animation (switched cast members in and out) then returned the channel to the score.

I put a dummy placeholder sprite (d4 demands such things) off stage in the correct channel, which was put back after completion.

I then put the script to create tha anim in the framescript channel and spent half a week wondering why my anim wouldn't work in D4 but was fine in D5.

The script was one frame before the placeholders! Duhhhhhhhh

< Steve Powell>


'make sure to update the fileName reference in the stage movie when versioning a MIAW .dir, else ya don't see the lingo changes to the MIAW . . .' I was trying to do some things with 'on deactivateWindow' and window focus stuff, trying to assess differences in author vs projector mode etc. and couldn't understand why my revised handlers weren't getting called. . . doh!

<Roy Pardi>


I was writing the code for a shockwave game and was wondering why my object kept on "forgetting" its own reference. It knew it before it went into a method but promptly forgot it when it was in the method.

It took me three days to figure out that I was forgetting the "me" keyword in the call to the method.



A few months ago, I updated our D5 project to use FileIOXtra, instead of FileIO Xobject (DLL). What I didn't realize was that Macromedia had enabled FileIOXtra to use the searchPath.

I needed FileIOXtra to write a file to the hard disk, and as part of the usual proceedure, I had FileIOXtra try to open the file to see if the old file existed so I could delete it. I spent the better part of a week watching the process fail at the deletion step for no apparent reason. Finally, I manually deleted the file from the hard disk, and stepped through the process by hand, gasping in amazement as FileIOXtra successfully opened a file that COULD NOT EXIST!

FileIOXtra had followed the searchPath to find the default file on the CD-ROM, and needless to say, couldn't delete that one...

The worst part: Got caught for another 3 days on the same issue when writing a new file on another project 3 months later - you can't WRITE to the CD-ROM either! D'Oh!

<David Cain>


When creating a parent script, I included the new method and didn't make the script parent but left it as movie.

In another script I used the new command to create a bitmap.

When I entered the command to execute the handler, the debugger popped up and hit a break point in the new method of the parent script that I mistakenly made movie script. Needless to say I was confused for more than a few miuntes figgering that one out.

That and putting a space after a line cont character in a 9000 item nested list and trying to find out why it didn't compile were to of my best moments.

<Alex Zavatone>


So I thought I'd be slick and get in on this "extensible" band wagon, and reuse some great method from an object I'd written in a project a few months ago. Hell yeah: save tons of time! Open that file, go to the carefuly organized parent script section of the cast, copy that pup andI'm off.

So it's in, score's set up, and off goes the call to my repurposed handler which is now resting happliy in a movie script.

Nothin'. No error, no nothing. Check spellings, set break points, etc., etc., etc.

Damn it took a while to figure out that "me" perameter just didn't need to be there since the handler wasn't in an object any more...


Got a Stupid Director Trick? Send it to Zac

Zac Belado is a programmer, web developer and rehabilitated ex-designer based in Vancouver, British Columbia. He currently works as an Application Developer for a Vancouver software company. His primary focus is web applications built using ColdFusion. He has been involved in multimedia and web-based development, producing work for clients such as Levi Straus, Motorola and Adobe Systems. As well, he has written for the Macromedia Users Journal and been a featured speaker at the Macromedia Users Convention.

Copyright 1997-2019, Director Online. Article content copyright by respective authors.