MLT icon

[xat.com] lib.as

MLT | PRO | 11/11/13 10:03:19 PM UTC | 0 ⭐ | 10781 👁️ | Never ⏰ | []
ActionScript |

1.21 KB

|

None

|

0 👍

/

0 👎

var tc = 0;
 
function Animate(tick, points)
// return interpolation
// points is arrray, eg 0,30, 3,50, 6,30, 9,50, 12,30
// tick, value, tick value etc
{
    
    for(var n = 2; n<points.length; n+=2)
    {
        if(tick <= points[n]) // found ?
        {
            var r =
                (points[n+1] - points[n-1]) / 
                (points[n] - points[n-2]) *
                (tick - points[n-2]) +
                points[n-1];
            return r;
        }
    }
    tc = 0; // reset tick, mark end
    return points[points.length-1]; // if finished - last value
}
 
function xInt(arg):Number
// guaranteed to return a number
{
    var r:Number = parseInt(String(arg));
 
    if (isNaN(r)) return 0;// return 0 if NaN
 
    return r;
}
 
function AttachMovie(mc, sym, Settings=undefined)
        {
                var classRef:Class = getDefinitionByName(sym) as Class;
                var Ret = new classRef();
                if(Settings)
                {
                    if(Settings['x']) Ret.x = Settings['x'];
                    if(Settings['y']) Ret.y = Settings['y'];
                    if(Settings['scaleX']) Ret.scaleX = Settings['scaleX'];
                    if(Settings['scaleY']) Ret.scaleY = Settings['scaleY'];
                    if(Settings['width']) Ret.width = Settings['width'];
                    if(Settings['height']) Ret.height = Settings['height'];
                }
                mc.addChild(Ret);           
                return Ret;
        }

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  • Cuiznxcn icon
    05/18/26 04:47:15 AM UTC
    text |

    0 B

    |

    0 👍

    /

    0 👎

    Best t33n active cpx link daily updates!
     Copy and paste the link in a new browser tab and then hit enter!
     https://crazyporn.xxx/members/157354/?asgtbndr=1&play=true&spon=adworld&zone=400