Thursday, April 24, 2008
Oregon Trail Still Rocks
The computer game Oregon Trail has been around since 1971 and it's still a great game. My 5th graders are having a great time buying, trading and haggling, fording rivers, providing proper burials, and dealing with all sorts of inconveniences of life during westward expansion. After each session with the game I make them add to their online journals, writing about what they learn. It's amazing how excited they get about the details of frontier life. One student said it had been a good day because no one died.
One problem with the game is that Riverdeep hasn't kept up with development of the game for Mac OS X. It won't run without a font called New York 18 and this font is native to OS 9 and doesn't exist on OS X. Fortunately the game is popular enough that people have made theirs available, so you can download and install it here. Or there's another font that worked on my daughter's computer, running 10.3.9, that I'm posting here. I hope someone plans to get this game back into development for Mac.
Friday, April 11, 2008
New Robotics Page
Saturday, April 05, 2008
I love the Super Cricket
- Buy the Super Crickets from Gleason Research. It's nice to have the USB-ir interface rather then using the default serial interface.
- Download the Logo-based software to program them, either Cricket Logo or Logo Blocks. The former is a text interface and the latter is interlocking blocks with code on them that force you into creating proper syntax. Another option, actually the one I prefer, is Jackal, which uses the same version of Logo as Cricket Logo but it color-codes your program syntax, plus it has some nice skins. The only drawback to Jackal is it doesn't allow you to upload data from the cricket like Cricket Logo does. I don't know if Logo Blocks can do that.
- If you use Cricket Logo, go down to the bottom of the first link at Gleason Research and download the Super Cricket libraries, or special files that allow the software to recognize the Super Cricket. It tells you where to put them. The software was originally designed for the smaller Handy Cricket and the (relatively) new library files haven't been integrated yet.
- For all three programs, if you get the USB-ir interface you will need a special driver from FTDI that creates a virtual COM port. You save it to a location of your choosing and tell Windows where it is when you plug in the ir transmitter. The software only knows how to interface through serial connections, so this tricks it into thinking it's using a serial connection when it's connecting through USB.
- If you are using Jackal, you will want to set the default COM port for the program by going to the default settings txt file in the Jackal program folder and changing it to COM4. At least that's the virtual port that appeared on my computer.
- For programming help with Cricket Logo (and Jackal), go to the Handy Cricket Programming Reference page. It's really clear. I'm sure there are also good websites for help with Logo Blocks programming. I haven't looked hard, though.
Flash Preloader
myLoaded = Math.round(getBytesLoaded());
myTotal = Math.round(getBytesTotal());
myPercent = myLoaded/myTotal;
myBar._width = myPercent*150;
myText = Math.round(myPercent*100)+"%";
if (myLoaded == myTotal) {
gotoAndPlay(3);
} else {
gotoAndPlay(1);
}
The only thing I changed is the command "gotoAndPlay," which in the original was "gotoAndStop." The preloader is on frames 1 and 2 and the slideshow starts on frame 3, so as soon as the loaded bytes = the total bytes (it's fully loaded) it goes to and plays frame 3. Then at the end of the slideshow I put the command gotoAndPlay(3) so it would loop the slideshow.
Wednesday, April 02, 2008
Programming buttons in Flash 8
- Mouse events, like onPress and onRelease, only work inside buttons, even if the event doesn't involve the button. If you want to script events for key presses, for example, the script has to be on an (invisible) button.
- Here's the script for a button press :
on(Release){
gotoAndPlay("Scene 2", 1);
}
- Or if you want the button to open a URL (Take out the blank if you want the same window.):
on(Release){
getURL("http://somewebsite.com", "_blank");
}
- Here's the script for a key press event:
on (release, keyPress "") {
_root.nextFrame();
this.gotoAndStop();
}
It's not that hard to find these scripts on forums but it seems like it's such a standard thing to use in a Flash animation that it should be easier to find out how to do within the Flash help itself.
Tuesday, April 01, 2008
applescript with rsync (pt 3)
The only thing you would have to change is take out the "-n" which makes it do a dry run so you know what will happen before you jump in with both feet, and change your username. And since it's checking "window 1" for the logout string you should make sure you bring terminal back to the front if you use something else so the script can find it.
applescript with rsync (pt 2)
tell application "Terminal"
activate
do script "rsync -rlpt --progress --stats ~username/ /volumes/macdrive/username" in front window
end tell
I still have a problem, though. I'd like it to logout of terminal and close the window when it's done. If I put a dialog so it doesn't close until I've clicked okay the dialog times out and the script stops running. So I have to look for a way to make the dialog wait indefinitely.