Creo que te viene por aquí:

<as>
[...]
clip_mc.huecoFoto_mc.hueco_mc = xmlDepurado.attributes.grande;

clip_mc.onPress = function() {
    hueco_mc esta dentro de huecofoto_mc
    fotoDetalle(this.huecoFoto_mc);
[...]
function fotoDetalle(queFoto:String) {
[...]
</as>

La cuestión es que cuando llamas a la función... ¿No deberías llamarla con 
this.huecoFoto_mc.hueco_mc?

Un tema que me despista es que después creas el hueco (que se supone ya 
tienes) en ese clip:

<as>
this.attachMovie("huecoFoto_mc", "huecoFoto",  20);

</as>

¿Tienes el huecoFoto_mc en el clip_mc o no lo tienes? ¿Si lo tienes, para 
qué lo vuelves a crear?


----- Original Message ----- 
From: "sergio arranz" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, November 17, 2006 10:51 AM
Subject: [ASNativos] carga de fotos


> Buenos días lista, tengo un pequeño problema que no consigo resolver, 
> tengo
> una carga de miniaturas que vienen de un XMl que funciona bien, pero al
> pinchar en la miniatura necesito que se cargue una foto Detalle, que se
> encuentra en el XML con el atributo grande, creo que lo tengo bien, pero 
> no
> me funciona, me dice que no encuentra la ruta //trabajos/xml, etc..., os
> importaria si os dejo el código y le hechais un pequeño vistazo??
>
> Muchas gracias.
>
>
> //CODIGO
>
> stop();
> posicionOver = "0xF9FBC6";
> posicionOut = "0x999999";
> var secciones:Array = new Array();
> secciones = ["imagen", "anuncios", "editorial", "multimedia", 
> "rotulación",
> "ferias", "centros"];
> function trabajos() {
> for (var i:Number = 0; i<secciones.length; i++) {
> var cargaSeccion = trabajos_mc.attachMovie("bot", "bot"+i, i);
> cargaSeccion._x = i*72;
> cargaSeccion.puntero = i;
> cargaSeccion.textoBoton_mc.botones_txt.text = secciones[i];
> cargaSeccion.onPress = function() {
> seleccionaBoton = this.puntero;
> // CREO UN PRIMER ARRAY DONDE ORDENARE EL XML
> var listado:Array = new Array();
> // AHORA LE DIGO QUE QUIERO CARGAR EN EL ARRAY
> listado = cargaTrabajos.firstChild.childNodes;
> // CREAMOS 2 VARIABLES PARA POSICIONAR
> var posX:Number = 0;
> var posY:Number = 0;
> // CREO OTRO ARRAY DONDE HARE REFERENCIA AL BOTON PRESIONADO CON SECCION
> ACTUAL
> var arrayMiniaturas:Array = new Array();
> arrayMiniaturas = listado[seleccionaBoton].childNodes;
> // CREO UN MC VACIO DENTRO DE MINI_MC QUE SE LLAMARA MINIATURAS_MC QUE
> SERA DONDE CARGARE LAS MINIATURAS
> var miniaturas_mc:MovieClip =
> mini_mc.createEmptyMovieClip("miniaturas_mc", 10);
> miniaturas_mc._x = 335;
> miniaturas_mc._y = 165;
> // CREO UN BUCLE PARA COLOCAR LOS MC VACIOS Y LE DIGO QUE SI i ES MENOR
> QUE LA LONGUITUD DEL ARRAY ARRAYMINIATURAS
> // QUE CARGUE UN NUEVO XML QUE SERA LA VARIABLE i DEL ARRAYMINIATURAS
> for (i=0; i<arrayMiniaturas.length; i++) {
> var xmlDepurado:XML = new XML();
> xmlDepurado = arrayMiniaturas[i];
> // AHORA SE CARGARA EL MISMO NUMERO DE MINIATURAS QUE LA LONGUITUD DEL
> ARRAYMINIATURAS
> var clip_mc:MovieClip = mini_mc.miniaturas_mc.attachMovie("mini",
> "mini"+i, i);
> // SE CARGARA EL ATRIBUTO MINIATURA DEL XML CARGADO DENTRO DEL MC MINI
> QUE CONTIENE OTRO MC QUE SE LLAMA FOTO_MC
> clip_mc.foto_mc.loadMovie(xmlDepurado.attributes.miniatura);
> //LO DEJAMOS PREPARADO PARA QUE AL PINCHAR EN LA MINIATURA SE CARGUE LA
> GRANDE
> clip_mc.huecoFoto_mc.hueco_mc = xmlDepurado.attributes.grande;
> clip_mc.onPress = function() {
> // LUGAR DONDE LO QUIERO MOSTRAR. huecofoto_mc esta en la biblioteca y
> hueco_mc esta dentro de huecofoto_mc
> fotoDetalle(this.huecoFoto_mc);
> //ahora decimos que en hueco_mc cargamos el atributo xml que comienze
> por gr
>
> };
> if (i%3 == 0) {
> posX = 0;
> posY += 55;
> } else {
> posX += 50;
> }
> clip_mc._x = posX;
> clip_mc._y = posY;
> }
> };
> cargaSeccion.onRollOver = function() {
> var tintaTexto:Color = new Color(this.textoBoton_mc);
> tintaTexto.setRGB(posicionOver);
> this.banda_mc.onEnterFrame = function() {
> // formula de la inercia
> this._height += (36-this._height)/8;
> // condicion si ya ha llegado
> if (Math.round(this._height) == 100) {
> this.onEnterFrame = null;
> }
> };
> };
> cargaSeccion.onRollOut = function() {
> var tintaTextodos:Color = new Color(this.textoBoton_mc);
> tintaTextodos.setRGB(posicionOut);
> this.banda_mc.onEnterFrame = function() {
> // formula de la inercia
> this._height += (4-this._height)/8;
> // condicion si ya ha llegado
> if (Math.round(this._height) == 3) {
> this.onEnterFrame = null;
> }
> };
> };
> }
> }
> trabajos();
> //CARGA FOTO GRANDE
> function fotoDetalle(queFoto:String) {
> var fotoGrande_mc:MovieClip = this.attachMovie("huecoFoto_mc", 
> "huecoFoto",
> 20);
> //POSICIONAMOS EN EL CENTRO DE LA ESCENA
> fotoGrande_mc._x = 90;
> fotoGrande_mc._y = -64;
> fotoGrande_mc.hueco_mc.loadMovie(queFoto);
> fotoGrande_mc.onPress = function() {
> this.removeMovieClip();
> };
> }
>
> _________________________________________________________________
> Descubre la descarga digital con MSN Music. Más de un millón de canciones.
> http://music.msn.es/
>
>
> -----------------------------------------------------
> ASNativos
> www.5dms.com
> subscripciones/desubscripciones
> http://asnativos.5dms.com
> -----------------------------------------------------
> 


-----------------------------------------------------
ASNativos
www.5dms.com
subscripciones/desubscripciones
http://asnativos.5dms.com
-----------------------------------------------------

Responder a