Visualizzazione dei risultati da 1 a 5 su 5

Discussione: pulsanti e tasti

  1. #1

    pulsanti e tasti

    salve a tutti, ho due pulsanti (p1 e p2) che mi gestiscono una galleria fotografica.

    premendo su p1 torno all'immagine precedente, se premo su p2 vado avanti.
    ho solo l'evento release che mi gestisce la cosa.

    ecco, come mai anche se premo le freccette direzionali sulla tastiera faccio funzionare i pulsanti?

    grazie! :)

  2. #2

    Re: pulsanti e tasti

    Originariamente inviato da var
    salve a tutti, ho due pulsanti (p1 e p2) che mi gestiscono una galleria fotografica.

    premendo su p1 torno all'immagine precedente, se premo su p2 vado avanti.
    ho solo l'evento release che mi gestisce la cosa.

    ecco, come mai anche se premo le freccette direzionali sulla tastiera faccio funzionare i pulsanti?

    grazie!
    posta il code.. che usi
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  3. #3
    premetto che non è tutta farina del mio sacco:

    codice:
    on (release) {
    
          // Locate the screen that is the target of the behavior
          if (n>0) n--; // questa è roba mia
    	  if (n==0) indicatore=""; else indicatore=n+"/24";
    	  if (n==0) descrizione=""; else descrizione=des[n-1]; // fine roba mia
    	  var screen = null;
          var target = this;
          while((screen == null) && (target != undefined) && (target != null))
          {
            if(target instanceof mx.screens.Screen)
            {
              screen = target;
            }
            else
            {
              target = target._parent;
            }
          }
          
          // If there's a Slide to apply the behavior to, then do so
          if(screen instanceof mx.screens.Slide)
          {
            screen.rootSlide.currentSlide.gotoPreviousSlide();
          }
    
    }
    questo è il codice per p1.

  4. #4
    infatti non vi è traccia dell'uso di tastiera..
    strano mai capitato! forse c'è altro code in giro..
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  5. #5
    Originariamente inviato da webbeloz
    infatti non vi è traccia dell'uso di tastiera..
    strano mai capitato! forse c'è altro code in giro..
    porca miseria, non vedo altro codice in giro...
    c'è solo quest'altra roba qui:

    codice:
    function updateButtons() {
    	// Check for first screen condition
    	if (this.firstSlide  == this.currentSlide) {
    		backBtn.enabled = false;
    		backBtn._alpha = 50;
    	} else {
    		backBtn.enabled = true;
    		backBtn._alpha = 100;
    	}
    	
    	
    	// Check for first screen condition
    	if (this.lastSlide  == this.currentSlide) {
    		forwardBtn.enabled = false;
    		forwardBtn._alpha = 50;
    	} else {
    		forwardBtn.enabled = true;
    		forwardBtn._alpha = 100;
    	}	  
    }
    
    
    this.revealChild = function () {
    	updateButtons();
    }
    
    this.addEventListener("revealChild", this);
    che, se ho ben capito, si occupa dell'attivare/disattivare i pulsanti alle estremità della galleria.

    che mi dici?

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.