bit of help with Actionscript - flash mx 2004

  tomleady 13:55 19 Apr 2004
Locked

hi,
i'm currently learning flash and having to create an inout box that the user types in an answer, and they recieve an answer. now i can get it towork with one input box, but i cant its to return an answer when it depends on two input boxes.

code on the the button:

on (release)
{
if(_root.input1 == "/*") and (_root.input2 == "/*")
{
_root.answer1 = "Correct";
}
else
{
_root.answer1 = "Wrong";
}
}

i'm guessing the 'and' text on the second line is the incorrect part. i need input1 and input2 to be correct. i've tried with if else,else if, and other stuff,. but i'm stuck.

any help?

thanks.
Tom

  tomleady 13:57 19 Apr 2004

sorry, the code is set out horrobly there. i'll try again:

on (release){
if(_root.input1 == "/*") and (_root.input2 == "/*")
{
_root.answer1 = "Correct";
}
else
{
_root.answer1 = "Wrong";
}
}

  tomleady 14:02 19 Apr 2004

ok, i'll just upload it, it will be easier.

click here

  tomleady 14:03 19 Apr 2004

i just took changed the 2nd line to:

if(_root.input1 == "/*" and _root.input2 == "/*")

and it solved it.

this is why i dislike Flash, it makes me do stupid things!

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Best phone camera 2017

Stunning new film posters by Hattie Stewart, Joe Cruz & more

iPad Pro 10.5in (2017) review

28 astuces pour profiter au mieux de votre iPhone