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

Enmascarar imagenes dinámicas

Estas en el tema de Enmascarar imagenes dinámicas en el foro de Flash y Actionscript en Foros del Web. Hola! Estoy queriendo hacer un slideshow con xml. Conseguí uno que que es muy simple, justo lo que necesito, el problema es que necesito enmascarar ...
  #1 (permalink)  
Antiguo 21/01/2010, 09:24
 
Fecha de Ingreso: abril-2003
Mensajes: 7
Antigüedad: 20 años, 11 meses
Puntos: 0
Pregunta Enmascarar imagenes dinámicas

Hola!
Estoy queriendo hacer un slideshow con xml. Conseguí uno que que es muy simple, justo lo que necesito, el problema es que necesito enmascarar las fotos, o por lo menos taparles una parte.
Pero en el AS carga la imagen con "getNextHighestDepth" y me tapa todo lo que le ponga encima, ademas que no me respeta las máscar que le pongo.
Acá dejo el código a ver si alguien sabe cómo puedo hacerlo, muchas gracias!!!

Código:
import mx.transitions.Tween;
import mx.transitions.easing.*;
import mx.xpath.XPathAPI;
var delay:Number;
var animationDuration:Number;
var current_num:Number = 0;
var first_num:Number = 0;
var image_holder:MovieClip = this.createEmptyMovieClip("image_holder", this.getNextHighestDepth());
var mcl_lis:Object = new Object();
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(mcl_lis);
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function( isLoaded:Boolean )
{
	if( isLoaded )
	{
		data_arr = XPathAPI.selectNodeList(this.firstChild,"Slideshow/images/image");
		delay = parseInt(XPathAPI.selectSingleNode(this.firstChild,"Slideshow/settings/delay").firstChild);
		animationDuration = parseInt(XPathAPI.selectSingleNode(this.firstChild,"Slideshow/settings/animationDuration").firstChild);
		//optional code to check delay and animationDuration values
		(delay == undefined || delay == null) ? delay = 5000: delay<1000? delay =1000:true;
		(animationDuration == undefined || animationDuration == null) ? animationDuration = .8: animationDuration<.3? animationDuration =.8:true;
		load_image();
	}else
	{
		trace("XML Load error");
	}
}
xml.load("XML/data.xml")

function load_image() 
{
	mcl.loadClip(data_arr[current_num].attributes.url, image_holder);
	(current_num>=data_arr.length-1) ? current_num = first_num:current_num++;
}

mcl_lis.onLoadInit = function(target_mc:MovieClip) {
	var obj:Tween = new Tween(target_mc, "_alpha", Normal.easeIn, 0, 100, .5, true);
		setTimeout(function(){
								var obj:Tween = new Tween(target_mc, "_alpha", Normal.easeIn, 100, 0, .5, true);
									obj.onMotionFinished = function() {load_image();};
							 },5000);//duración
};

Última edición por Chamil; 21/01/2010 a las 12:35 Razón: ortografía

Etiquetas: enmascarar, imagenes
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 04:11.