FORUMS: list search recent posts

AS2_Input Box Problem

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hans Fouche
AS2_Input Box Problem
on Oct 8, 2009 at 3:34:44 pm

I am writing a small wordgame prog for a grade2 child and am battling a bit. I am new to this and still have alot to learn.

a Code found on webwasp using instance name:

on (press) {
if (textbox.text.indexOf("car") != -1) {
gotoAndStop("saw");
} else {
gotoAndStop("what");
}
}


a Second code also tried also found on webwasp using var:

on (release, keyPress "") {
if (answer eq "rooster" or answer eq "cockerel") {
gotoAndPlay ("win");
} else if (answer eq "hen" or answer eq "chicken") {
gotoAndStop ("boy");
} else {
gotoAndStop ("wrong");
}
}

I have tried both ways and no luck. No matter what it only gos to the incorrect answer even if correct answer entered.
Can someone please help. I am stuck. I am using Flash CS4- AS2

please email me on: hans_cellc@yahoo.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]