bueno mi pregunta es en base a esto:
Código :
#include "lmc_tween.as"
customEasing = {};
customEasing.pts = [{Mx:0,My:0,Nx:18,Ny:-236,Px:2,Py:-19},
{Mx:20,My:-255,Nx:16,Ny:-96,Px:2,Py:119},
{Mx:38,My:-232,Nx:30,Ny:186,Px:3,Py:-148},
{Mx:71,My:-194,Nx:22,Ny:-46,Px:8,Py:37},
{Mx:101,My:-203,Nx:30,Ny:24,Px:1,Py:-21},
{Mx:132,My:-200,Nx:28,Ny:-6,Px:4,Py:6},
{Mx:164,My:-200,Nx:40,Ny:2,Px:-4,Py:-2},
{Mx:200, My:-200}];
customEasing.ease = function(t,b,c,d,pl){
var i,r;
r = 200 * t/d;
for(i = 0;r>pl[i+1].Mx;i++){
}
i=pl[i];
if(i.Px != 0){
r=(-i.Nx+Math.sqrt(i.Nx*i.Nx-4*i.Px*(i.Mx-r)))/(2*i.Px);
}else{
r=-(i.Mx-r)/i.Nx;
}
return b-c*((i.My+i.Ny*r+i.Py*r*r)/200);
}
// end of generated code
// usage:
// tween my_mc _x to 300 with custom easing in 3 seconds
my_mc.onRollOver = function () {
this.tween("_xscale",150,2,customEasing);
this.tween("_yscale",150,2,customEasing);
}
my_mc.onRollOut = function () {
this.tween("_xscale",100,2,customEasing);
this.tween("_yscale",100,2,customEasing);
}
//hasta aki funciona perfecto, pero cuando agrego la orden a un boton para que le modifique su propiedad al mc no me funciona y me marca error de sintaxis...cual?//
1_btn.onRelease = function () {
my_mc.tween("_x", 200,1,customEasing);
my_mc.tween("_y", 200,1,customEasing);
}
realmente hay un error de ese tipo, o en este caso debo dirigir la orden de algun otro modo?
de antemano muchas gracias
