this code now works with an button. but i want with keywords for example ENTER. but i cant do that.
on (press)
{
_root.buton_add.enabled =false;
_root.mix_it();
_root.buton_letter_add();
_root.buton_answer_add(_root.words);
_root.greenn._visible=false;
_root_bluee._visible=false;
_root.passed_it.text="";
for (i=0;i<_root.questions.length;i++)
{
if (_root.words==_root.questions*.toUpperCase())
{
_root.puan=_root.puan+_root.questions*.length*(_root.index_no+1);
_root.txtpuan.text=_root.puan;
_root.temp_timer=_root.temp_timer+_root.questions*.length;
_root.questions.splice(i,1);
}
}
if (_root.questions.length==0)
{
_root.bitti();
}
}
i write like this but it doesnt work. although i hit ENTER, anything happens.
buton_add.onKeyDown = function() {
if (Key.isDown(Key.ENTER)) {
_root.buton_add.enabled =false;
_root.mix_it();
_root.buton_letter_add();
_root.buton_answer_add(_root.words);
_root.greenn._visible=false;
_root_bluee._visible=false;
_root.passed_it.text="";
for (i=0;i<_root.questions.length;i++)
{
if (_root.words==_root.questions*.toUpperCase())
{
_root.puan=_root.puan+_root.questions*.length*(_root.index_no+1);
_root.txtpuan.text=_root.puan;
_root.temp_timer=_root.temp_timer+_root.questions*.length;
_root.questions.splice(i,1);
}
}
if (_root.questions.length==0)
{
_root.bitti();
}
}
}
thanks