Computer Science Canada

Actionscript

Author:  upthescale [ Wed Jun 14, 2006 4:25 pm ]
Post subject:  Actionscript

Hi, i'm fairly new to flash mx actionscript, i made a variable

code:

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...

Author:  lord_pwnerer [ Wed Nov 08, 2006 9:17 pm ]
Post subject: 

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

code:

x=0


And please, someone correct me if I'm wrong (and I may very well be), the code should be:

code:

var x = 0


: