This content has been marked as final. Show 7 replies
a on your timeline is not the same as a in your movieclip. so, when you first press a, it is undefined. adding 1 to it is NaN.
to remedy, you can make a global or use your movieclip's instance name when initializing a:
hi kglad ,
thanks for your quick replying.
bt i have more movie clips and i want to increase the value of each time pressing my movie clips.
so how can i do it.
and clear it also hw to make my variable global
> on your root timeline, write var a=0;
> on your movieclip, write _parent.increment();
> on your root timeline again, write
to make a variable global just put _global. in front of it... like _global.a = 0
As for tracking clicks on several movies, here is what I would do:
All this code would go on your main time line, but change yourMC1 and yourMC2 to the names of your movies. duplicate as needed.
ur code has really helped me.
Thanks a lot
Thanks all the members who have helped me
i am grateful for you pepople