Visualizzazione dei risultati da 1 a 3 su 3

Discussione: drag e click

  1. #1

    drag e click

    co degli "oggetti" che al click devo aprire un pop-up, draggabili, e che siano sempre "su" on rollover.

    Il problema nasce qauando sposto un oggetto, quando lo rilascio mi apre (giustamente) il pop-up...
    Come faccio ad evitarlo?

    ciao e grazie

    on (press)
    {
    this.startDrag();
    }
    on (release)
    {getURL("javascript:inco('/xxxx/y.htm')");
    this.stopDrag();
    }
    on (rollOver)
    {
    gotoAndPlay(2);
    mx.behaviors.DepthControl.bringToFront(this);

    }
    on (rollOut)
    {
    gotoAndPlay(11);
    }

  2. #2
    Utente di HTML.it L'avatar di and80
    Registrato dal
    Mar 2003
    Messaggi
    15,182

    Re: drag e click

    penso che possa bastare questa verifica

    codice:
    on (press) {
    	xmov = _root._xmouse;
    	ymov = _root._ymouse;
    	this.startDrag();
    }
    on (release) {
    	if (xmov != _root._xmouse || ymov != _root._ymouse){
    		this.stopDrag();
    	} else {
    		getURL("javascript:inco('/xxxx/y.htm')");
    		this.stopDrag();
    	}
    }
    on (rollOver) {
    	gotoAndPlay(2);
    	mx.behaviors.DepthControl.bringToFront(this);
    }
    on (rollOut) {
    	gotoAndPlay(11);
    }
    l'unica mia perplessità sta nel fatto che se uno vuole cliccare e per errore trascina anche di pochissimo, il comando getURL non va, ma se ti serve così dovrebbe andare bene questo

  3. #3
    è perfetto.

    grazie.

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.