Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 02-01-2007, 21:27   #1 (permalink)
Neuer User
 
Registriert seit: Jun 2006
Beiträge: 12
Bei RollOver MC zum Ziel bewegen

Also ich hab ne Frage...hab im Forum keine wirkliche Antwort gefunden:

Also ich hab ein MC1 das an den Ort kommt an den ich mit der Maus klicke. Und ein MC2 das der Muaus folgt. Aber ich möchte das sich das MC1 zu einem MC oder Button bewegt bei dem ich mit der Maus drüber gehe (Rollover)

Das bekomm ich irgenwie nicht hin! Hier das script aus MC1:

onClipEvent (load) {
friction = "0.28";
targetx = Random(300)+20;
targety = Random(300)+20
}

onClipEvent (enterFrame) {
mouse_x = int(targetx-this._x);
mouse_y = int(targety-this._y);
if (mouse_x>0 && mouse_y>0) {
quad = Number(4);
}

if (mouse_x<0 && mouse_y>0) {
quad = Number(1);
}

if (mouse_x<0 && mouse_y<0) {
quad = Number(2);
}

if (mouse_x>0 && mouse_y<0) {
quad = Number(3);
}

abs_x = Math.abs(mouse_x);
abs_y = Math.abs(mouse_y);
tg = abs_y/abs_x;
_root.maths = Math.atan(tg)*Number(180)/Math.PI;
if (quad == 1) { angle = number(90) - number(_root.maths) }
if (quad == 2) { angle = number(90) + number(_root.maths) }
if (quad == 3) { angle = number(270) - number(_root.maths) }
if (quad == 4) { angle = number(270) + number(_root.maths) }
if (not _root.done) { setProperty (_this, _rotation, angle); _root.done = true}
speedx = difx*friction;
speedy = dify*friction;
setProperty (this, _y, _root.object._y+speedy);
setProperty (this, _x, _root.object._x+speedx);
difx = int(targetx)-this._x;
dify = int(targety)-this._y;
}


Und hier das aus MC2:

onClipEvent (load) {
startDrag (this, true);
_root.drag = this;
}

onClipEvent (mouseDown) {
_root.difx = this._x- _root.object._x;
_root.object.targetx = this._x;
_root.dify = this._y- _root.object._y;
_root.object.targety = this._y;
_root.done = False
}


Danke im Vorraus! :-)

Vielleicht muss ich es einfach anders sagen: ich will wenn ich über ButtonA "rollOver" gehe, ein MovieClipB von einerbestimmten position zu ButtonA geht! Natürlich ohne Timeline! Vielleicht hab ich mich oben zu diffus ausgedrückt -.-'

DAnke für Hilfe :-)

Geändert von Shelob (03-01-2007 um 14:42 Uhr)
Shelob ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 17:39 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele