"Burn" in/out out transition

Out of context: Reply #6

  • Started
  • Last post
  • 6 Responses
  • ********
    0

    try my code

    // { ra: '100', rb: '0', ga: '100', gb: '0', ba: '100', bb: '0', aa: '100', ab: '0'}
    MovieClip.prototype.initColorTra... = function(transObject,rate,fricti...
    this.fadeColor = new Color(this);
    this.fadeT = new Object();
    this.newT = new Object();
    this.fadeT = transObject;
    this.fadeColor.setTransform(this...
    this.raSpeed = this.rbSpeed = this.gaSpeed = this.gbSpeed = this.baSpeed = this.bbSpeed = this.aaSpeed = this.abSpeed = 0;
    this.rate = rate;
    this.rate2 = rate2;
    this.friction = friction;
    this.friction2 = friction2;
    }

    MovieClip.prototype.colorTransfo...
    if(Math.abs(this.newT.ra - this.fadeT.ra) > 1 ||
    Math.abs(this.newT.rb - this.fadeT.rb) > 1 ||
    Math.abs(this.newT.ga - this.fadeT.ga) > 1 ||
    Math.abs(this.newT.gb - this.fadeT.gb) > 1 ||
    Math.abs(this.newT.ba - this.fadeT.ba) > 1 ||
    Math.abs(this.newT.bb - this.fadeT.bb) > 1 ||
    Math.abs(this.newT.aa - this.fadeT.aa) > 1 ||
    Math.abs(this.newT.ab - this.fadeT.ab) > 1)
    {
    this.raSpeed = (this.raSpeed * this.friction2) + ((this.newT.ra - this.fadeT.ra) * this.rate2);
    this.fadeT.ra +=this.raSpeed;
    this.rbSpeed = (this.rbSpeed * this.friction) + ((this.newT.rb - this.fadeT.rb) * this.rate);
    this.fadeT.rb += this.rbSpeed;
    this.gaSpeed = (this.gaSpeed * this.friction2) + ((this.newT.ga - this.fadeT.ga) * this.rate2);
    this.fadeT.ga += this.gaSpeed;
    this.gbSpeed = (this.gbSpeed * this.friction) + ((this.newT.gb - this.fadeT.gb) * this.rate);
    this.fadeT.gb += this.gbSpeed;
    this.baSpeed = (this.baSpeed * this.friction2) + ((this.newT.ba - this.fadeT.ba) * this.rate2);
    this.fadeT.ba += this.baSpeed;
    this.bbSpeed = (this.bbSpeed * this.friction) + ((this.newT.bb - this.fadeT.bb) * this.rate);
    this.fadeT.bb += this.bbSpeed;
    this.aaSpeed = (this.aaSpeed * this.friction2) + ((this.newT.aa - this.fadeT.aa) * this.rate2);
    this.fadeT.aa += this.aaSpeed;
    this.abSpeed = (this.abSpeed * this.friction) + ((this.newT.ab - this.fadeT.ab) * this.rate);
    this.fadeT.ab += this.abSpeed;
    }else{
    this.fadeT.ra = this.newT.ra;
    this.fadeT.rb = this.newT.rb;
    this.fadeT.ga = this.newT.ga;
    this.fadeT.gb = this.newT.gb;
    this.fadeT.ba = this.newT.ba;
    this.fadeT.bb = this.newT.bb;
    this.fadeT.aa = this.newT.aa;
    this.fadeT.ab = this.newT.ab;
    }
    this.fadeColor.setTransform(this...
    }

View thread