Archive for February, 2006

New iBoom goes boom

I’ll be honest, of all the new things Apple has announced since the first iMac, this session today had to be the worst. The boombox is straight out of the late 70’s, and the new Mac Mini still isn’t designed to do any decent video. A year and three months ago Steve Jobs said this was the year of HD, and I have yet to see that come to light. At least set up the Mac Mini so it can run cable tv through it to the TV.

Is Apple turning down again? Hard to say. I know that I’ll be buying a 20inch iMac in the very near future as a new home computer. My old dual G4 is getting long in the tooth.

4 comments February 28th, 2006

Screen Capture

Years ago when I was working on a CD I needed a way to grab a copy of the screen and get it in to the cast so the user could do something with it. That was pre-OSX and I used to use the ScrnXtra with Director 5 and 6. Many moons ago.

I saw a posting in the Macromedia forums and I started wondering about ways to do a screen grab. I remembered the Shell Xtra by Valentin Schmidt. This might be one of the most powerful Xtras out there, although since I do pure Shockwave for education sort of work I have always avoided Xtras.

I downloaded the Xtra, did a quick google search for ‘capture clipboard shell osx’ and the first link gave me the answer. With the demo file provided by Valentin I just entered the phrase

screencapture -c -m

The clipboard could then be put in a cast member for further processing. If you wanted to create files you could use other commands to do a screencapture straight to a file.

Pretty nifty.

1 comment February 27th, 2006

WordPress and the DCR file type

While working on the best way to put up sample dcr files for viewing on this site I tried to upload a dcr but I was rejected by WordPress. In pre 2.0 versions of WP uploads were handled on an upload page where you had the option to add new file types. This option has been removed (as far as I could tell) in WP2.

To get around this so you can easily upload dcr files you just have to open the wordpress/wp-admin/admin-functions.php file and add the dcr file type to the allowed types for uploading.

If you open that file, search for the line containing the swf file type (near the bottom), and add the dcr type below it, so it looks like this.

'swf' => 'application/x-shockwave-flash',
'dcr' => 'application/x-director',

I tested it once, so it must be OK…right? Now I’m playing with a popup window solution for displaying these, a ‘menu’ system of some sort, or just a direct link to the dcr. Since the last sounds easiest, I have a feeling I’ll go with that one. Simplicity…often the best answer.

4 comments February 26th, 2006

Director podcasts

For those that enjoy listening to a podcast on occasion, and do a bit of work with Director (why else would you be here?), you can drop by and listen to a Magicgate Software Macromedia Director Podcast.

I’m so old school I’ve never actually listened to a podcast yet, but maybe I’ll give one of these a try tomorrow.

Add comment February 23rd, 2006

Basic countdown bar

I have barely touched the game world, but one common thing that shows up in many games is a bar that ticks down your last moments of time. A question for a countdown timer is often brought up in forums, and there are many examples of timers kicking around everywhere from the built in behaviors to other samples on the web.

Here is a really quick one that just reduces the size of a QD (quick draw) rectangle. It used the _system.milliseconds for checking time on the exitFrame of a behavior applied to the QD rect sprite.

Source code for countdown time

2 comments February 22nd, 2006

Coming soon: Flash 8 in Shockwave/Director

From Tom Higgins blog:

The new Flash 8 Asset Xtra will allow developers to incorporate Flash 8 authored SWF files into their Director projects in order to tap into the new Flash player features like the improved Flash video codec and the imaging filter effects. This new Flash 8 Asset Xtra will also expose a new function/sprite method named “convert”, that function converts between Lingo image objects and Flash bitmapdata objects as well as between Lingo linear lists and Flash array values. There are plans to expand the convert() method/funtion over time but for now it’s focused on only a few data types.

Good thing I’m starting to learn a bit of Flash, since it does have a few nifty things that Director doesn’t. Together they make a great tool.

Read the full post for more information.

Add comment February 20th, 2006

Walk to bone, but don’t forget food

On the Adobe Director Forums someone posed a question about how to get started with a “virtual pet.” There are different ways to think about such things. As a physics guy I like to think about pets that obey rules of physics. In this example I set up a pet (let’s just say it is a dog) that will wander around on the screen. If you throw a bone (by clicking on the stage) it will head for that bone, but on occasion it will see something else of interest and forget about the bone. It slowly gets hungry, and if you don’t coerce it in to getting to the food bowl bad things will happen.

The behavior has a nifty “chase” algorithm in it. I’ll probably do more with this file in the future to expand upon my pet.

Can you call that a virtual pet?

The code uses a few DirMX 2004 specific features (named sprites), but could quickly be adjusted to run in older versions (these issues are commented in the code). The graphics in this one are rather primitive to say the least.

Walk to the bone source code.

1 comment February 19th, 2006

Changing text color on mouseEnter

When people first begin learning Lingo it is very common to do things such as sprite(21).visible = 0 or member(155).color = color(200,0,0). However, it is always advantageous to create behaviors that don’t make use of “hard coded” numbers so that the behavior can be reused in the future without having to adjust the sprite or member numbers or names.

When I first started playing with Lingo my code was full of these hard coded things. Now when I look back at stuff from a decade ago it kills me. Of course, when under pressure I’ll slip in a few of those things at the very end of a project. I always wish I could avoid it, but time pressures often cause the brain to ignore reason.

On the Adobe Director Forum a question was raised about changing the color of text on a mouseEnter event without having to recode each behavior for different member numbers. A very simple way to do this is to write a behavior that allows you to choose the color you want as you drop the behavior on each text member that you apply the behavior to.

Sample file: text_color_rollover.zip

Once you have written a good behavior, you end up using it for many years and many projects.

2 comments February 17th, 2006

Good sources for Director info?

What are your favorite source for info about Director? Where do you go when you need an answer on a tough Lingo question? Where do you go if you are just starting out with Director?

Tom Higgins posed the question on his blog, so get over there and let him know what you think.

Add comment February 17th, 2006

Lingoworkshop has been busy!

Two great articles in the past 24 hours over at the Lingoworkshop. Be sure to read up on Xtras and Standard Practices.

The standard practices article is pretty good. I do a few things a bit differently (future posts!) but nothing major. One things I seem to do far less than others when doing the actual coding is globals. When working on my own stuff I haven’t used a global since behaviors were introduced in Director 6, but I’ll get in to my reasoning on that one day.

I got in to a good discussion the other day about using duplicate(). I realized I don’t think I’ve ever used it, and we debated exactly when/where/how it should get used. I’m still looking forward to using it someday! (and yes…I do use lists all the time)

Other than a Fortran class I had that used punch cards (one of the last U’s here in America that used them) I’ve never had a programming class, so maybe I’m a bit out there. Oh well, Director keeps paying the bills, so I won’t complain.

Add comment February 16th, 2006

Previous Posts


Director Sites

Calendar

February 2006
M T W T F S S
    Mar »
 12345
6789101112
13141516171819
20212223242526
2728  

Archives

Recent Posts

Recent Comments