actionscript 2 - Creating level codes with action script 2.0 -
i want create level codes, in sea of fire (http://armorgames.com/play/351/sea-of-fire) have text input box instance name "code" , button has code:
on (release) { if (code = 96925) { gotoandstop(4); } if (code = 34468) { gotoandstop(5); } if (code = 57575) { gotoandstop(6); } if (code = 86242) { gotoandstop(7); } if (code = 99457) { gotoandstop(8); } if (code = 66988) { gotoandstop(10); } if (code = !96925 && !34468 && !57575 && !86242 && !99457 && !66988) { gotoandstop(3); } }
i've tried use code.text instead of code, i've tried quotes around numbers, tried both sends frame 10 if code invalid.
you need use conditional operator (==), not equality operator (=) in 'if' condition if 'code' text field need use code.text can put trace check value of code. not understand last if condition
instead can use if - else if - else here.