if _root.cheatBox is your textfield, you should be using
likewise for your 'else if' branch.
no, the _root.cheatBox.cheat is the text field, _root.cheatBox is just a movie clip containing it
I tried adding the .text to the end of the _root.cheatBox.cheat - however this doesn't seem to change anything
use the trace function to debug,
_root.cheatBox.goButton.onRelease = function()
//when the go button in the cheat box is released
if(_root.cheatBox.cheat.text == "N0496151")
//if the text box contains the code
//goes to the cheat scene and stops on that scene
else if(_root.cheatBox.cheat.text != "N0496151")
//goes to the menu scene and stops on that scene
I ran a trace on the text field, and the output is returning "undefined undefined"
1 person found this helpful
then you don't have a correct reference to your textfield.
to find the correct reference, on the timeline that contains your textfield, put:
I found the problem, I had given the text field a variable name, which was preventing it from working properly - when i removed it, it started working fine
thanks for the help