A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Simple question about variables

  1. #1
    Senior Member
    Join Date
    Feb 2003
    Posts
    129

    Simple question about variables

    Hello, I have four variables (slotcounter1, slotcounter2, slotcounter3 and slotcounter4) and they all start with the value "open".
    There is also another variable called "currentslotnum" which is always a numerical value between 1 and 4.

    When a button is clicked, i want it to make the correct slotcounter variable say "closed". For example, if the currentslotnum is 3, then slotcounter3 should equal "closed".

    I've got this code, but the variable doesn't seem to be changing to "closed". Anyone know why?

    Code:
    _root["slotcounter" + currentslotnum] = "closed";

  2. #2
    Senior Member
    Join Date
    Feb 2003
    Posts
    129
    Anybody?

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