Visualizzazione dei risultati da 1 a 5 su 5

Discussione: MX movimento elastico

  1. #1

    MX movimento elastico

    Ciao atutti ho uno script che mi ingrandisce con un movimento elastico un rettangolo:

    onClipEvent (load) {
    this.acc = 6.0;
    this.ine = 1.5;
    this.endw = 518;
    this.endh = 368;
    }
    onClipEvent (enterFrame) {
    this.dw = (this.dw + (this.endw - this._width) / this.acc) / this.ine;
    this.dh = (this.dh + (this.endh - this._height)/ this.acc) / this.ine;
    this._width += this.dw;
    this._height+= this.dh;



    }

    però finito questo movimento io vorrei che passasse al fotogramma due come faccio a dirglielo?.....con gotoAndPlay("due"); non funziona.Dove sbaglio?
    Grazie mille

  2. #2
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    codice:
    onClipEvent (load) {
    	this.acc = 6.0;
    	this.ine = 1.5;
    	this.endw = 518;
    	this.endh = 368;
    	this.move = true;
    }
    onClipEvent (enterFrame) {
    	if(this.move){
    		this.dw = (this.dw + (this.endw - this._width) / this.acc) / this.ine;
    		this.dh = (this.dh + (this.endh - this._height) / this.acc) / this.ine;
    		this._width += this.dw;
    		this._height += this.dh;
    		if(Math.abs(this._height - this.endh) < 1 && Math.abs(this._width - this.endw) < 1){
    			this.gotoAndPlay(2)
    			this.move = false;
    		}
    	}
    }

  3. #3
    ... grazie mille , ma l'ho applicato sul mio clip ma non và al fotogramma due!
    Come mai?
    grazie

  4. #4
    Utente di HTML.it L'avatar di gioska
    Registrato dal
    Jul 2002
    Messaggi
    327
    cosi va.


    onClipEvent (load) {
    this.acc = 6.0;
    this.ine = 1.5;
    this.endw = 518;
    this.endh = 368;
    this.move = true;
    }
    onClipEvent (enterFrame) {
    if (this.move) {
    this.dw = (this.dw+(this.endw-this._width)/this.acc)/this.ine;
    this.dh = (this.dh+(this.endh-this._height)/this.acc)/this.ine;
    this._width += this.dw;
    this._height += this.dh;
    if (Math.abs(this._height-this.endh)<1 && Math.abs(this._width-this.endw)<1) {
    _root.gotoAndStop(2);
    this.move = false;
    }
    }
    }

  5. #5
    ... yes funziona ... bastava mettere _root e gotoAndStop?
    Grazie io non ci sono arrivata! :adhone:
    Grazie mille!

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.