Comunidad de diseño web y desarrollo en internet online

REMOVER SWF URGENTE

Citar            
MensajeEscrito el 10 Ago 2010 06:51 pm
hola oyes yo tengo un index con 3 botones cada uno llama a un swf pero si le doy de nuevo un click a un boton se vuelve a cargar dejando ensimado todo por fa como le hago
use este codigo en el boton

ilustracion_btn.addEventListener(MouseEvent.CLICK, cargarPel);
function cargarPel(event:MouseEvent):void {
var urlSwf:URLRequest = new URLRequest("portafolio.swf");
var cargarSwf:Loader = new Loader();
cargarSwf.load(urlSwf);
this.addChild(cargarSwf);


}

Por coast

7 de clabLevel



 

msie8
Citar            
MensajeEscrito el 10 Ago 2010 07:20 pm
Prueba algo así:

Código ActionScript :

var cargarSwf:Loader = new Loader();
this.addChild(cargarSwf);

ilustracion_btn.addEventListener(MouseEvent.CLICK, cargarPel);
function cargarPel(event:MouseEvent):void {
   var urlSwf:URLRequest = new URLRequest("portafolio.swf");
   cargarSwf.load(urlSwf);
}    


Es decir instancias y agregas una sola vez, luego en cada función solo cargas, reemplazando automaticamente el contenido anterior

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 10 Ago 2010 07:27 pm
oyes MIL MIL MIL GRACIAS ENCERIO MUCHAS GRACIAS DE ANTEMANO ESTOY EN DEUDA CONTIGO no me salia ya avia intentado de todo y no inventes me falta mucho es que apenas ando empezando con esto del as3 y pues bueno gracias por darte tiempo de leer mi problema hermano gracias

Por coast

7 de clabLevel



 

msie8

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.