Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 23-07-2003, 16:00   #1 (permalink)
...
 
Registriert seit: Oct 2002
Ort: Nürnberg
Beiträge: 3.611
Math frage

hi, ich hab zwei punkte und einen pfeil, jetzt will ich, dass der pfeil immer (auf der verbindungslinie der punkte liegend auf ounk1 zeigt.
mein ansatzt:
ActionScript:
  1. this.drag1.onPress = function() {
  2.     this.startDrag();
  3. };
  4. this.drag1.onRelease = function() {
  5.     this.stopDrag();
  6. };
  7. this.drag2.onPress = function() {
  8.     this.startDrag();
  9. };
  10. this.drag2.onRelease = function() {
  11.     this.stopDrag();
  12. };
  13. this.pfeil.onEnterFrame = function() {
  14.     this._rotation = ((drag2._y-drag1._y)/(drag2._x-drag1._x))*360;
  15.     trace((drag2._y-drag1._y)/(drag2._x-drag1._x));
  16. };
thorben.schmitt ist offline   Mit Zitat antworten
Alt 23-07-2003, 17:17   #2 (permalink)
Hirnverbrannt
 
Benutzerbild von NastyFrog
 
Registriert seit: Aug 2001
Ort: AUSTRIA
Beiträge: 2.020
Hmm, hier mal eins, das dir rot zwischen dem MC auf dems liegt und der Maus einstellt.
ActionScript:
  1. _rotation = Math.atan( (_y-_root._ymouse)/(_x-_root._xmouse) )*180/Math.PI
__________________
50 Seiten hardcore ActionScript von den Grundlagen bis zu 3D Darstellungen.... eben eine Abendlektüre.

Dogs fucked the Pope, no fault of mine. Watch out! ... Why money? My name is Brinks; I was born ... born? Get sheep over side ... women and children to armored car ... orders from Captain Zeep.(Hunter S. Thompson)
NastyFrog 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 19:49 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele