Hi Everyone,
quick question about the this.watch(“variable”, function, args)
tag, does anyone know how to get this to watch a variable within an array or object, for example : i have an array
myArray = new Array('jello', 'pizza', 'pie', 'coke')
then I have a MC with the code:
_root.watch("myArray[1]", traceMe)
//
function traceMe(a,b,c)
{
trace(c)
trace(_root.myArray[1])
}
So, whenever I change the data in Array[1] I want the MC to trace the result…can this be done?
Also, does anyone know any reason why I shouldn’t use the Watch tag?
I haven’t seen it used much before, but I really like it, so I was kinda wondering if there was any reason why it is rarely used…
thanks in Advance C:-)