[FONT="]Hi!
I have tried to create a simple Hangman game, it works great,[/FONT][FONT="] but I have two problems. Number one, the course I´m taking requires that there should be an if else statement in the actionscript programming (in an appropriate manner in connection with the user interaction) and I realy don’t know how to fix that. I´m tearing my hair. [/FONT]:crying: [FONT="]Number 2 Preferably I would like the program, alternating between several different words. How do I do? Some kind of array? [/FONT]
[FONT="]Please can someone help a woman in need? [/FONT]:hang:[FONT="] Maybe I better say that I am a beginner at actionscript to. This is the code as it looks today.[/FONT]
[FONT="]stop();[/FONT]
[FONT="]okey._visible=false;[/FONT]
[FONT="]akey._visible=false;[/FONT]
[FONT="]pkey._visible=false;[/FONT]
[FONT="]rkey._visible=false;[/FONT]
[FONT="]r2key._visible=false;[/FONT]
[FONT="]skey._visible=false;[/FONT]
[FONT="]wkey._visible=false;[/FONT]
[FONT="]var wrongletters:Array=[“b”,“c”,“d”,“e”,“f”,“g”,“h”,“i”,“j”,“k”,“l”,“m”,“n”,“q”,“t”,“u”,“v”,“x”,“y”,“z”];[/FONT]
[FONT="]for (i=0; i<wrongletters.length; i++) {[/FONT]
[FONT="] my_btn=_root[wrongletters*+“_btn”];[/FONT]
[FONT="] my_btn.onRelease=function() {[/FONT]
[FONT="] nextFrame();[/FONT]
[FONT="] this._visible=false;[/FONT]
[FONT="] };[/FONT]
[FONT="]}[/FONT]
[FONT="]s_btn.onRelease=function() {[/FONT]
[FONT="] skey._visible=true;[/FONT]
[FONT="] this._visible=false;[/FONT]
[FONT="] checkAnswers();[/FONT]
[FONT="]};[/FONT]
[FONT="]p_btn.onRelease=function() {[/FONT]
[FONT="] pkey._visible=true;[/FONT]
[FONT="] this._visible=false;[/FONT]
[FONT="] checkAnswers();[/FONT]
[FONT="]};[/FONT]
[FONT="]a_btn.onRelease=function() {[/FONT]
[FONT="] akey._visible=true;[/FONT]
[FONT="] this._visible=false;[/FONT]
[FONT="] checkAnswers();[/FONT]
[FONT="]};[/FONT]
[FONT="]r_btn.onRelease=function() {[/FONT]
[FONT="] rkey._visible=true;[/FONT]
[FONT="] r2key._visible=true;[/FONT]
[FONT="] this._visible=false;[/FONT]
[FONT="] checkAnswers();[/FONT]
[FONT="]};[/FONT]
[FONT="]o_btn.onRelease=function() {[/FONT]
[FONT="] okey._visible=true;[/FONT]
[FONT="] this._visible=false;[/FONT]
[FONT="] checkAnswers();[/FONT]
[FONT="]};[/FONT]
[FONT="]w_btn.onRelease=function() {[/FONT]
[FONT="] wkey._visible=true;[/FONT]
[FONT="] this._visible=false;[/FONT]
[FONT="] checkAnswers();[/FONT]
[FONT="]};[/FONT]
[FONT="]function checkAnswers() {[/FONT]
[FONT="] if(skey._visible && pkey._visible && akey._visible && rkey._visible && r2key._visible && okey._visible && wkey._visible) [/FONT]
[FONT="]{ gotoAndStop(10);[/FONT]
[FONT="] }[/FONT]
[FONT="]};[/FONT]