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

AS2 que sólo me funciona en Flash Player 6

Estas en el tema de AS2 que sólo me funciona en Flash Player 6 en el foro de Flash y Actionscript en Foros del Web. Hola amigos, Tengo un código que sólo me funciona si lo exporto en Flash Player 6, pero está escrito como AS2... Si lo exporto como ...
  #1 (permalink)  
Antiguo 22/11/2008, 04:45
 
Fecha de Ingreso: diciembre-2003
Mensajes: 157
Antigüedad: 20 años, 4 meses
Puntos: 1
AS2 que sólo me funciona en Flash Player 6

Hola amigos,

Tengo un código que sólo me funciona si lo exporto en Flash Player 6, pero está escrito como AS2... Si lo exporto como AS2 en versiones superiores(7,8,9...), no funciona... Hay algún método/script para que me lo acepte en Flash Player superiores? Tengo que retocar algo de los siguientes scripts?

Código 1:
Código:
_root.offer.actual = "1350";
tellTarget ("_root.offer") {
	gotoAndPlay("move");
}// End of TellTarget
_root.burro = "60";
//FUNCION COLOREAR SLIDERS//
slider_In = new Object();
function colorIn(mc) {
	color_In = new Color(mc);
	slider_In = {ra:ra, rb:0, ga:ga, gb:0, ba:ba, bb:0, aa:aa, ab:255};
	color_In.setTransform(slider_In);
}
slider_Out = new Object();
function colorOut(mc) {
	color_Out = new Color(mc);
	slider_Out = {ra:ra, rb:206, ga:ga, gb:206, ba:ba, bb:206, aa:aa, ab:255};
	color_Out.setTransform(slider_out);
}
/*COLOREAMOS EL SLIDER 1*/
this.colorIn(this.Boton1).call(_root,_root);
/*BOTONES*/
Boton1.onRollOver = function(){
	_root.colorIn(_root.Boton1).call(_root,_root);
	_root.colorOut(_root.Boton2).call(_root,_root);
	_root.colorOut(_root.Boton3).call(_root,_root);
	_root.colorOut(_root.Boton4).call(_root,_root);
	_root.burro = "0";
	_root.cual = "1";
	_root.offer.actual = "1350";
	tellTarget ("_root.offer") {
		gotoAndPlay("move");
	}// End of TellTarget
}
Boton1.onRollOut = function(){
	gotoAndPlay(46);
	_root.burro = "60";
}
Boton2.onRollOver = function(){
	_root.colorIn(_root.Boton2).call(_root,_root);
	_root.colorOut(_root.Boton1).call(_root,_root);
	_root.colorOut(_root.Boton3).call(_root,_root);
	_root.colorOut(_root.Boton4).call(_root,_root);
	gotoAndPlay(56);
	_root.burro = "0";
	_root.cual = "2";
	_root.offer.actual = "700";
	tellTarget ("_root.offer") {
		gotoAndPlay("move");
	}// End of TellTarget
}
Boton2.onRollOut = function(){
	gotoAndPlay(46);
	_root.burro = "60";
}
Boton3.onRollOver = function(){
	_root.colorIn(_root.Boton3).call(_root,_root);
	_root.colorOut(_root.Boton1).call(_root,_root);
	_root.colorOut(_root.Boton2).call(_root,_root);
	_root.colorOut(_root.Boton4).call(_root,_root);
	gotoAndPlay(56);
	_root.burro = "0";
	_root.cual = "3";
	_root.offer.actual = "-50";
	tellTarget ("_root.offer") {
		gotoAndPlay("move");
	}// End of TellTarget
}
Boton3.onRollOut = function(){
	gotoAndPlay(46);
	_root.burro = "60";
}
Boton4.onRollOver = function(){
	_root.colorIn(_root.Boton4).call(_root,_root);
	_root.colorOut(_root.Boton2).call(_root,_root);
	_root.colorOut(_root.Boton3).call(_root,_root);
	_root.colorOut(_root.Boton1).call(_root,_root);
	gotoAndPlay(56);
	_root.burro = "0";
	_root.cual = "4";
	_root.offer.actual = "-675";
	tellTarget ("_root.offer") {
		gotoAndPlay("move");
	}// End of TellTarget
}
Boton4.onRollOut = function(){
	gotoAndPlay(46);
	_root.burro = "60";
}
Frame 2:
Código:
_root.burro = Number(_root.burro)+0.7;
Frame 3:
Código:
if (_root.burro<60) {
	gotoAndPlay(_currentframe-1);
} else if (_root.burro == 60 || _root.burro>60) {
	if (_root.cual == 1) {
		_root.offer.actual = "1350";
		_root.colorIn(_root.Boton1).call(_root,_root);
		_root.colorOut(_root.Boton2).call(_root,_root);
		_root.colorOut(_root.Boton3).call(_root,_root);
		_root.colorOut(_root.Boton4).call(_root,_root);
	} else if (_root.cual == 2) {
		_root.offer.actual = "700";
		_root.colorIn(_root.Boton2).call(_root,_root);
		_root.colorOut(_root.Boton1).call(_root,_root);
		_root.colorOut(_root.Boton3).call(_root,_root);
		_root.colorOut(_root.Boton4).call(_root,_root);
	} else if (_root.cual == 3) {
		_root.offer.actual = "-50";
		_root.colorIn(_root.Boton3).call(_root,_root);
		_root.colorOut(_root.Boton1).call(_root,_root);
		_root.colorOut(_root.Boton2).call(_root,_root);
		_root.colorOut(_root.Boton4).call(_root,_root);
	} else if (_root.cual == 4) {
		_root.offer.actual = "-675";
		_root.colorIn(_root.Boton4).call(_root,_root);
		_root.colorOut(_root.Boton2).call(_root,_root);
		_root.colorOut(_root.Boton3).call(_root,_root);
		_root.colorOut(_root.Boton1).call(_root,_root);
	}
	tellTarget ("_root.offer") {
		gotoAndPlay("move");
	}// End of TellTarget
	gotoAndPlay(_currentframe+2);
	if (_root.cual<4) {
		_root.cual = Number(_root.cual)+1;
	} else if (_root.cual == 4) {
		_root.cual = "1";
	}
	// end else if       
}
// end else if
Frame 1 de un MC:
Código:
 x = getProperty(num, _x);
if (x != actual) {
	if (x<actual) {
		xmov = x-actual;
		setProperty(num, _x, x-xmov*viscocity);
	} else if (actual<x) {
		xmov = actual-x;
		setProperty(num, _x, x+xmov*viscocity);
	}
	// end else if 
} else if (x == actual) {
	xmov = "";
	setProperty(num, _x, x);
	gotoAndStop(1);
}
// end else if 
gotoAndPlay(_currentframe-1);
Gracias por vuestras respuestas!
Un saludo!
  #2 (permalink)  
Antiguo 23/11/2008, 15:36
 
Fecha de Ingreso: diciembre-2003
Mensajes: 157
Antigüedad: 20 años, 4 meses
Puntos: 1
Respuesta: AS2 que sólo me funciona en Flash Player 6

mmm...nadie tiene idea?
  #3 (permalink)  
Antiguo 24/11/2008, 05:15
 
Fecha de Ingreso: diciembre-2003
Mensajes: 157
Antigüedad: 20 años, 4 meses
Puntos: 1
Respuesta: AS2 que sólo me funciona en Flash Player 6

Hola a todos!

ya he conseguido "actualizar" a flash 8 casi todo el código, pero me queda este por descifrar...

Código:
 x = getProperty(num, _x);
if (x != actual) {
   if (x<actual) {
      xmov = x-actual;
      setProperty(num, _x, x-xmov*viscocity);
   } else if (actual<x) {
      xmov = actual-x;
      setProperty(num, _x, x+xmov*viscocity);
   }
} else if (x == actual) {
   xmov = "";
   setProperty(num, _x, x);
   gotoAndStop(1);
}
gotoAndPlay(_currentframe-1);
Alguien tiene idea por donde van los tiros para actualizarlo de AS2 de flash 4 a AS2 de versiones superiores???
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 03:14.