I must appologise to you H. because your droptarget solution works... the only thing was that the mouse pointer must be within the target to trigger the doptarget property!

It will be much easier to do that then test all the movieclips on the stage at every mousemove!

Thanks again

8-)

elibol wrote:

Hi Eric,

The _droptarget property changes before you 'release' a movieclip. It
changes whenever the majority of the area of the movieclip is over something
other than what is taking up the majority of the area at that instance. I
accually made sure this was the case before I posted because I was sure that
you would need the target before it was droped.

As for your other problems, you should gather as much information as you can
about the anatomy of the movieclips that need to be triggered if you arent
able to collaborate with your partners. If you're able to collaborate with
the developer that is creating the targets, you should have him construct an
abstract API for each target so you can 'question' any of the movieclips for
a movieclip group style identifier; which will allow you to differentiate
one target from the next without loops.

Good luck,

H


On 11/3/05, Éric Thibault <[EMAIL PROTECTED]> wrote:
Thanks....

I've tried it with no success because the droptarget property is only
initialised once the dragged mc is droped! Is there another property
that can say over wich instance the dragged mc is?

Thanks a million!

elibol wrote:

Hi Eric,

Maybe a more optimized solution would be to have an onMouseMove event on
the
movieclip that is being dragged, which would be activated when the
movieclip
is dragged, that would run eval on the clips _droptarget property for
each
onMouseMove event. Each target could have a distinguishing public
property
that would be evaluated with the hitTest that would serve as the
exception
for triggering the onRollOver function. The dragging clip would also do a
onRollOut trigger on the last clip it was over once the clip is no longer
over the target.

I tested this:

var lastMC:MovieClip;

function onPress(){
this.startDrag();
onMouseMove = runOnMouseMove;
}

function runOnMouseMove(){
var t = eval(this._droptarget);
trace(t);
if(t!=lastMC){
if(lastMC.isTarget){
lastMC.onRollOut();
lastMC = undefined;
}
if(t.isTarget){
lastMC = t;
t.onRollOver();
}
}
}

function onRelease(){
this.stopDrag();
onMouseMove = undefined;
}

onReleaseOutside = onRelease;


Good luck,

H


On 11/2/05, Éric Thibault <[EMAIL PROTECTED]> wrote:


Hi all!

I have an application that uses startdrag events.

My problem is that I have about 20 targets with rollover events (each
hilighting a different portion of a radiography). When I drag an MC
over those targerts, the rollover dont get triggered! Is there a way to
pass the mouse event under my dragged MC to trigger my rollovers? To
temporary solve this (an get a demo working) I've put en onenterframe
inside each of my targets that checkes if the mouse is over them!

There must be a better way to do that!

Thanks a million! :-)

--
===============================================================

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===============================================================

Avis relatif à la confidentialité / Notice of Confidentiality /
Advertencia de confidencialidad <
http://www.rec.ulaval.ca/lce/securite/confidentialite.htm>

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
===============================================================

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===============================================================

Avis relatif à la confidentialité / Notice of Confidentiality /
Advertencia de confidencialidad <
http://www.rec.ulaval.ca/lce/securite/confidentialite.htm>

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--
===============================================================

Éric Thibault
Programmeur analyste
Réseau de valorisation de l'enseignement
Université Laval, pavillon Félix-Antoine Savard
Québec, Canada
Tel.: 656-2131 poste 18015
Courriel : [EMAIL PROTECTED]

===============================================================

Avis relatif à la confidentialité / Notice of Confidentiality / Advertencia de 
confidencialidad <http://www.rec.ulaval.ca/lce/securite/confidentialite.htm>

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to