copic
Threadersteller
Dabei seit: 09.07.2004
Ort: Stuttgart
Alter: 42
Geschlecht:
|
Verfasst Mo 27.06.2005 09:22
Titel [Flash MX 2004] - kombination aus hitTest und onRollOver?! |
|
|
aloah!
meine problematik ist folgende: ich habe zwei mcs - einer dragable (object) - der andere nicht (area). nun möchte ich, dass sich 'area' einfärbt, während ich 'object' drüberziehe [im onPress-zustand]. habe es schon mit onRollOver und einer weiteren hitTest-funktion probiert - scheint nicht zu funktionieren
Code: |
baseX = object._x;
baseY = object._y;
object.onPress = function() {
this.startDrag(true);
};
object.onRelease = function() {
this.stopDrag();
if (this.hitTest(area)) {
this._x = area._x;
this._y = area._y;
this.gotoAndStop(2);
this.enabled = false;
} else {
this._x = baseX;
this._y = baseY;
}
};
|
|
|