Tema: Pasar a AS 3
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 19/09/2007, 12:36
mikile
 
Fecha de Ingreso: junio-2006
Mensajes: 65
Antigüedad: 17 años, 10 meses
Puntos: 0
Pasar a AS 3

Hola a todos,

Tengo este código que me va perfectamente (menos con Firefox 2.0 y no he parado de buscar pero nada de nada), quisiera actualizar al AS 3.
Qué parametros deberia modificar
Código:
stop();
spacing = 10;
border._visible = false;
containerMC._alpha = 0;
var pArray = new Array();
var tArray = new Array();
var iArray = new Array();
var hArray = new Array();
var cur = 0;
MovieClip.prototype.loadPic = function(pic) {
	cur = pic;
	containerMC._alpha = 0;
	this.loadMovie(pArray[pic]);
	this._parent.onEnterFrame = function() {
		var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
		bar._visible = 0;
		per = Math.round((l/t)*100);
		if (t == l && containerMC._width>0 && containerMC._height>0) {
			var w = containerMC._width+spacing, h = containerMC._height+spacing;
			border.resizeMe(w, h);
			bar._visible = 1;
			picinfo.info.text = tArray[pic];
			piesdefotos.parrafo12.text = iArray[pic];
			copyright.copi.text = hArray[pic];
			containerMC._alpha = 0;
			delete this.onEnterFrame;
		} else {
			bar._width = per;
			picinfo.info.text = per+" % cargando texto e imagen, esperen por favor...";
			bar._visible = false;
		}
	};
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
	var speed = 2;
	this.onEnterFrame = function() {
		this._width += (w-this._width)/speed;
		this._height += (h-this._height)/speed;
		if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
			this._width = w;
			this._height = h;
			containerMC._x = this._x-this._width/2+spacing/2;
			containerMC._y = this._y-this._height/2+spacing/2;
			containerMC._alpha += 7;
			if (containerMC._alpha>100) {
				containerMC._alpha = 100;
				delete this.onEnterFrame;
			}
		}
	};
};
var padres_xml = new XML();
padres_xml.ignoreWhite = true;
padres_xml.onLoad = function(success) {
	if (success) {
		var pipo = this.firstChild;
		pipo_txt.text = v.attributes.info;
		pipo_txt.text = v.attributes.parrafo12;
		pipo_txt.text = pipo.attributes.copi;
		for (var i = 0; i<pipo.childNodes.length; i++) {
			tArray.push(pipo.childNodes[i].attributes.title);
			pArray.push(pipo.childNodes[i].attributes.source);
			iArray.push(pipo.childNodes[i].attributes.parrafo12);
			hArray.push(pipo.childNodes[i].attributes.copi);
		}
		containerMC.loadPic(0);
	} else {
		title_txt.text = "Error!";
	}
};
padres_xml.load("padres.xml");
Si alguien me puede echar una mano
bienvenida sea