When I purchased “Basics of Actionscript 3.0 For Animation” I assumed that I knew enough actionscript to retrofit it for Flash 8, and that once I got Flash 9 I could benefit from the newer stuff in the book.
I may have made a mistake.
There is a free compiler available from Adobe so that you don’t have to actually have Flash 9 to write for it. I hacked out the bounce example from the book and compiled it. It worked great.
So I took it and tried to apply it to my code for my metroid/marble game (I had to change it a lot because I was using solid hit-testing instead of distance measurements, see yesterday’s post on triangles). It didn’t work. The ball just bounces as if it is hitting flat ground. After spending more time on this than I care to admit, I decided to just start from scratch.
It takes me about 45 minutes to retrofit the flash 9 code to flash 8 code (ActionScript 3.0 to ActionScript 2.0) but I got it done. It was almost line for line the exact example from the book. The same one that worked flawlessly when I typed it up and used the Flash 9 compiler. So I’m ready to go, it’s got to work, right? Wrong. It just bounces straight up as if it were hitting a flat surface instead of an angle.
How can this be? I have no idea, but my lunch break is up, and that’s all I can do for the day. If some flash guru happens to stumble upon this and knows what’s going on, feel free to let me know. Thanks.









