Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

A day in the life of our programmer, Ben, working on our hidden object game

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,345
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 10, 2009

Here I create a new Actionscript class to manage the different Flash character components. This is to enable displaying a specified character at runtime for each level. The character symbol classes come from a SWC generated by a Flash file, so we can simply create new instances of them by using their exported class name. Because we are using a SWC, however, we cannot do runtime instantiation of character classes using flash.utils.getDefinitionByName. Flex will only import classes from a SWC that are referenced at compile time, so at runtime the character class will not have been loaded. To get around this I use a character manager class which contains instances of each character, and store those instances in a dictionary that can be easily traversed. We also store the Flash symbols in a FlexSprite to give the dictionary values a consistent type. Overall, this is probably not the best solution, but it should work for now, and the limited number of unique characters there are means we dont have to worry too much about memory issues.

Category:

Gaming

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (2)

Sign In or Sign Up now to post a comment!
  • wow..thats cool

  • I love watching programming-in-progress videos like this. :D

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more