A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: a class to store Data?

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    14

    Question a class to store Data?

    hey, i know this probably sounds ridiculous.

    I'm working on a tile based game and I want to create a class file that will hold all of my level design arrays. it seems silly to make this class extend MovieClip so i was wondering what a good class would be to have it extend. I want to call the class file up when loading a level and have it send the array to my tilesetter function in my game engine. if anyone has any suggestions i would really appreciate it. this is just an effort to avoid having an insane amount of code in anyone file for such a small game. Thanks again if anyone can help.

  2. #2
    Junior Member
    Join Date
    Apr 2011
    Posts
    15
    Why does it have to extend ANY class? Only extend a particular class if you're going to use the sub-class functionality. If you're not using any subclass functionality (which it sounds like), then don't extend any class (it'll by default extend the Object class). If you need to dispatch events (the only thing I could think of that a data storage class may need) then extend EventDispatcher.

  3. #3
    Junior Member
    Join Date
    Oct 2010
    Posts
    14

    Smile

    hmm, i had not realized i could get away with that. thank you. i hope i can get it to work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center