Buenos días soy un poco principiante en eso del actionscript y tengo un problema ke me trae de cabeza a ver si alguno de vosotros me puede ayudar. Resulta que tengo una clase animtween y al generar el swf me da el siguiente error:
1084: Error de sintaxis: se esperaba identifier antes de this.
el codigo es este y el error me da en la linea que esta en rojo. alguien me puede ayudar.
muchas gracias
CODIGO:
class AnimTween
{
var myString, Name_array, Change_array, Begin_array, this.Name_array[i], onEnterFrame, Value_array;
function AnimTween()
{
} // End of the function
function easeNone(t, b, c, d)
{
return (c * t / d + b);
} // End of the function
function easeInElastic(t, b, c, d, a, p)
{
if (t == 0)
{
return (b);
} // end if
t = t / d;
if (t == 1)
{
return (b + c);
} // end if
if (!p)
{
p = d * 3.000000E-001;
} // end if
if (!a || a < Math.abs(c))
{
a = c;
var _loc7 = p / 4;
}
else
{
_loc7 = p / 6.283185E+000 * Math.asin(c / a);
} // end else if
t = t - 1;
return (-a * Math.pow(2, 10 * (t)) * Math.sin((t * d - _loc7) * 6.283185E+000 / p) + b);
} // End of the function
function easeOutElastic(t, b, c, d, a, p)
{
if (t == 0)
{
return (b);
} // end if
t = t / d;
if (t == 1)
{
return (b + c);
} // end if
if (!p)
{
p = d * 3.000000E-001;
} // end if
if (!a || a < Math.abs(c))
{
a = c;
var _loc7 = p / 4;
}
else
{
_loc7 = p / 6.283185E+000 * Math.asin(c / a);
} // end else if
return (a * Math.pow(2, -10 * t) * Math.sin((t * d - _loc7) * 6.283185E+000 / p) + c + b);
} // End of the function
function easeInOutElastic(t, b, c, d, a, p)
{
if (t == 0)
{
return (b);
} // end if
t = t / (d / 2);
if (t == 2)
{
return (b + c);
} // end if
if (!p)
{
p = d * 4.500000E-001;
} // end if
if (!a || a < Math.abs(c))
{
a = c;
var _loc7 = p / 4;
}
else
{
_loc7 = p / 6.283185E+000 * Math.asin(c / a);
} // end else if
if (t < 1)
{
t = t - 1;
return (-5.000000E-001 * (a * Math.pow(2, 10 * (t)) * Math.sin((t * d - _loc7) * 6.283185E+000 / p)) + b);
} // end if
t = t - 1;
return (a * Math.pow(2, -10 * (t)) * Math.sin((t * d - _loc7) * 6.283185E+000 / p) * 5.000000E-001 + c + b);
} // End of the function
function easeInCubic(t, b, c, d)
{
t = t / d;
return (c * (t) * t * t + b);
} // End of the function
function easeOutCubic(t, b, c, d)
{
t = t / d - 1;
return (c * ((t) * t * t + 1) + b);
} // End of the function
function easeInOutCubic(t, b, c, d)
{
t = t / (d / 2);
if (t < 1)
{
return (c / 2 * t * t * t + b);
} // end if
t = t - 2;
return (c / 2 * ((t) * t * t + 2) + b);
} // End of the function
function easeInQuint(t, b, c, d)
{
t = t / d;
return (c * (t) * t * t * t * t + b);
} // End of the function
function easeOutQuint(t, b, c, d)
{
t = t / d - 1;
return (c * ((t) * t * t * t * t + 1) + b);
} // End of the function
function easeInOutQuint(t, b, c, d)
{
t = t / (d / 2);
if (t < 1)
{
return (c / 2 * t * t * t * t * t + b);
} // end if
t = t - 2;
return (c / 2 * ((t) * t * t * t * t + 2) + b);
} // End of the function
function easeInExpo(t, b, c, d)
{
return (t == 0 ? (b) : (c * Math.pow(2, 10 * (t / d - 1)) + b));
} // End of the function
function easeOutExpo(t, b, c, d)
{
return (t == d ? (b + c) : (c * (-Math.pow(2, -10 * t / d) + 1) + b));
} // End of the function
function easeInOutExpo(t, b, c, d)
{
if (t == 0)
{
return (b);
} // end if
if (t == d)
{
return (b + c);
} // end if
t = t / (d / 2);
if (t < 1)
{
return (c / 2 * Math.pow(2, 10 * (t - 1)) + b);
} // end if
return (c / 2 * (-Math.pow(2, -10 * --t) + 2) + b);
} // End of the function
function easeInCircle(t, b, c, d)
{
t = t / d;
return (-c * (Math.sqrt(1 - t * t) - 1) + b);
} // End of the function
function easeOutCircle(t, b, c, d)
{
t = t / d - 1;
return (c * Math.sqrt(1 - (t) * t) + b);
} // End of the function
function easeInOutCircle(t, b, c, d)
{
t = t / (d / 2);
if (t < 1)
{
return (-c / 2 * (Math.sqrt(1 - t * t) - 1) + b);
} // end if
t = t - 2;
return (c / 2 * (Math.sqrt(1 - (t) * t) + 1) + b);
} // End of the function
function easeInBack(t, b, c, d, s)
{
if (s == undefined)
{
s = 1.701580E+000;
} // end if
t = t / d;
return (c * (t) * t * ((s + 1) * t - s) + b);
} // End of the function
function easeOutBack(t, b, c, d, s)
{
if (s == undefined)
{
s = 1.701580E+000;
} // end if
t = t / d - 1;
return (c * ((t) * t * ((s + 1) * t + s) + 1) + b);
} // End of the function
function easeInOutBack(t, b, c, d, s)
{
if (s == undefined)
{
s = 1.701580E+000;
} // end if
t = t / (d / 2);
if (t < 1)
{
s = s * 1.525000E+000;
return (c / 2 * (t * t * ((s + 1) * t - s)) + b);
} // end if
t = t - 2;
s = s * 1.525000E+000;
return (c / 2 * ((t) * t * ((s + 1) * t + s) + 2) + b);
} // End of the function
function easeInQuad(t, b, c, d)
{
t = t / d;
return (c * (t) * t + b);
} // End of the function
function easeOutQuad(t, b, c, d)
{
t = t / d;
return (-c * (t) * (t - 2) + b);
} // End of the function
function easeInOutQuad(t, b, c, d)
{
t = t / (d / 2);
if (t < 1)
{
return (c / 2 * t * t + b);
} // end if
return (-c / 2 * (--t * (t - 2) - 1) + b);
} // End of the function
function easeInQuart(t, b, c, d)
{
t = t / d;
return (c * (t) * t * t * t + b);
} // End of the function
function easeOutQuart(t, b, c, d)
{
t = t / d - 1;
return (-c * ((t) * t * t * t - 1) + b);
} // End of the function
function easeInOutQuart(t, b, c, d)
{
t = t / (d / 2);
if (t < 1)
{
return (c / 2 * t * t * t * t + b);
} // end if
t = t - 2;
return (-c / 2 * ((t) * t * t * t - 2) + b);
} // End of the function
function easeInSine(t, b, c, d)
{
return (-c * Math.cos(t / d * 1.570796E+000) + c + b);
} // End of the function
function easeOutSine(t, b, c, d)
{
return (c * Math.sin(t / d * 1.570796E+000) + b);
} // End of the function
function easeInOutSine(t, b, c, d)
{
return (-c / 2 * (Math.cos(3.141593E+000 * t / d) - 1) + b);
} // End of the function
function tween(MCname, NArray, VArray, Duration, tweenType, floatAction, args)
{
var refName = eval(MCname);
refName.Name_array = NArray.split(",");
refName.Value_array = VArray.split(",");
var myLength = refName.Value_array.length;
this.myString = "";
var i = 0;
while (i < myLength)
{
this.myString = this.myString + (refName[refName.Name_array[i]] + ",");
++i;
} // end while
refName.Begin_array = this.myString.split(",");
refName.Begin_array.pop();
this.myString = "";
var i = 0;
while (i < myLength)
{
this.myString = this.myString + (String(refName.Value_array[i] - refName[refName.Name_array[i]]) + ",");
++i;
} // end while
refName.Change_array = this.myString.split(",");
refName.Change_array.pop();
var t = 0;
var d = Duration;
var b = 0;
var c = 500;
refName.onEnterFrame = function ()
{
++t;
var i = 0;
while (i < myLength)
{
this[this.Name_array[i]] = _level0.Tween[tweenType](t, Number(this.Begin_array[i]), Number(this.Change_array[i]), d);
++i;
} // end while
if (t > d)
{
delete this.onEnterFrame;
var i = 0;
while (i < myLength)
{
this[this.Name_array[i]] = this.Value_array[i];
++i;
} // end while
delete this.Name_array;
delete this.Value_array;
delete this.Begin_array;
delete this.Change_array;
if (floatAction != undefined)
{
eval("[floatAction](args)");
} // end if
} // end if
};
} // End of the function
} // End of Class