EDIT: oops, had this tab open for a while
-----------------
Hi,
you're only passing a String to your function, and have no code in your function to convert the String to a defined MovieClip, which basically means that you're telling a String to gotoAndStop("a")
Either pass the y argument as a MovieClip by simply typing
t1 without quotes - this will pass the full path to the MovieClip to your function:
ActionScript Code:
on(press) {
_root.clickedit(0, t1);
}
If you want to pass a String, then you'll have to make Flash look for the MovieClip with the same instance name. This can be achieved by using,
scope[stuff_to_look_for], where scope is for example _root, _parent, this, etc. and the inside of the bracket is whatever you want (adding Strings, variables and Numbers together to make up a name), but whatever you type in there, Flash will look for an Object with the same name. In this case, when you send "t1" as a String into your Function, it will look for an Object with the same instance name, which is the movieclip with the instance name, t1, and refer to it. Here:
ActionScript Code:
function clickedit(x, y) {
if (_root.tileshuffled[x] == "a") {
this[y].gotoAndStop("a");
}
}
Hope this helps