6 Replies Latest reply on Mar 6, 2016 6:43 AM by kglad

    How to convert a Boolean to a String?


      Hey there, I'm tinkering around with flash trying to build just a fun little RPG for myself. I'm currently trying to make an inventory and I've run into a problem. I was wondering if I am able to convert a boolean into a string (doesn't matter if an if statement is used).


      Basically when I click on an item I want it to check what the first open spot is and go there. I'm doing this by having a for loop, each iteration of the loop it creates a string with the value "slot" + currentNumberInForLoop. I have named my inventory slot booleans, slot0, slot1, etc. I want to convert these booleans to strings, check if they equal the other string, and keep going through until it is found true (an open inventory slot).


      If you need further clarification on my question let me know (it's 4am and I'm tired )