bit of help with Actionscript - flash mx 2004

  tomleady 13:55 19 Apr 04
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 04

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 04

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

click here

  tomleady 14:03 19 Apr 04

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.

Best phone camera 2016/2017: Galaxy S7 vs iPhone 7 vs Google Pixel vs HTC 10 Evo vs OnePlus 3T vs…

1995-2015: How technology has changed the world in 20 years

The Pantone Colour of the Year 2017 is Green

Super Mario Run preview | Hands-on first impressions of Super Mario Run: Mario's iPhone & iPad…