tgodesign 0 Denunciar post Postado Maio 17, 2008 olá pessoal, estou fazendo um menu, usando a classe "lmc_tween.as" #include "lmc_tween.as" //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% for (i=0; i<=5; i++) { this["bt"+i].flag = i; this["bt"+i].onRollOver = function() { this.tween("_height", 37, 1, "easeout"); }; this["bt"+i].onRollOut = function() { this.tween("_height", 21, 1, "easeout"); }; this["bt"+i].onRelease = function() { this.enabled = false; this.tween("_height", 37, 1, "easeout"); this.useHandCursor = false; }; } o meu problema aqui é o seguinte, como vcs podem ver o menu contem 5 quadrinhos, onde todos tem 21px, colocando o mouse ele vai ficar com 37px, e ao clicar ele fica parado com esse tamanha de 37px, meu problema é como identificar os outros botões? se clicar no botão 02 "bt2" como faço pra todos os outros ficarem com 21px. caso clique no bt2 os outros botões teriam q ficar com essa propriedade abaixo: Mais como fazer isso dentro daquele for? se estou usando o this :S ///////////////////////////////////////// this.enabled = true this.tween("_height", 21, 1, "easeout"); this.useHandCursor = true ////////////////////////////////////////// alguem me ajude? obrigado. Compartilhar este post Link para o post Compartilhar em outros sites
José Enésio 4 Denunciar post Postado Maio 17, 2008 Tudo depende de onde vem esse this["bt"+i]. Tô sem Flash aqui não vou conseguir descobrir. Um exemplo pra tu entender mais ou menos a lógica do que tu tem que fazer. this["bt"+i].onRelease = function() { this.enabled = false; for(i=0; i<=5; i++) { de_onde_quer_que_venha_o_this["bt" + i].tween("_height", 21, 1, "easeout"); } this.tween("_height", 37, 1, "easeout"); this.useHandCursor = false; }; Compartilhar este post Link para o post Compartilhar em outros sites