hello scripting geniuses,
I am working on modifying some hangman games for the language teachers where I teach…
I am stumped about how to alter the letter options in the ActionScript.
For instance:
[LIST]
[]The Latin teacher wants to omit the letters J and V since in the Latin language the letters do not exist.
[] The French teacher is spooking me even more with phrases like:
Comment t’appelles-tu?. How on EARTH will I get the ', - and ? marks in ??
[*]What about the ’ and ` marks over certain vowels?[/LIST]The existing code says this:
// create alphabet as text and buttons
private function createAlphabet():Void {
mcAlphabet = this.createEmptyMovieClip("mcAlphabet", 1);
var nXPos:Number = 0;
for (var i:Number = 65; i <= 90; i++) {
var sLetter:String = String.fromCharCode(i);
var cgl:GameLetter = GameLetter(mcAlphabet.attachMovie("GameLetter", "cgl_" + sLetter, mcAlphabet.getNextHighestDepth(), {_x: nXPos, letter: sLetter}));
cgl.addEventListener("click", Delegate.create(this, onLetterClicked));
nXPos += 14;
}
}
Now from my research I understand that this line:
for (var i:Number = 65; i <= 90; i++) {
essentially sets the variable to be A-Z (capital alphabet).
how do I
a) omit letters
b) add letters +/or characters?
Oh please wise makers of code and .flas… help a frazzled computer teacher?
…peace
~Swearingen