1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Flash ActionScript - Variable Names

Discussion in 'Programming' started by BraveStarr, Nov 21, 2005.

  1. #1
    FLASH ACTIONSCRIPT

    Is it possible to define a class with dynamic variable names?

    i.e. I have read in an XML sheet with x number of fields.

    Can I make a for loop in the class that creates x number of variables named variable_'x' (variable_1, variable_2,...)?

    Or is there a better way or no way?
     
    BraveStarr, Nov 21, 2005 IP
  2. cyclinder

    cyclinder Peon

    Messages:
    29
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    class could not have the variable names itself
    but every actionscript object can have of couse.

    example: "obj._x = 5" will add "_x" var to the object
     
    cyclinder, Nov 25, 2005 IP