[font=Arial][size=3]Hi all![/size][/font]
[font=Arial][size=3]I need some help from the forum please since I am a newbie![/size][/font]
[font=Arial][size=3]I have two squares, one_mc and two_mc on the main timeline.[/size][/font]
[font=Arial][size=3]Beneath them I have three dots, a_mc, b_mc and c_mc, which reside on the main timeline as well. I also have on the main timeline an mc called”alphabet_mc” where I have the letters a,b,c under corresponding labels (label a inside alphabet_mc is where letter “a” resides, etc). The letters inside alphabet_mc are bitmap pictures, not textfields.[/size][/font]
[font=Arial][size=3]If the user presses one_mc and a_mc (or a_mc and one_mc)I want the letter “a” to appear at the corresponding label of alphabet_mc. Automaticaly I want the rest of the dots (b,c) to be disabled, since I do not want the user to press a second letter, but the corresponding number (for instance 1a)… However if the user presses two _mc I want the REST OF THE AVAILABLE DOTS of the previously pressed pair (in this case b,c) to be enabled so that the user can chose one of them along with two_mc ( for instance two_mc and b_mc so that b will appear on alphabet_mc).[/size][/font]
[font=Arial][size=3] [/size][/font]
[font=Arial][size=3]My problem is that I can not control the disabling of mc’s. How can I control which button the user will press and their outcome?[/size][/font]
[font=Arial][size=3]Also, when I add the same code to two_mc (with some name changes corresponding to two_mc and not to one_mc) the code gets confused. So how do I control the two numbers since they are sharing common letters?[/size][/font]
[font=Arial][size=3]Or perhaps, is there a better and easier way of achieving this that my own way?[/size][/font]
[font=Arial][size=3] [/size][/font]
[font=Arial][size=3]Your help is so much appreciated, since I am very stuck.[/size][/font]
[font=Arial][size=3]This is the code so far placed on the main timeline:[/size][/font]
[font=Arial][size=3] [/size][/font]
[font=Arial][size=3]function pressHandler() {[/size][/font]
[font=Arial][size=3] // disable if the user is already at the required label. [/size][/font]
[font=Arial][size=3] this.gotoAndStop(“pressed”);[/size][/font]
[font=Arial][size=3] this.enabled = false;[/size][/font]
[font=Arial][size=3] this.useHandCursor = false;[/size][/font]
[font=Arial][size=3] switch (true){[/size][/font]
[font=Arial][size=3] //–1A------------------------[/size][/font]
[font=Arial][size=3] case ( _root.a_mc.enabled == false) && ( _root.one_mc.enabled == false) :[/size][/font]
[font=Arial][size=3] _root.b_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.c_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.alphabet1_mc.gotoAndStop(“a”);[/size][/font]
[font=Arial][size=3] break;[/size][/font]
[font=Arial][size=3] //–A1–[/size][/font]
[font=Arial][size=3] case (_root.a_mc.enabled == false) && (_root.b_mc.enabled == true) && (_root.c_mc.enabled == true):[/size][/font]
[font=Arial][size=3] if (_root.one_mc.hitTest(_root._xmouse, _root._ymouse, true)) {[/size][/font]
[font=Arial][size=3] _root.one_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.alphabet1_mc.gotoAndStop(“a”);[/size][/font]
[font=Arial][size=3] }[/size][/font]
[font=Arial][size=3] break;[/size][/font]
[font=Arial][size=3] //–1B-----------------------[/size][/font]
[font=Arial][size=3] case ( _root.one_mc.enabled == false) && ( _root.b_mc.enabled == false):[/size][/font]
[font=Arial][size=3] _root.a_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.c_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.alphabet1_mc.gotoAndStop(“b”);[/size][/font]
[font=Arial][size=3] break;[/size][/font]
[font=Arial][size=3] //–B1–[/size][/font]
[font=Arial][size=3] case (_root.a_mc.enabled == true) && (_root.b_mc.enabled == false) && (_root.c_mc.enabled == true):[/size][/font]
[font=Arial][size=3] if (_root.one_mc.hitTest(_root._xmouse, _root._ymouse, true)) {[/size][/font]
[font=Arial][size=3] _root.one_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.alphabet1_mc.gotoAndStop(“b”);[/size][/font]
[font=Arial][size=3] }[/size][/font]
[font=Arial][size=3] break;[/size][/font]
[font=Arial][size=3] //–1C----------------------[/size][/font]
[font=Arial][size=3] case ( _root.one_mc.enabled == false) && ( _root.c_mc.enabled == false):[/size][/font]
[font=Arial][size=3] _root.a_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.b_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.alphabet1_mc.gotoAndStop(“c”);[/size][/font]
[font=Arial][size=3] break;[/size][/font]
[font=Arial][size=3] //–C1–[/size][/font]
[font=Arial][size=3] case (_root.a_mc.enabled == true) && (_root.b_mc.enabled == true) && (_root.c_mc.enabled == false):[/size][/font]
[font=Arial][size=3] if (_root.one_mc.hitTest(_root._xmouse, _root._ymouse, true)) {[/size][/font]
[font=Arial][size=3] _root.one_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.alphabet1_mc.gotoAndStop(“c”);[/size][/font]
[font=Arial][size=3] }[/size][/font]
[font=Arial][size=3] break;[/size][/font]
[font=Arial][size=3] [/size][/font]
[font=Arial][size=3] //–case “a” pressed ONLY then “b” and “c” enabled.FALSE–[/size][/font]
[font=Arial][size=3] case ( _root.one_mc.enabled == true) && ( _root.a_mc.enabled == false) && ( _root.b_mc.enabled == true) && ( _root.c_mc.enabled == true) :[/size][/font]
[font=Arial][size=3] _root.b_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.c_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.alphabet1_mc.gotoAndStop(1);[/size][/font]
[font=Arial][size=3] break;[/size][/font]
[font=Arial][size=3] //–case “b” pressed ONLY then “a” and “c” enabled.FALSE–[/size][/font]
[font=Arial][size=3] case ( _root.one_mc.enabled == true) && ( _root.a_mc.enabled == true) && ( _root.b_mc.enabled == false) && ( _root.c_mc.enabled == true) :[/size][/font]
[font=Arial][size=3] _root.a_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.c_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.alphabet1_mc.gotoAndStop(1);[/size][/font]
[font=Arial][size=3] break;[/size][/font]
[font=Arial][size=3] //–case “c” pressed ONLY then “b” and “a” enabled.FALSE–[/size][/font]
[font=Arial][size=3] case ( _root.one_mc.enabled == true) && ( _root.a_mc.enabled == true) && ( _root.b_mc.enabled == true) && ( _root.c_mc.enabled == false) :[/size][/font]
[font=Arial][size=3] _root.b_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.a_mc.enabled = false;[/size][/font]
[font=Arial][size=3] _root.alphabet1_mc.gotoAndStop(1);[/size][/font]
[font=Arial][size=3] break;[/size][/font]
[font=Arial][size=3] }[/size][/font]
[font=Arial][size=3]}[/size][/font]
[font=Arial][size=3] [/size][/font]
[font=Arial][size=3] [/size][/font]
[font=Arial][size=3]a_mc.onRelease = pressHandler;[/size][/font]
[font=Arial][size=3]one_mc.onRelease = pressHandler;[/size][/font]
[font=Arial][size=3]c_mc.onRelease = pressHandler;[/size][/font]
[font=Arial][size=3]b_mc.onRelease = pressHandler;[/size][/font]
[font=Arial][size=3]//two_mc.onRelease = pressHandler2a;[/size][/font]
[font=Arial][size=3]stop();[/size][/font]