eu gostaria de cmparr o q digitei na input text...nao sei o q fiz deerradoooo
nao acontece nda....
Ouvinte:Object = new Object();
Ouvinte.onKeyDown = function(){
if (Key.isDown(Key.ENTER)){
verificaTexto();
}
}
Key.addListener(Ouvinte);
function verificaTexto(){
if(this._parent.tRegiaoCentroOeste.text == "centro-oeste" || this._parent.tRegiaoCentroOeste.text == "Centro-Oeste"){
trace("Centro-Oeste");
}
else if (this._parent.tRegiaoNorte.text == 'norte' ||this._parent.tRegiaoNorte.text == 'Norte'){
trace("Norte");
}
else if(this._parent.tRegiaoSudeste.text=='sudeste'|| this._parent.tRegiaoSudeste.text=='Sudeste'){
trace("Sudeste")
}
else if (this._parent.tRegiaoSul.text == 'sul' || this._parent.tRegiaoSul.text=='Sul'){
trace("Sul");
}
else if (tRegiaoNordeste.text == 'nordeste'|| this._parent.tRegiaoNordeste.text =='Nordeste'){
trace("Nordeste");
}
}
Publicidade
|
|
Page 1 of 1
Duvida com Listeners estou com duvidas em como capturar dados do teclado
#2
Posted 18 November 2009 - 03:07 PM
QUOTE(jeh-lim @ 18/11/2009 14:11:42) <{POST_SNAPBACK}>
eu gostaria de cmparr o q digitei na input text...nao sei o q fiz deerradoooo
nao acontece nda....
var Ouvinte:Object = new Object();
Ouvinte.onKeyDown = function(){
if (Key.isDown(Key.ENTER)){
verificaTexto();
}
}
Key.addListener(Ouvinte);
function verificaTexto(){
if(this._parent.tRegiaoCentroOeste.text == "centro-oeste" || this._parent.tRegiaoCentroOeste.text == "Centro-Oeste"){
trace("Centro-Oeste");
}
else if (this._parent.tRegiaoNorte.text == 'norte' ||this._parent.tRegiaoNorte.text == 'Norte'){
trace("Norte");
}
else if(this._parent.tRegiaoSudeste.text=='sudeste'|| this._parent.tRegiaoSudeste.text=='Sudeste'){
trace("Sudeste")
}
else if (this._parent.tRegiaoSul.text == 'sul' || this._parent.tRegiaoSul.text=='Sul'){
trace("Sul");
}
else if (tRegiaoNordeste.text == 'nordeste'|| this._parent.tRegiaoNordeste.text =='Nordeste'){
trace("Nordeste");
}
}
nao acontece nda....
var Ouvinte:Object = new Object();
Ouvinte.onKeyDown = function(){
if (Key.isDown(Key.ENTER)){
verificaTexto();
}
}
Key.addListener(Ouvinte);
function verificaTexto(){
if(this._parent.tRegiaoCentroOeste.text == "centro-oeste" || this._parent.tRegiaoCentroOeste.text == "Centro-Oeste"){
trace("Centro-Oeste");
}
else if (this._parent.tRegiaoNorte.text == 'norte' ||this._parent.tRegiaoNorte.text == 'Norte'){
trace("Norte");
}
else if(this._parent.tRegiaoSudeste.text=='sudeste'|| this._parent.tRegiaoSudeste.text=='Sudeste'){
trace("Sudeste")
}
else if (this._parent.tRegiaoSul.text == 'sul' || this._parent.tRegiaoSul.text=='Sul'){
trace("Sul");
}
else if (tRegiaoNordeste.text == 'nordeste'|| this._parent.tRegiaoNordeste.text =='Nordeste'){
trace("Nordeste");
}
}
pronto assim deve funcionar erro de syntax
#3
Posted 18 November 2009 - 03:14 PM
QUOTE(Edward K @ 18/11/2009 15:11:11) <{POST_SNAPBACK}>
QUOTE(jeh-lim @ 18/11/2009 14:11:42) <{POST_SNAPBACK}>
eu gostaria de cmparr o q digitei na input text...nao sei o q fiz deerradoooo
nao acontece nda....
var Ouvinte:Object = new Object();
Ouvinte.onKeyDown = function(){
if (Key.isDown(Key.ENTER)){
verificaTexto();
}
}
Key.addListener(Ouvinte);
function verificaTexto(){
if(this._parent.tRegiaoCentroOeste.text == "centro-oeste" || this._parent.tRegiaoCentroOeste.text == "Centro-Oeste"){
trace("Centro-Oeste");
}
else if (this._parent.tRegiaoNorte.text == 'norte' ||this._parent.tRegiaoNorte.text == 'Norte'){
trace("Norte");
}
else if(this._parent.tRegiaoSudeste.text=='sudeste'|| this._parent.tRegiaoSudeste.text=='Sudeste'){
trace("Sudeste")
}
else if (this._parent.tRegiaoSul.text == 'sul' || this._parent.tRegiaoSul.text=='Sul'){
trace("Sul");
}
else if (this._parent.tRegiaoNordeste.text == 'nordeste'|| this._parent.tRegiaoNordeste.text =='Nordeste'){
trace("Nordeste");
}
}
nao acontece nda....
var Ouvinte:Object = new Object();
Ouvinte.onKeyDown = function(){
if (Key.isDown(Key.ENTER)){
verificaTexto();
}
}
Key.addListener(Ouvinte);
function verificaTexto(){
if(this._parent.tRegiaoCentroOeste.text == "centro-oeste" || this._parent.tRegiaoCentroOeste.text == "Centro-Oeste"){
trace("Centro-Oeste");
}
else if (this._parent.tRegiaoNorte.text == 'norte' ||this._parent.tRegiaoNorte.text == 'Norte'){
trace("Norte");
}
else if(this._parent.tRegiaoSudeste.text=='sudeste'|| this._parent.tRegiaoSudeste.text=='Sudeste'){
trace("Sudeste")
}
else if (this._parent.tRegiaoSul.text == 'sul' || this._parent.tRegiaoSul.text=='Sul'){
trace("Sul");
}
else if (this._parent.tRegiaoNordeste.text == 'nordeste'|| this._parent.tRegiaoNordeste.text =='Nordeste'){
trace("Nordeste");
}
}
pronto assim deve funcionar erro de syntax
ainda nao foiiiii....
nao consigo fazer a comparacao, peo q digitei no teclado....
#4
Posted 21 November 2009 - 01:30 PM
Aqui funcionou perfeitamente.
O erro deve estar no caminho que você esta colocando como referencia para o campo de texto.
Revise isso ai, o código ta ok.
Abraço !
O erro deve estar no caminho que você esta colocando como referencia para o campo de texto.
Revise isso ai, o código ta ok.
Abraço !
Share this topic:
Page 1 of 1
Similar Topics
| Topic | Forum | Started By | Stats | Last Post Info | |
|---|---|---|---|---|---|
|
Fazer Banner
sou muito ruim com Designer |
Fireworks |
mestre fyoda
|
|
|
|
Inserir dados de um Popup num formulario
Inserir dados de um Popup num formulario |
ASP |
Condor
|
|
|
|
Como dar ênfase ao seu currículo
sem emprego por falta de experiência... |
Humor | Guest__* |
|
|
|
Problemas com a paleta de cores
Não entendo isso! |
Corel Draw |
rubatubes
|
|
|
|
Site de compra coletiva oferta 1º desconto para carros nos EUA
|
Notícias |
Notícias
|
|
|
|
ajuda formulário
problemas com formulários |
PHP |
marauder
|
|
|
|
Portifólio dk desing e comunicação
|
Portfólio |
Daniel Kenji
|
|
|
|
TIM espera concluir compra da Intelig para ampliar pacotes
|
Notícias |
Notícias
|
|
Publicidade
|
|

Help













