[Laszlo-dev] dynamic mischief in LzAnimator

Henry Minsky henry.minsky at gmail.com
Tue Jan 8 17:39:17 PST 2008


This method in LzAnimator (controllers/LaszloAnimation.lzs) is shadowing
the
class method and then unshadowing it by using delete.



function setMotion ( eparam ){
    //easin, easeout , linear , easeboth (default)
    if ( eparam == "linear" ){
        this.calcNextValue = this.calcNextValueLinear;
    } else {
        delete this.calcNextValue;
        if ( eparam == "easeout" ){
            this.beginPoleDelta = 100;
        } else if ( eparam == "easein" ){
            this.endPoleDelta = 15;
        }
    }
}

I'm going to rewrite this in a more kosher manner which will work in AS3.
Although if I declared this
class dynamic it might work, but it just seems like a bad idea to keep this
idiom alive.




-- 
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080108/052c0dd4/attachment.html


More information about the Laszlo-dev mailing list