
-----------------------------------
upthescale
Wed Jun 14, 2006 4:25 pm

Actionscript
-----------------------------------
Hi, i'm fairly new to flash mx actionscript, i made a variable


x=0

x=x+1;


_root.text = x


but the number 1 doesnt start counting up ward, hwo can i adfd a loop to maek it go 1,2,3,4,5.etc...

-----------------------------------
lord_pwnerer
Wed Nov 08, 2006 9:17 pm


-----------------------------------
First, you either will have to have 'x' as an instance name, exported for use in ActionScript. (And I appologize if you have already done this, but you didn't mention it) or, you will have to declare a variable 'x'. Here you merely put 


x=0


And please, someone correct me if I'm wrong (and I may very well be), the code should be: 


var x = 0

