Visualizzazione dei risultati da 1 a 2 su 2

Discussione: FADE IN/OUT

  1. #1

    FADE IN/OUT

    Salve a tutti,

    come potrei rendere questo script un loop continuo?

    onClipEvent (load) {
    this._alpha = 50;
    torna = false;
    }
    onClipEvent (enterFrame) {
    if (this._alpha<100 && torna == false) {
    this._alpha += 5;
    }
    if (this._alpha>=100 && torna == false) {
    tempo = getTimer();
    torna = true;
    }
    if (torna) {
    newTime = getTimer();
    if (newTime-tempo>2000 && _alpha>50) {
    _alpha -= 5;
    }
    }
    }

    Grazie in anticipo a tutti.
    En la habana hay una pila 'e locos!

  2. #2
    Utente di HTML.it
    Registrato dal
    Dec 2004
    Messaggi
    641
    prova così
    codice:
    onClipEvent (load) { 
    	this._alpha = 50; 
    	torna = false; 
    } 
    onClipEvent (enterFrame) { 
    	if (this._alpha<100 && torna == false) { 
    		this._alpha += 5; 
    	} 
    	if (this._alpha>=100 && torna == false) { 
    		tempo = getTimer(); 
    		torna = true; 
    	} 
    	if (torna) { 
    		newTime = getTimer(); 
    		if (newTime-tempo>1000 && _alpha>50) { 
    			_alpha -= 5; 
    		} 
    	} 
    	if (this._alpha<=50 && torna == true) { 
    		torna = false
    	} 
    }

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.