Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    1,199

    Script Solarizzazione al contrario

    Ciao buongiorno a tutti!!

    Ho questo script:

    Codice PHP:
    test_mc._alpha=100
    MovieClip
    .prototype.luminosita = function(){
        
    this.= new Color(test_mc)
        
    this.= {rb:255,gb:255,bb:255}
        
    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.= {rb:255,gb:255,bb:255}
                    
    this.up false;
                }
            }
            if(
    this.o.rb 0){
                
    this.= {rb:0,gb:0,bb:0}
                
    delete this.onEnterFrame;
            }
            
    this.c.setTransform(this.o)
        }
    }
    test_mc.luminosita(this); 
    che appliccato su un MC istanziato test_mc (con dentro una foto) effettua un effetto di solarizzazione IN ENTRATA.

    Come posso modificare lo script e dare un effetto al contrario IN USCITA

    Grazie

  2. #2
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    1,199

  3. #3
    Io modificando quella funzione per un lavoro avevo ottenuto questa

    codice:
    MovieClip.prototype.luminosita_out = function(){
        this.c = new Color(this)
        this.o = {rb:0,gb:0,bb:0}
        this.up = true
    	
        this.onEnterFrame = function(){
    
            if(this._alpha > 100){
                this._alpha -= 10
            }
            
            if(this.up == false){
                this.o.rb += 30
                this.o.bb += 30
                this.o.gb += 30
            } else {
                if(this.o.rb > 255){
                    this.o.rb /= 1.5
                    this.o.bb /= 3
                    this.o.gb /= 1.5
                } else {
                    this.o = {rb:0,gb:0,bb:0}
                    this.up = false;
                }
            }
      
            this.c.setTransform(this.o)
        }
    }
    Che appunto mi dava un effetto "in uscita". Prova un po se ti va bene

  4. #4
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    1,199
    no bronly, la sostituisco alla mia function ma non vā

  5. #5
    Utente di HTML.it
    Registrato dal
    May 2002
    Messaggi
    1,199
    porchč VVoVe:

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.