Visualizzazione dei risultati da 1 a 3 su 3

Discussione: elimiare effetti

  1. #1

    elimiare effetti

    Salve a tutti.
    Io ho scarikato un tutorial ke vorrei modificare eliminando un paio di effetti. leggendo lo script non riesko a capire kosa dovrei eliminare. qualk1 può aiutarmi? Voglio eliminare l'effetto slide sfumato e i cerki ke maskerano la foto ke viene caircata. lo script è molto komplesso ed è il seguente ke divido i 2 parti:
    #initclip 0
    // ------------------
    // DRAW CIRCLE
    // ------------------
    MovieClip.prototype.drawCircle = function(thex, they,theradius, lineW, lineColor, fillColor, fillAlpha)
    {
    var x, y, r, u, v;
    x = thex;
    y = they;
    r = theradius;
    u = r*0.4086;
    v = r*0.7071;
    if(lineW != '')
    {
    this.lineStyle(lineW, lineColor, 100);
    }
    if(fillColor != undefined || fillColor != '')
    {
    this.beginFill(fillColor, fillAlpha);
    }
    this.moveTo(x-r, y);
    this.curveTo(x-r, y-u, x-v, y-v);
    this.curveTo(x-u, y-r, x, y-r);
    this.curveTo(x+u, y-r, x+v, y-v);
    this.curveTo(x+r, y-u, x+r, y);
    this.curveTo(x+r, y+u, x+v, y+v);
    this.curveTo(x+u, y+r, x, y+r);
    this.curveTo(x-u, y+r, x-v, y+v);
    this.curveTo(x-r, y+u, x-r, y);
    if(fillColor != undefined || fillColor != '')
    {
    this.endFill();
    }
    };
    // -----------------------------
    // ease out
    // -----------------------------
    MovieClip.prototype.easeOut = function(x,y,a,b)
    {
    var x = arguments[0];
    var y = arguments[1];
    k = new Object();
    this.onEnterFrame = function()
    {
    this.dx = (this.dx + ((x-this._x))/a)/b
    this.dy = (this.dy + ((y-this._y))/a)/b
    this._x += this.dx;
    this._y += this.dy;
    };
    };
    // hide prototype methods
    ASSetPropFlags(MovieClip.prototype, 'drawCircle',0)
    ASSetPropFlags(MovieClip.prototype, 'easeOut',0)

    // ****************************
    // ImageLoader Class
    // ****************************
    ImageLoader = function () {
    this.hasLoaded = false;
    this.autoStart = false;
    this.transition = 1
    };
    ImageLoader.prototype = new MovieClip ();
    // loadHandler
    ImageLoader.prototype.loadHandler = function (callback, c) {
    this.callback = callback;
    this.callback_num = c;
    };
    // execute handler once loaded
    ImageLoader.prototype.executeHandler = function () {
    if (this.hasLoaded == false) {
    this._parent[this.callback] (this.callback_num);
    this.hasLoaded = true;
    }
    if (this.autoStart) {
    this.executeCallBack ();
    }
    };
    // start transition
    ImageLoader.prototype.start = function () {
    this.executeCallBack ();
    };
    // load ext image
    ImageLoader.prototype.loadImage = function (img) {
    this.img = img;
    this.createEmptyMovieClip ("clip", 1);
    this.clip._alpha = 0;
    this.clip.loadMovie (this.img);
    this.preloadImage ();
    };
    // preload image
    ImageLoader.prototype.preloadImage = function () {
    this.onEnterFrame = function () {
    if (this.clip._url != this._url && this.clip.getBytesLoaded () >= this.clip.getBytesTotal () && this.clip.getBytesTotal () > 4) {
    delete this.onEnterFrame;
    this.executeHandler ();
    }
    };
    };
    // finish loading
    ImageLoader.prototype.executeCallBack = function () {
    /*
    when transition is 0 then make a random
    transition effect based on the number of
    transition functions
    */
    var num_of_transition = 11 // you can add your own transition function
    if(this.transition == 0){
    this.transition = random(num_of_transition) + 1
    //this.transition = 11
    }
    if(this.transition == 1){
    this.onEnterFrame = function () {
    if (this.clip._alpha > 100) {
    this.clip._alpha = 100;
    delete this.onEnterFrame;
    }
    this.clip._alpha += 5;
    };
    } else {
    this['transition' + this.transition]()
    }
    };
    // finish loading
    ImageLoader.prototype.fadeOut = function () {
    var a = 0;
    while(this['mask'+a] != undefined){
    this['mask'+a].unloadMovie()
    this['clip'+a].unloadMovie()
    a++
    }
    this.clip._alpha = 100
    };
    // ******************************* transitions ***************************** //
    // transition 2
    ImageLoader.prototype.transition2 = function(){
    var w = this.clip._width
    var h = this.clip._height
    var tot = 24
    this.createEmptyMovieClip('mask',2)
    for(var a = 0; a < tot; a++){
    var m = this.mask.createEmptyMovieClip('m' + a, 100 + (a))
    m._x = a*(w/tot)
    m._xscale = 0
    with(m){
    beginFill(0x00,100)
    lineTo(w/tot,0)
    lineTo(w/tot,h)
    lineTo(0,h)
    endFill()
    }
    m.onEnterFrame = function(){
    if(this._xscale > 100){
    this._yscale = 100
    delete this.onEnterFrame
    }
    this._xscale += ((this._name.substr(1)*1)/2) + 4
    }
    }
    this.clip._alpha = 100
    this.clip.setMask( this.mask )
    }
    // transition 3
    ImageLoader.prototype.transition3 = function(){
    this.c = new Color(this.clip)
    this.o = {rb:100,gb:100,bb:100}
    this.up = true
    this.onEnterFrame = function(){
    if(this.clip._alpha < 100){
    this.clip._alpha += 10
    }
    if(this.up == false){
    this.o.rb -= 10
    this.o.bb -= 10
    this.o.gb -= 10
    } else {
    if(this.o.rb < 255){
    this.o.rb *= 1.5
    this.o.bb *= 3
    this.o.gb *= 1.5
    } else {
    this.o = {rb:255,gb:255,bb:255}
    this.up = false;
    }
    }
    if(this.o.rb < 0){
    this.o = {rb:0,gb:0,bb:0}
    delete this.onEnterFrame;
    }
    this.c.setTransform(this.o)
    }
    }
    // transition 4
    ImageLoader.prototype.transition4 = function(){
    var w = this.clip._width
    var h = this.clip._height
    this.createEmptyMovieClip('mask', 2)
    var row = 4
    var col = 4
    var tot = row*col
    var _k = 1
    var y = (h/row)
    for(var a = 0; a < tot; a++){
    var mask = this.mask.createEmptyMovieClip('mask' + a, 100 + (a))
    mask._x = _k*((w/row)) - (w/tot)
    mask._y = y
    mask._xscale = 0
    mask._yscale = 0
    mask._visible = 0
    mask.drawCircle(-(w/tot)/row,-(w/tot)/row,(w/tot),0,0x00,0x00,100)
    if(_k%row==0 && a > 0){
    _k = 1
    y += h/row - (h/tot)
    } else {
    _k++
    }
    mask.onEnterFrame = function(){
    if(this._xscale > 700){
    this._xscale = 700
    this._yscale = 700
    delete this.onEnterFrame
    }
    this._xscale += 20
    this._yscale += 20
    }
    this.clip._alpha = 100
    this.clip.setMask(this.mask)
    }
    }
    // transition 5
    ImageLoader.prototype.transition5 = function(){
    var w = this.clip._width
    var h = this.clip._height
    var tot = 32
    var clip = this.clip
    this.createEmptyMovieClip("mask", 2)
    for(var a = 0; a < tot; a++){
    var m = this.mask.createEmptyMovieClip("m"+a,(a+2))
    m._y = a*(h/tot)
    m._yscale = 0
    with(m){
    beginFill(0x00,100)
    moveTo(0,0)
    lineTo(w,0)
    lineTo(w,(h/tot)+1)
    lineTo(0,(h/tot)+1)
    endFill()
    }
    m.onEnterFrame = function(){
    if(this._yscale > 100){
    this._yscale = 100
    delete this.onEnterFrame
    }
    this._yscale += ((this._name.substr(1)*1)/2) + 4
    }
    }
    this.clip._alpha = 100
    this.clip.setMask( this.mask)
    }
    // transition 6
    ImageLoader.prototype.transition6 = function(){
    var w = this.clip._width
    var h = this.clip._height
    var tot = 12
    var steps = 7
    var clip = this.clip
    for(var a = 0; a < tot; a++){
    var mask = this.createEmptyMovieClip('mask' + a, 100 + (a))
    mask._x = (w/tot)*a
    mask._xscale = 0
    mask._visible = 0
    with(mask){
    beginFill(0x00,100)
    moveTo(0,0)
    lineTo((w/tot)+1,0)
    lineTo((w/tot)+1,h)
    lineTo(0,h)
    lineTo(0,0)
    endFill()
    }
    if(a > 0){
    var clip = this.createEmptyMovieClip('clip' + a, (a+1))
    clip._alpha = 0
    clip.loadMovie(this.clip._url)
    }
    clip._x = (w/tot)
    }
    this.onEnterFrame = function(){
    _loaded = true
    for(var a = 1; a < tot; a++){
    if (this['clip' + a]._url == this._url || this['clip' + a].getBytesLoaded () < this['clip' + a].getBytesTotal () || this['clip' + a].getBytesTotal () < 4) {
    var _loaded = false
    return;
    }
    }
    if(_loaded){
    for(var a = 0; a < tot; a++){
    if(a==0){
    this.clip.setMask( this.mask0 )
    this.clip._alpha = 100
    var clip = this.clip
    } else {
    this['clip'+a].setMask(this['mask' + a])
    var clip = this['clip'+a]
    }
    this['mask'+a]._visible = 1
    this['clip'+a]._alpha = 100
    if(a > 0){
    this['mask'+a].num = this['clip'+a]
    } else {
    this['mask'+a].num = this.clip
    }
    this['mask'+a].steps = steps
    this['mask'+a].counter = 0
    var _a = 2 + (random(10)/10)
    var _b = 1.2 + (random(10)/10)
    this['mask'+a].num.easeOut(0,0,_a,_b)
    this['mask'+a].onEnterFrame = function(){
    if(this.counter >= this.steps){
    delete this.onEnterFrame;
    return;
    }
    this.counter++
    this._xscale += 100/this.steps
    //this.num._x -= (w/tot)/this.steps
    }
    }
    delete this.onEnterFrame;
    }
    }
    }
    // transition 7
    ImageLoader.prototype.transition7 = function(){
    var w = this.clip._width
    var h = this.clip._height
    var tot = 12
    var steps = 6
    var clip = this.clip
    for(var a = 0; a < tot; a++){
    var mask = this.createEmptyMovieClip('mask' + a, 100 + (a))
    mask._y = (h/tot)*a
    mask._yscale = 0
    mask._visible = 0
    with(mask){
    beginFill(0x00,100)
    moveTo(0,0)
    lineTo(w,0)
    lineTo(w,(h/tot) + 1)
    lineTo(0,(h/tot) + 1)
    lineTo(0,0)
    endFill()
    }
    if(a > 0){
    var clip = this.createEmptyMovieClip('clip' + a, (a+1))
    clip._alpha = 0
    clip.loadMovie(this.clip._url)
    }
    clip._y = -(h/tot)
    }
    this.onEnterFrame = function(){
    _loaded = true
    for(var a = 1; a < tot; a++){
    if (this['clip' + a]._url == this._url || this['clip' + a].getBytesLoaded () < this['clip' + a].getBytesTotal () || this['clip' + a].getBytesTotal () < 4) {
    var _loaded = false
    return;
    }
    }

  2. #2
    e per finire ekko la seconda parte:

    if(_loaded){
    for(var a = 0; a < tot; a++){
    if(a==0){
    this.clip.setMask( this.mask0 )
    this.clip._alpha = 100
    var clip = this.clip
    } else {
    this['clip'+a].setMask(this['mask' + a])
    var clip = this['clip'+a]
    }
    this['mask'+a]._visible = 1
    this['clip'+a]._alpha = 100
    if(a > 0){
    this['mask'+a].num = this['clip'+a]
    } else {
    this['mask'+a].num = this.clip
    }
    this['mask'+a].steps = steps
    this['mask'+a].counter = 0
    var _a = 2 + (random(10)/10)
    var _b = 1.2 + (random(10)/10)
    this['mask'+a].num.easeOut(0,0,_a,_b)
    this['mask'+a].onEnterFrame = function(){
    if(this.counter >= this.steps){
    delete this.onEnterFrame;
    return;
    }
    this.counter++
    this._yscale += 100/this.steps
    }
    }
    delete this.onEnterFrame;
    }
    }
    }
    // transition 8
    ImageLoader.prototype.transition8 = function(){
    var w = this.clip._width
    var h = this.clip._height
    var tot = 32
    this.createEmptyMovieClip('mask',2)
    for(var a = 0; a < tot; a++){
    var m = this.mask.createEmptyMovieClip('m' + a, 100 + (a))
    m._x = a*(w/tot)
    var s = random(2)
    if(s==0){
    m._y = -h
    m._rand = random(30) + 15
    m
    } else {
    m._y = h
    m._rand = -(random(30) + 15)
    }
    with(m){
    beginFill(0x00,100)
    lineTo((w/tot)+1,0)
    lineTo((w/tot)+1,h)
    lineTo(0,h)
    endFill()
    }
    m.onEnterFrame = function(){
    if(this._rand > 0){
    if(this._y + this._rand >= 0){
    this._y = 0
    delete this.onEnterFrame
    return
    }
    } else {
    if(this._y + this._rand <= 0){
    this._y = 0
    delete this.onEnterFrame
    return
    }
    }
    this._y += this._rand
    }
    }
    this.clip._alpha = 100
    this.clip.setMask( this.mask )
    }
    // --------------
    // transition 9
    // --------------
    ImageLoader.prototype.transition9 = function(){
    var w = this.clip._width
    var h = this.clip._height
    var row = 6
    var col = 6
    var _k = 0
    var _kk = 0
    var steps = 15
    this.createEmptyMovieClip('mask',2)
    var use = random(2) == 0 ? '_xscale' : '_yscale'
    for(var a = 0; a < row; a++){
    for(var b = 0; b < col; b++){
    _k++
    var m = this.mask.createEmptyMovieClip('m' + _k, 100 + (_k))
    m._x = b*(w/col)
    m._y = _kk*(h/row)
    m[use] = 0
    m._count = 0
    m._steps = steps
    m._t1 = getTimer()
    m._canStart = a%2==0? (b%2==0 ? 0 : 1) : (b%2==0 ? 1 : 0)
    with(m){
    beginFill(0x00,100)
    lineTo((w/row)+1,0)
    lineTo((w/row)+1,(h/col)+1)
    lineTo(0,(h/col)+1)
    endFill()
    }
    m.onEnterFrame = function(){
    if(this._canStart == true || this._parent._canStart == true){
    if(this._count >= this._steps){
    delete this.onEnterFrame;
    this._parent._canStart = true
    return
    }
    this[use] += 100/this._steps
    this._count++
    }
    }
    }
    _kk++
    }
    this.clip._alpha = 100
    this.clip.setMask( this.mask )
    }
    // --------------
    // transition 10
    // --------------
    ImageLoader.prototype.transition10 = function(){
    var w = this.clip._width
    var h = this.clip._height
    var num = 10
    var diff = 5
    var alpha_diff = 100/num
    var clip = this.clip
    for(var a = 0; a < num; a++){
    if(a > 0){
    var clip = this.createEmptyMovieClip('clip' + a, -(100 + a))
    clip._alpha = 0
    clip.loadMovie(this.clip._url)
    }
    clip._x = (-w) + (a*(diff++))
    var mask = this.createEmptyMovieClip('mask'+a,(100+a))
    mask._visible = 0
    with(mask){
    beginFill(0x00,100)
    lineTo(w,0)
    lineTo(w,h)
    lineTo(0,h)
    endFill()
    }
    }
    this.onEnterFrame = function(){
    _loaded = true
    for(var a = 1; a < num; a++){
    if (this['clip' + a]._url == this._url || this['clip' + a].getBytesLoaded () < this['clip' + a].getBytesTotal () || this['clip' + a].getBytesTotal () < 4) {
    var _loaded = false
    return;
    }
    }
    if(_loaded){
    for(var a = 0; a < num; a++){
    this['clip' + a]._alpha = 100 - (a*alpha_diff)
    this.clip._alpha = 100
    if(a==0){
    var clip = this.clip
    } else {
    var clip = this['clip'+a]
    }
    clip.count = 0
    clip.steps = steps
    clip.x_init = clip._x
    clip.setMask( this['mask'+a] )
    this['mask' + a]._visible = 1
    clip.onEnterFrame = function(){
    if(this._x + 10 >= 0){
    this._x = 0
    delete this.onEnterFrame;
    return
    }
    this._x += 10
    }
    }
    delete this.onEnterFrame
    }
    }
    }
    // --------------
    // transition 11
    // --------------
    ImageLoader.prototype.transition11 = function(){
    var w = this.clip._width
    var h = this.clip._height
    var num = 9
    var diff = 10
    var alpha_diff = 100/num
    var clip = this.clip
    var steps = 45
    for(var a = 0; a < num; a++){
    if(a > 0){
    var clip = this.createEmptyMovieClip('clip' + a, -(100 + a))
    clip._alpha = 0
    clip.loadMovie(this.clip._url)
    }
    var mask = this.createEmptyMovieClip('mask'+a,(100+a))
    mask._visible = 0
    mask._x = -(w + (a*diff++))
    mask._alpha = 40
    mask.steps = steps + num
    mask._k = 0
    mask._move = w/steps
    with(mask){
    beginFill(0x00,100)
    lineTo(w,0)
    lineTo(w,h)
    lineTo(0,h)
    endFill()
    }
    }
    this.onEnterFrame = function(){
    _loaded = true
    for(var a = 1; a < num; a++){
    if (this['clip' + a]._url == this._url || this['clip' + a].getBytesLoaded () < this['clip' + a].getBytesTotal () || this['clip' + a].getBytesTotal () < 4) {
    var _loaded = false
    return;
    }
    }
    if(_loaded){
    for(var a = 0; a < num; a++){
    if(a==0){
    var clip = this.clip
    } else {
    var clip = this['clip'+a]
    }
    clip._alpha = (100/(num+1))*(a+1)
    clip.setMask( this['mask'+a] )
    this['mask' + a]._visible = 1
    this['mask' + a].onEnterFrame = function(){
    if(this._x >= 0){
    this._x = 0
    this.unloadMovie()
    delete this.onEnterFrame;
    return;
    }
    this._x += this._move
    this._k++
    }
    }
    this['clip'+(a-1)]._alpha = 100
    delete this.onEnterFrame
    }
    }
    }

    Object.registerClass ("ImageLoader", ImageLoader);
    #endinitclip

  3. #3
    l'esempio è questo, a me basterebbe solo ke rimanessero gli effetti "tapparella"

    http://www.sephiroth.it/file_detail.php?id=124

    ora ho skoperto ke è di sepiroth!!!

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.