textLink event - even its outside any loop, calls function various times at once


hello,

 

trying untherstand as3, dificult...

 

ok, i've loaded text database , make links each title, works good, until try add item counter have next , previous button, allowing user load 12 records.

when inserting next code, links fire n times, not once expected, making browser unespectly quit.

 

what can reason?

 

some explanation

 

init number need increase or decrease make database query

total number of received records query

total_geral number of records in database, can know if must or not have next button

t name of mysql table query should happen

 

 

note, outside kind of loop

 

thanks!

 

 

code:

 

// // contadores // function contagem(init:number, total:number, total_geral:number, t:string):void {      var contador;      if(init < 13 && total_geral < 12) {           contador = "";           trace("não é necessário botão para próximos");      } else if (init > 13 && total < 12) {           contador = "| <a href=\'event:anterior\'>ver anteriores</a> | ";      } else if (init < 13 && total_geral > 12) {           contador = "| <a href=\'event:proximo\'>ver próximos</a> | ";      } else {// (tot > 13 && total_geral < 12 && total == 12) {           contador = "| <a href=\'event:anterior\'>ver anteriores</a> | <a href=\'event:proximo\'>ver próximos</a> |";      }      textos.htmltext += "<br />";      textos.htmltext += contador; } function anterior(txtevt:textevent, t:string):void {      init -= 12;      ler_php("nulo", t, init); } // function proximo(txtevt:textevent, t:string):void {      init += 12;      ler_php("nulo", t, init); } 

what's ler_php()?

 

actually, href's doing?



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

Problem with all comment components. - Joomla! Forum - community, help and support

Nogen der kender et simpelt hvidt template med topmenu kun - Joomla! Forum - community, help and support

Perplessità: Help me please :) - Joomla! Forum - community, help and support