Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 17-08-2004, 16:01   #1 (permalink)
lernwillig
 
Benutzerbild von 23012
 
Registriert seit: Jan 2002
Ort: auf dem Land
Beiträge: 1.327
Mein Moskito zuckt so komisch

Hallo,
mit diesem kleinen Skript (abgeleitet von FS-Magnet)
---------
onClipEvent (mouseMove) {
startDrag(this,true);
mouse.Hide();
x = _root._xmouse-_x;
y = _root._ymouse-_y;
_rotation = (Math.atan2(y, x)/ (Math.PI / 180) - 270);
}
----------
ziehe ich einen Movieclip (Moskito, Kopf voran) auf der Bühne
umher. Hat jemand eine Idee, wie ich die unkontrollierten
Zuckungen wegbekomme?
Danke im voraus
23012
__________________
[TUTORIAL] Nahtlose Muster erstellen in Photoshop
23012 ist offline   Mit Zitat antworten
Alt 17-08-2004, 18:03   #2 (permalink)
aka stauby
 
Benutzerbild von webdust
 
Registriert seit: Mar 2004
Ort: Würzburg
Beiträge: 705
Hab mal ein bisschen rumgespielt:

ActionScript:
  1. onClipEvent (mouseMove) {
  2. startDrag(this,true);
  3. mouse.Hide();
  4. x = _root._xmouse-_x;
  5. y = _root._ymouse-_y;
  6. rotat_neu = (Math.atan2(y, x)/ (Math.PI / 180) - 270);
  7. diff = (rotat_neu-rotat_alt)*(rotat_neu-rotat_alt)
  8.  
  9. if(diff<50) {
  10.     _rotation = rotat_neu;
  11.     }
  12. rotat_alt = rotat_neu;
  13.  
  14. }
__________________
"The things you own end up owning you."
webdust ist offline   Mit Zitat antworten
Alt 17-08-2004, 19:16   #3 (permalink)
lernwillig
 
Benutzerbild von 23012
 
Registriert seit: Jan 2002
Ort: auf dem Land
Beiträge: 1.327
Danke Stauby,
viel besser so!
Gruss
23012
__________________
[TUTORIAL] Nahtlose Muster erstellen in Photoshop
23012 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 22:56 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele