Visualizzazione dei risultati da 1 a 3 su 3

Discussione: actionscript

  1. #1
    Utente di HTML.it L'avatar di Pepe91
    Registrato dal
    Jan 2005
    Messaggi
    218

    actionscript

    non mi funziona questa actionscript, riuscite a trovare qualche errore?

    codice:
    onClipEvent (mouseMove) {
    if (!premuto) {
    if (this.hitTest(_root._xmouse, _root._ymouse, false) && !aperto) {
    if (_currentframe>(_totalframes/2)) {
    gotoAndPlay (_totalframes-_currentframe);
    } else {
    play ();
    }
    aperto = true;
    } else if (!this.hitTest(_root._xmouse, _root._ymouse, false) && aperto) {
    if (_currentFrame<(_totalFrames/2)) {
    gotoAndPlay (_totalframes-_currentframe);
    } else {
    play ();
    }
    aperto = false;
    }
    onClipEvent (mouseDown) {
    if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
    gotoAndStop (11);
    _root.comandi(_parent._name);
    premuto = true;
    }
    }

  2. #2
    mancavano delle parentesi...

    prova così

    codice:
    onClipEvent (mouseMove) {
    if (!premuto) {
    if (this.hitTest(_root._xmouse, _root._ymouse, false) && !aperto) {
    if (_currentframe>(_totalframes/2)) {
    gotoAndPlay (_totalframes-_currentframe);
    } else {
    play ();
    }
    }
    aperto = true;
    } else if (!this.hitTest(_root._xmouse, _root._ymouse, false) && aperto) {
    if (_currentFrame<(_totalFrames/2)) {
    gotoAndPlay (_totalframes-_currentframe);
    } else {
    play ();
    }
    aperto = false;
    }
    }
    
    onClipEvent (mouseDown) {
    if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
    gotoAndStop (11);
    _root.comandi(_parent._name);
    premuto = true;
    }
    }
    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 Pepe91
    Registrato dal
    Jan 2005
    Messaggi
    218
    questa è la soluzione! c'ho messo un pò di tempo però... adesso funziona

    codice:
    onClipEvent (mouseMove) {
    	if (!premuto) {
    		if (this.hitTest(_root._xmouse, _root._ymouse, false) && !aperto) {
    			if (_currentframe>(_totalframes/2)) {
    				gotoAndPlay(_totalframes-_currentframe);
    			} else {
    				play();
    			}
    			aperto = true;
    		} else if (!this.hitTest(_root._xmouse, _root._ymouse, false) && aperto) {
    			if (_currentFrame<(_totalFrames/2)) {
    				gotoAndPlay(_totalframes-_currentframe);
    			} else {
    				play();
    			}
    			aperto = false;
    		}
    	}
    }
    onClipEvent (mouseDown) {
    	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
    		gotoAndStop(11);
    		_root.comandi(_parent._name);
    		premuto = true;
    	}
    }

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.