[RESOLVED] [MX] Array Question
Hello, here is my question. I have 10 icons on the stage and I'm wanting to save their "x" and "y" postions to a sol file. This I know how to do. However I'm trying to make the code as efficient as possible. Which is my question; can I use an array to collect the coordinates data of each icon? Or do I have to write out the code for each one? I was hoping to have an array run setup and then a function run through appending the data to each button and moving on to the next. Something like this pseudo code:
Code:
myarray = newArray("btn1", "btn2", "btn3");
posx = getProperty(myarray, _x);
posy = getProperty(myarray, _y);
function save(){
Write sol file
myarray + posx + posy
}
Something along those lines, where I'm not writing out the same code for every button. If I need to clarify more please let me know. Thanks
Mo