eronventer 2 Denunciar post Postado Novembro 20, 2007 Ae galera, Seguinte, tenho 13 campos do tipu input e 13 movieclips q sao a borda de cada input. Cada item tem uma instancia diferente. O que estou tentando fazer é o seguinte, no momento que eu der o focus no campo quero que o movieclip da borda seja alterado mas isso nao esta ocorrendo pq ele nao reconhece o nome do movieclip. for (i=0; i<=13; i++) { this["t"+i].tabEnabled = true; this["t"+i].tabIndex = i; this["t"+i].html = false; // this["t"+i].onSetFocus = function(){ trace(this["b"+i]); this["b"+i].colorTo(0xED4519,0.5,"linear"); } this["t"+i].onKillFocus = function(){ trace(this["b"+i]); this["b"+i].colorTo(0xCCCCCC,0.5,"linear"); } } o que pode estar errado? Compartilhar este post Link para o post Compartilhar em outros sites
Eder Fortunato 15 Denunciar post Postado Novembro 20, 2007 testa assim for (i=0; i<=13; i++) { this["t"+i].tabEnabled = true; this["t"+i].tabIndex = i; this["t"+i].html = false; // this["t"+i].flag = i this["t"+i].onSetFocus = function(){ trace(this["b"+this.flag]); this["b"+this.flag].colorTo(0xED4519,0.5,"linear"); } this["t"+i].onKillFocus = function(){ trace(this["b"+this.flag]); this["b"+this.flag].colorTo(0xCCCCCC,0.5,"linear"); } } Compartilhar este post Link para o post Compartilhar em outros sites