While creating a title screen does not seem that vital, I am using the convention that I have used for some of my other Flex projects and have the screens contained in their own sprite or movieclip class. As I want some type of information presented to the player as to the fact that this is not the final version but is an early prototype, for this first build I am going to have the dice test on the title screen. This will simply be a die with a button that lets me roll it.
One important thing that is very poorly document in the Flex documentation is the special tag for setting the dimensions, frame rate and background color of the applet that is being created. The tag is as follows:
[SWF(width="640", height="480", backgroundColor="#000000")]
Putting the title screen together was not much of a problem, so I thought I would be finished this task well before lunch and probably finish this project early this afternoon. Then I started working on the hearts die. I started off creating the dice movie clip in Flash. My thoughts were to simply have the 6 frames of the die roll as part of a SWF file that would be embedded into the program. The problem then came up when I wrote the HeartsDie class which embeds the .swf file. While the class compiled and ran just fine, the gotoAndStop statements didn't seem to work so the movie clip would continually loop through the values. After spending a couple of hours trying to figure out how to solve this problem, I could not come up with a solution. I will continue to look into this issue, but figured that I had already wasted too much time so went with my alternative solution.
The alternative solution was to simply export the movie clip into a series of JPEG images and load each of the images into the HeartsDie class showing only the image that corresponds to the current roll value of the die. It is a bit of a kludge but it does work and I was able to finally get the pre-alpha version of the program finished. It is now late so I am going to have a late lunch and do a bit of exercise before I start on the Alpha version.
Making Hearts Page 3
Copyright © 2008 Blazing Games Inc. All Rights Reserved