Efectivamente, cuando haces onRelease hace rato que acabó el bucle ;)
Prueba a asignarle i a cada boton previamente:
[code]
for( var i=0;i<=textos.length;i++){
clips[i].miID=i;
clips[i].onRelease=function(){
salida.txt=(textos[this.miID]);
}
}
[/code]
un saludo
Javier Fernández
------------------------------------------
[ http://drusunlimited.com ]
On 8/7/06, Fernando Sáez Comet <[EMAIL PROTECTED]> wrote:
> Ok, otro más:
>
> En este tengo 10 clips y un campo de texto dinámico donde pongo la variable
> "salida". Me interes que cuando pinche en cada uno de los diez botones salga
> un texto distinto.
>
> los nombres de instancia de los 10 clips son: f1, f2, f3, f4...
>
> Los textos, pongamos: Asturias, Andalucia, Castilla y León, Galicia, ...
>
> Hago:
>
> [CODE]
>
> var textos:Array=["Asturias","Andalucia","Castilla y León","Galicia"...]
>
> var clips:Array=["f1","f2","f3","f4","f5",...]
>
> for( var i=0;i<=textos.length;i++){
> (clips[i]).onRelease=function(){
> salida.txt=(textos[i]);
> }
> }
>
> [/CODE]
>
> No funciona, no sé si es xq dentro del onRelease no llega a coger la i.
>
> _________________________________________________________________
> Grandes éxitos, superhéroes, imitaciones, cine y TV...
> http://es.msn.kiwee.com/ Lo mejor para tu móvil.
>
>
> -----------------------------------------------------
> ASNativos
> www.5dms.com
> subscripciones/desubscripciones
> http://asnativos.5dms.com
> -----------------------------------------------------
>
--
-----------------------------------------------------
ASNativos
www.5dms.com
subscripciones/desubscripciones
http://asnativos.5dms.com
-----------------------------------------------------