Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    maschera object oriented

    ciao gente,
    ho un'immagine in un mc di nome "image_mc"
    utilizzando questo codice viene una machera molto carina

    qualcuno sa dirmi però perché non riesco ad applicarlo ad un'immagine di grandezza superiore agli 800px???


    MovieClip.prototype.imageStretcher = function(path, velocity, stretch) {
    this.depthRemember = Math.round(Math.random()*1000000);
    this.scaleFactor = stretch == undefined ? 40 : stretch;
    this.stretchScroller = 0;
    var stretched = "stretched"+this.depthRemember;
    this.duplicateMovieClip(stretched, this.depthRemember++);
    path[stretched]._xscale = 100*this.scaleFactor;
    var masker = "masker"+this.depthRemember;
    this.createEmptyMovieClip(masker, this.depthRemember++);
    with (this[masker]) {
    lineStyle(0, 0xababab);
    moveTo(path[this]._x, path[this]._y);
    beginFill(0xababab, 100);
    lineTo(this._width, path[this]._y);
    lineTo(this._width, path[this]._height);
    lineTo(path[this]._x, path[this]._height);
    lineTo(path[this]._x, path[this]._y);
    endfill();
    }
    path[stretched].setMask(this[masker]);
    var oldwidth = this[masker]._width;
    if (velocity == undefined) {
    velocity = 8;
    }
    this.onEnterFrame = function() {
    if (this.stretchScroller<this._width) {
    this[masker]._x = this.stretchScroller;
    this[masker]._width = oldwidth-this.stretchScroller;
    path[stretched]._x = this._x+this.stretchScroller-(this.stretchScroller*this.scaleFactor);
    this.stretchScroller += velocity;
    } else {
    delete this.onEnterFrame;
    path[stretched].removeMovieClip();
    this[masker].removeMovieClip();
    }
    };
    };
    image_mc.imageStretcher(this);

  2. #2
    và anche su 880..
    appena testato!

    il valore 40.. mettilo a 10 dimensiona la mc a 880 per es. e testa.

    L'effetto è ottimo!
    strech eseguibile in altri due differenti modi.. testati qualche tempo fà..

    byee
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.