Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 17

Discussione: swapdepth

  1. #1

    swapdepth

    codice:
    this["Sponsor"]._xscale = 75;
    this["Sponsor"]._yscale = 75;
    
    this["Sponsor"].onRollOver = function() {
    	open_pic(this._name,150);
    };
    this["Sponsor"].onRollOut = function() {
    	close_pic(this._name,75);
    };
    for (i=1; i<=10; i++) {
    	this["B"+i].onRollOver = function() {
    		open_pic(this._name,150);
    	};
    	this["B"+i].onRollOut = function() {
    		close_pic(this._name,100);
    	};
    }
    stop();
    
    function open_pic(nome,Enlarge) {
    	this[nome].swapDepths(100);
    	this[nome].onEnterFrame = function() {
    		if (this._xscale<Enlarge) {
    			this._xscale = this._yscale += 5;
    		} else {
    			delete this.onEnterFrame;
    		}
    	};
    }
    
    function close_pic(nome,Reduce) {
    	this[nome].onEnterFrame = function() {		
    		if (this._xscale>Reduce) {
    			this._xscale = this._yscale -= 5;
    		} else {
    			delete this.onEnterFrame;
    		}
    	};
    }
    questo sul fraem 4 e tutto funziona.
    Il problema è che ho 2 pulsanti che mi fanno saltare al frame precedente(3) o al successivo (5) e se io ho fatto il rollover su uno dei miei oggetti al cambio frame l'oggetto su cui ho fatto il rollover non sparisce
    Perchè?

    ho questo script sul primo frame per i pulsanti next -prev
    codice:
    // If not defined yet, 
    if (isLoaded == undefined) {
    	
    	// Routine to move playhead to a new frame
    	var updateFrame = function (inc) {
    		
    		var newFrame = _currentframe + inc;
    		gotoAndStop(newFrame);
    	
    		if (_root._currentframe == 1) {
    			backBtn._alpha = 50;
    			backBtn.enabled = false;
    		} else {
    			backBtn._alpha = 100;
    			backBtn.enabled = true;
    		}
    		if (_root._currentframe == _root._totalframes) {
    			forwardBtn._alpha = 50;
    			forwardBtn.enabled = false;
    		} else {
    			forwardBtn._alpha = 100;
    			forwardBtn.enabled = true;	
    		}
    	}
    
    
    	// When the forward button is pressed
    	forwardBtn.onPress = function () {
    		updateFrame(1);
    		}
    
    	// When the back button is pressed
    	backBtn.onPress = function () {
    		updateFrame(-1);
    	}
    
    	// When the keyboard keys are pressed
    	var keyListener = new Object();
    	keyListener.onKeyDown = function () {
    		if (Key.isDown(37)) { 
    			// Left
    			updateFrame(-1);
    		} else if (Key.isDown(38)) { 
    			// Up
    			updateFrame(-(_currentframe-1));
    		} else if (Key.isDown(39)) { 
    			// Right
    			updateFrame(1);
    		} else if (Key.isDown(40)) { 
    			// Down
    			updateFrame(_totalFrames + 1);
    		}
    	}
    	Key.addListener(keyListener);	
    
    
    	// Call updateFrame at first to get button states correct at start
    	updateFrame();	
    }
    
    // Set loaded flag to prevent redefinition 
    this.isLoaded = true;
    stop();
    grazie
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  2. #2
    il problema credo che stia nel delete perchè prima do al clip un swapdepth(100) al rollover
    poi al next frame l'unico oggetto che rimane visibile anche se non dovrebbe è qllo su cui ho fatto il rollover e quindi lo swapdepth. dovrei farlo sparire non so se sono stato chiaro
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  3. #3
    Utente di HTML.it L'avatar di NAP
    Registrato dal
    Jan 2001
    Messaggi
    4,398
    Hai provato così ? :

    delete this [nome].onEnterFrame;
    A volte la diplomazia va condita con un pizzico di siluri fotonici. (K. Janeway)

  4. #4
    Originariamente inviato da NAP
    Hai provato così ? :

    delete this [nome].onEnterFrame;
    grazie nap ho provato ma non funge
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  5. #5
    ho anche provato una cosa tipo

    this[nome].swapDepths(++_root);

    sulla function close_pic
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  6. #6
    Originariamente inviato da enigma_79
    ho anche provato una cosa tipo

    this[nome].swapDepths(++_root);

    sulla function close_pic
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  7. #7
    nessuno sa come poter risolvere questo problema?
    VVoVe: :master:
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  8. #8
    possibile che nessuno sappia come risolvere.

    disperazione
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  9. #9
    up
    nessuno?
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

  10. #10
    up
    Consulenza aziendale a 360° http://www.gruppodg.it http://www.gruppodg.it/3d
    Realizzazione siti internet, Siti Flash, Ricerca Location per bar negozi , esercizi commerciali, sviluppo pratiche e allestimento

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.