New topics: Your Pet, IOU, Baby IQ, The Poisons, Birther II, Games, Future Power

Welcome to the Tech Space!

Do you like Books?

Skip to end of metadata
Go to start of metadata

During the Adobe FlashCamp October 2008

The demo "Learn how to take ordinary display objects into the third dimension" for the three dimensional objects used something called "caurina.transitions.Tweener" which I had to find and download. The demo video shows code that should be put into an "ActionScript project".

I decided I wanted to turn the ActionScript project into more of a game. As you click the boxes shown, the zoom up. Eventually, with enough clicks, you can get to the "bottom" of the z-stack of rectangles. The tweener causes them to move nicely as you transition from one to another. This was a very simple demo, I figured I could hack on it for a while to turn it into something more, more like a game.

Here are some of the things I wanted to do to it:

  • First thing is I wanted to count the number of hops it takes to reach the bottom of the objects. I've added a "score panel" to show a title and how many hops, but I never could figure out how to make it in it's own area not occluded by the boxes that get repositioned as they are clicked on.
    • Eventually I wanted to give the score it's own area on the screen, but I didn't figure it out. I looked for things like VBox, and such, that I was familiar with from Flex projects. I did things like try to set the size of the sprite for the score panel, that I was placing TextFields on, but the score panel would sometimes disappear.
  • I also added some text on each of the rectangles, with the count of the box number. So the box with "100", the goal, is very small and illegible from the top of the stack.
  • Click on the area behind the boxes, and you go back to the start!

I finally figured out the problem when I tried to popup an Alert box when the user gets to the bottom. The mx.controls.Alert wasn't available. Finally, I found the clue in the Flex 3 Cookbook which has one solution on creating an ActionScript project in Flex Builder. ActionScript projects don't access the Flex Framework, they only use the core routines.

OK, so I've probably gone about as far as I want with ActionScript. I want to get back into the environment I've become comfortable, which means getting back to Flex. So my next step is to figure out how to get this code to live within a Flex app. It might be nice to learn more about why someone would prefer to make a native ActionScript project, one of the people here mentioned he works mostly in ActionScript.

Here is my version 0.01 of the game: Source

Here is my next version: Race To The Bottom Flash Game

Labels:
adobe adobe Delete
source-code source-code Delete
flash flash Delete
programming programming Delete
swf swf Delete
flashcamp flashcamp Delete
actionscript actionscript Delete
games games Delete
game game Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.