Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    e:Mousevent=null e e.target.name

    ciao,

    se dichiaro una funzione così

    function myf(e:MouseEvent=null):void {

    in modo da poterla richiamare anche senza alcun click, come faccio a sapere all'interno di essa se è stata invocata da un click di un pulsante?

    infatti trace(e.target.name); da null anche se ho cliccato.

    grazie.
    There is nothing conceptually better than Rock 'n' Roll.

    poker is very much like sex. most people think they're the best but don't know what they're doing.

  2. #2
    Utente di HTML.it L'avatar di and80
    Registrato dal
    Mar 2003
    Messaggi
    15,182
    Basta fare il confronto sul parametro dell'evento:

    Codice PHP:
    function myFoo (evt:MouseEvent=null):void {
        if (
    evt != null) {
            
    // azioni causate dal click
        
    } else {
            
    // azioni con evt assente
        
    }


  3. #3
    grazie.
    There is nothing conceptually better than Rock 'n' Roll.

    poker is very much like sex. most people think they're the best but don't know what they're doing.

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.