Copy link to clipboard
Copied
I'm a beginner at AS, so I apologise for that.
I'm assuming it has to do with the input in the input boxes being a variable, but I am unsure how to call in that variable into the actionscript on the button, as well as what actionscript to use. An If statement, I assume?
Copy link to clipboard
Copied
don't use the textfield variable. assign instance names to your textfields (eg, tf1,tf2,tf3) and use their text properties:
function checkTF():Void{
if(tf1.text=="whatever1" && tf2.text=="whatever2" && tf.text=="whatever3"){
_root.gotoAndStop("framewhatever"); //<-use the goto methods and frame labels, not goto functions and scenes to navigate using actionscript.
}
}
Copy link to clipboard
Copied
I've just attempted this, but it didn't work. I don't think I'm calling in the text fields correctly.
I currently have the AS you gave me set on a button, so that's possibly why, any advice?
Copy link to clipboard
Copied
no code should be attached to objects. attach all code to timelines, preferably the main timeline, and use object instance names to link code to objects.
eg, if your button has instance name btn,
btn.onRelease=checkTF;
Find more inspiration, events, and resources on the new Adobe Community
Explore Now