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

Cargar jpg externo y ponerle un logo de la biblioteca

Estas en el tema de Cargar jpg externo y ponerle un logo de la biblioteca en el foro de Flash y Actionscript en Foros del Web. Hola! Quiero cargar un JPG al cual le quiero poner un Logotipo en la esquina. El logotipo lo tengo en el SWF en la biblioteca ...
  #1 (permalink)  
Antiguo 08/09/2008, 05:38
 
Fecha de Ingreso: septiembre-2008
Mensajes: 17
Antigüedad: 15 años, 6 meses
Puntos: 0
Cargar jpg externo y ponerle un logo de la biblioteca

Hola!

Quiero cargar un JPG al cual le quiero poner un Logotipo en la esquina.

El logotipo lo tengo en el SWF en la biblioteca y el JPG lo quiero cargar desde un archivo externo. No visualizo el JPG , pero el evento de carga completa si que salta.

¿Cual puede ser el error?

Código:
import flash.display.*;
import flash.geom.*;

//Creo el moviclip donde almacenar el archivo externo
this.createEmptyMovieClip("pan",this.getNextHighestDepth());

loader = new MovieClipLoader()

//Para el disparo de eventos
loader.addListener(this)
//Cargo el archivo externo
loader.loadClip("pan.jpg", pan)

function onLoadInit()
//Cuando ya esta cargado y listo para usar el archivo
{
    myBitmap = new BitmapData(pan._width, pan._height,true,0x00FFFFFF)
    myBitmap.draw(pan)
    pan.removeMovieClip()
	
	AnchoVisor = 775; //Anchura del visor		
	this = this.createEmptyMovieClip("pan1",this.getNextHighestDepth());
	this.logo = BitmapData.loadBitmap("logol"); //De biblioteca
	this.logomsk = BitmapData.loadBitmap("logomsk"); //De biblioteca
	this.tmp = new BitmapData(AnchoVisor, this.myBitmap.height, true, 0); 
	this.attachBitmap(this.tmp, 1, "auto", true); 
	this.tmp.copyPixels(this.myBitmap,this.tmp.rectangle,null); 
	this.tmp.copyPixels(this.logo,this.logo.rectangle,new Point(675,425),this.logomsk,new Point(0, 0),true);		
}

function onLoadError()
//Si hay error en la carga
{
    pan.removeMovieClip()
}
Muchas Gracias!
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 09:52.