flash masking yscale

Out of context: Reply #6

  • Started
  • Last post
  • 8 Responses
  • unfittoprint0

    I can only think of way to that:

    //create an empty holder
    this.createEmptyMovieClip("holde...

    //you could then attach your movieclip inside, center it
    this.holder.attachMovie("myMC", "myMC", 4);

    //center
    this.holder.myMC._x -= this.holder.myMC._width
    this.holder.myMC._y -= this.holder.myMC._height

    //the scale is always made in relation to a clip's 0,0 so myMC's center point will not change.

    and then just use the [sligthly changed] previous function...

    //AS inside your square movie
    holder.changeScale = function(targetS){
    this.movieS=this._xscale=this._y...
    this.movieS+= (targetS-this.movieS)/4;
    this._xscale=this._yscale= this.movieS;
    }

    holder.scale = function(targetS){
    clearInterval(this.scale
    Loop);
    this.scaleLoop= setInterval(this, "changeScale", 30, targetS)
    }

    //call method outside movie
    holder.scale(200);

View thread