Foros del Web » Creando para Internet » Flash y Actionscript »

Editar Galeria xml y AS

Estas en el tema de Editar Galeria xml y AS en el foro de Flash y Actionscript en Foros del Web. Hola a todos, Me he descargado esta galeria en AS3: http://www.flashcomponents.net/compo...m_gallery.html he insertado mis imagenes en el archivo xml, pero al editar el fla y ...
  #1 (permalink)  
Antiguo 29/07/2010, 10:44
 
Fecha de Ingreso: noviembre-2009
Ubicación: Madrid
Mensajes: 81
Antigüedad: 14 años, 6 meses
Puntos: 1
Editar Galeria xml y AS

Hola a todos,

Me he descargado esta galeria en AS3:
http://www.flashcomponents.net/compo...m_gallery.html

he insertado mis imagenes en el archivo xml, pero al editar el fla y eliminar algun elementosno funciona, en cambio si edito el escenario, lo hago más grande, y muevo los elementos cuando lo ejecuto, se me superpone la barra de miniaturas con la imagen.

Si intento editar el codigo elimino la parte referente a la descripción de las imagenes y me da estos errores:

Cita:
TypeError: Error #2007: El valor del parámetro text debe ser distinto de null.
at flash.text::TextField/set text()
at 2DZoomGallery_fla::menuHolder_3/loadBigImage()[2DZoomGallery_fla.menuHolder_3::frame1:323]
at 2DZoomGallery_fla::menuHolder_3/addObjects()[2DZoomGallery_fla.menuHolder_3::frame1:280]
at 2DZoomGallery_fla::menuHolder_3/xmlHandler()[2DZoomGallery_fla.menuHolder_3::frame1:150]
at 2DZoomGallery_fla::menuHolder_3/onComplete()[2DZoomGallery_fla.menuHolder_3::frame1:141]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
TypeError: Error #2007: El valor del parámetro text debe ser distinto de null.
at flash.text::TextField/set text()
at imgMc/finished_loading()[imgMc::frame1:122]
Este es el código de la parte de la caja de imagen:

Código:
import fl.transitions.Tween;
import fl.transitions.easing.*;

var bgHOffset = 2*imgMc.x; //set double image clip width and over 
var bgVOffset = 2*imgMc.y; //set double border width and over 

var mcPath = this;

var twIn;
var twOut;

mcPath.visible = false;

var loaderanim = this.parent.loaderanim;

var yoffset = -50; //offset to adjust the position of big image on y axis
var xoffset = 0; //offset to adjust the position of big image on x axis

function progress_loading(e:Event) {
 //var bLoaded = e.target.bytesLoaded;
 //var bTotal = e.target.bytesTotal;
 //loaderanim.rotation += 5;
 loaderanim.circle.rotation += 5;
}

// This is done after the img/swf is loaded
function finished_loading(e:Event) {
 loaderanim.visible = false; //hide the animation movie
 //loaderanim.x = (mcPath.width - loaderanim.width)/2;
 //loaderanim.y = (mcPath.height - loaderanim.height)/2;
 setBoxElements(); //set box elements
}

function setBoxElements() {

 //RESIZE BORDER TO FIT THE NEW LOADED IMAGE SIZE//
 border.width = imgMc.width + bgHOffset;
 border.height = imgMc.height + bgVOffset;
 
 //RESIZE DESCRIPTION TEXT AND BACKGROUND TO FIT THE NEW LOADED IMAGE SIZE//
 imageDescriptionBox.imageDescription.tf.autoSize = "left";
 imageDescriptionBox.imageDescription.tf.width = imgMc.width;
  
 imageDescriptionBox.imageDescription.bg.width = imgMc.width;
 imageDescriptionBox.imageDescription.bg.height = imageDescriptionBox.imageDescription.tf.height;
 
 imageDescriptionBox.y = imgMc.height - imageDescriptionBox.height;

 
 //SET THE IMAGE BOX POSITION ON THE STAGE//
 if (mcPath.width > stage.stageWidth) mcPath.x = 0;
   else
	mcPath.x = (stage.stageWidth - mcPath.width)/2;
	
 
 if (mcPath.height > stage.stageHeight) mcPath.y = 0;
   else
	mcPath.y = (stage.stageHeight - mcPath.height)/2;	
	
 mcPath.y += yoffset;
 mcPath.x += xoffset;
 
 
 //FADE IN IMAGE BOX//
 fadeIn();
 
 //FADE OUT WHEN USER PRESS THE IMAGE BOX//
 mcPath.buttonMode = true;
 mcPath.useHandCursor = true;
 mcPath.mouseChildren = false;
 mcPath.addEventListener("mouseDown",addPressHandler);
		
}

 // FADE EACH IMAGE ON THE STAGE AFTER THE MOVIE IS LOADED//
					
function fadeIn() {
	
 mcPath.visible = true;

 var func1 = Regular.easeOut;
 var xs = 0;
 var xf = 1;
 var duration1 = 0.75;
 
 twIn = new Tween(mcPath, "alpha", func1, xs, xf, duration1, true);
}

function fadeOut() {
	
 var func1 = Regular.easeOut;
 var xs = 1;
 var xf = 0;
 var duration1 = 0.75;
 
 twOut = new Tween(mcPath, "alpha", func1, xs, xf, duration1, true);
 twOut.addEventListener("motionFinish",finishHandler);
}

function finishHandler(e:Event) {
 mcPath.visible = false;
}

function addPressHandler(e:Event){
 //fadeOut(); 
 mcPath.removeEventListener("mouseDown",addPressHandler);
 
 stage.addEventListener(MouseEvent.MOUSE_UP, releaseHandler);
}		

function releaseHandler(e:MouseEvent) {

 //ADD CUSTOM CODE HERE WHEN THE IMAGE IS RELEASED
	
 //brelease();
 var obj = mcPath.parent.hmenu.menu.activeMc;	

 var setLink = ((obj["info"].attributes.link!=undefined) && (obj["info"].attributes.link!=""));

 //open external HTML page if any
 if (setLink) {
  var request1:URLRequest = new URLRequest(obj["info"].attributes.link);
  navigateToURL(request1,obj["info"].attributes.window);
 }
    
 
 // be sure to clean up stage listener
 stage.removeEventListener(MouseEvent.MOUSE_UP, releaseHandler);
 //releaseOutsideTarget = null;	
  
}

Si me podeis echar un cable, os lo agradecería, porque no me entero de na :D

Muchas gracias.

Etiquetas: galeria, xml
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:18.