A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] Quick Question for variables

  1. #1
    Join Date
    Nov 2009

    resolved [RESOLVED] Quick Question for variables

    In my program, I'd like to have variables that contain the "stats" for a few different things in my program.

    At the moment I would use
    Actionscript Code:
    var enemy1Health = 100;
    var enemy1Speed = 5;
    var enemy2Health = 150;
    var enemy2Speed = 3;
    but that would be annoying to access through the rest of my code

    I'm not too knowledgeable of data types, so what type of variable should I use to store all the data in one variable, instead of having lots of seperate integer variables.
    Last edited by Jezzamon; 11-26-2010 at 06:42 PM. Reason: typos and grammar

  2. #2
    Senior Member
    Join Date
    Jan 2009
    objects, arrays?

  3. #3
    Join Date
    Nov 2009
    Yeah objects are probably what I want. Just checking.

    Cheers. C:

Tags for this Thread

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