never had this particular scenario come up before, so I'm at a loss as to how to proceed ...
if i was making a 'test' in flash - and the question was 'An octagon has how many sides?'
I would have an input text box and a button to 'submit' it. If the answer is correct, the swf would advance to Scene 2, and if incorrect to Scene 3. How hard is this to do inside Flash itself (without querying outside files)?
Any help appreciated.
in the submit button event you'd do a quick check.
if(answerField.text == 8 || answerField.text == "eight"){ timeline.gotoAndPlay("scene2"); }else{ timeline.gotoAndPlay("scene3"); }
thanks persist - i like your solution better than what i came up with - little less code bloat
submit_btn.onRelease = function() { answer = answer_txt.text; if (answer == "8") { gotoAndStop("correct"); } else { gotoAndStop("wrong"); } }; var answer:String = ""; stop();
...Scene 2, and if incorrect to Scene 3
I strongly advise you to use frame labels (all on one timeline), and NOT scenes.
Around 1/2 the questions in the Newbie forum at Flashkit relate to scenes; they cause far more confusion than they are worth.
Concurs
Assuming the test has more than one question, Skinner's string util might prove useful.
Originally posted by: scudsucker
I strongly advise you to use frame labels (all on one timeline), and NOT scenes.
no **** - i havent used scenes since flash 4, but sometimes you gotta pick your battles with the boss