dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: how to basically convert strings to variables

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    190
    if i set:
    gridvalue="a";
    rowvalue="b";
    columnvalue="a";
    location_id = gridvalue + rowvalue + columnvalue;
    will
    location_id = aba ? and if so if i set aba="this is a test";
    if i have a dynamic text box and i set the variable equal to location_id will it display this is a test? and if not, what am i doing wrong?

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    667
    If you set:

    gridvalue="a";
    rowvalue="b";
    columnvalue="a";
    location_id = gridvalue + rowvalue + columnvalue;

    than:

    location_id == "aba";

    Now if you set:

    aba = "This is a test.";

    You haven't affected the 'location_id' variable, you've simply created a new variable named 'aba' and given it the value "This is a test.". Therefore your text field will display "aba".

    Now if you do this:

    gridvalue="a";
    rowvalue="b";
    columnvalue="a";
    aba = "This is a test.";
    location_id = this[gridvalue] + this[rowvalue] + this[columnvalue];

    Then your text field will display "This is a test.".

  3. #3
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    a simpler way...

    loaction_id = this[gridvalue + rowvalue + columnvalue];

  4. #4
    Senior Member
    Join Date
    Jun 2001
    Posts
    190

    how about buttons?

    is there anyway to have like on the rollover of one button and it set value of month="a" and on the roll over of the second button to day="a", actually stupid question i know the answer to this, but is there anyway to have it to where these buttons overlap. that way basically if the mouse is over the button that sets month and the button that sets day. then month=a and day=a, and obviously if the mouse is just over one, it only sets that value. OVERALL, I want to know if i can have two buttons, on top of another and both buttons activated by th press of a click(roll over in my case, but thas something i can change). THanks guys

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