Hello
I have just finished a virtual keyboard, but there is one problem. When I write the small letters, and click a button to take me to frame 2 to write the big letters, the small letters disappear giving way to the big letters. How can I keep what I wrote in the frame 1 ?
Hi Kglad
http://www.er.uqam.ca/nobel/m340201/test/completed%20keybord.html
Thank for your answer. I kept the same name for the textfield, and I copied the stuff from frame 1 and pasted it to frame 2.
Here the script for frame one
capitButton.addEventListener(MouseEvent.CLICK, aButtonClickListener28aB);
function aButtonClickListener28aB(e:MouseEvent):void
{
gotoAndStop(2);
}
And here the script for frame two:
capitButton.addEventListener(MouseEvent.CLICK, aButtonClickListener28aBc);
function aButtonClickListener28aBc(e:MouseEvent):void
{
gotoAndStop(1);
}
looking at the link you posted, it appears you should not change frames.
use:
var upperCase:Boolean;
capitButton.addEventListener(MouseEvent.CLICK, aButtonClickListener28aB);
function aButtonClickListener28aB(e:MouseEvent):void
{
upperCase=!upperCase;
}
// you should already have something like this:
stage.addEventListener(KeyboardEvent.KEY_DOWN,keydownF);
function keydownF(e:KeyboardEvent):void{
if(upperCase){
// the code from your frame 2 listener function
} else {
// the code from your frame 1 listener function
}
}
Sorry for the delay. I am not that smart. I just used the following for all the letters in frame 1 :
qButton.addEventListener(MouseEvent.CLICK, aButtonClickListener);
function aButtonClickListener(e:MouseEvent):void
{
inputTxt.appendText("q");
}
and so on for all the letters..... I have been 'appending' all the way to "m". ;-)
And the following for uppercase for frame 2
QButton.addEventListener(MouseEvent.CLICK, aButtonClickListener1);
function aButtonClickListener1(e:MouseEvent):void
{
inputTxt.appendText("Q");
}
and so on for all the letters..... I know it's very poor programming. I am going to just use only lowercase letters. Tough luck for my readers.
use:
var upperCase:Boolean;
capitButton.addEventListener(MouseEvent.CLICK, capListener);
function capListener(e:MouseEvent):void
{
upperCase=!upperCase;
}
qButton.addEventListener(MouseEvent.CLICK, aButtonClickListener);
function aButtonClickListener(e:MouseEvent):void
{
if(upperCase){
inputTxt.appendText("Q");
} else {
inputTxt.appendText("q");
}
and so on for all the letters.....
Well, let me say this, and please do not take it the wrong way.
If I had to chose a new brother, I would have chosen someone like you.
If I had to chose a friend, it has to be like you.
If I had to chose a neighbor, It has to be like you.
If I had to chose my professor, it has to be like you.
If I had to chose my doctor, it has to be like you.
Anyway, to be brief, you made my day. Thank you.
North America
Europe, Middle East and Africa
Asia Pacific