I'm trying to pass a variable through a function, but I'm getting it's value 0
Here's my code:
thumbLoader.addEventListener(MouseEvent.CLICK, goToCategory);
function goToCategory(e:MouseEvent) {
trace(c);
gotoAndStop(2);
doSMTH(0);
}
this trace gives me value of 0.
Normally I would do goToCategory(c) and inside that category I would get it's value, but in this case I'm calling this function with an event, how can that be done?
var c is declared globally, so I'm using it above this code in different place...
is there smth like global $c like in PHP.. or there's some other way to do it?
Thanks in advance!!!