Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 15-08-2005, 10:37   #1 (permalink)
Hobby Flasher
 
Benutzerbild von Mad Line
 
Registriert seit: Aug 2004
Ort: Gorleben
Beiträge: 115
Altes Tut

hallo
ich hab altes tut ausgegraben kann mir wer sagen wieso das nicht mehr in MX geht?

movieclip.prototype.fliege = function (tempo,wackeln) {
do {
_rotation += random(wackeln*2)-wackeln;
posX = _x+Math.cos((Math.PI*_rotation)/180)*tempo;
posY = _y+Math.sin((Math.PI*_rotation)/180)*tempo;
} while (posX<0+_width/2 || posY<0+_height/2 || posX>600-_width/2 || posY>450-_height/2);
_x = posX;
_y = posY;
}
__________________
"Der Grund, warum wir alle so gern von Anderen gut denken
ist der, dass wir uns vor uns selber fuerchten. Optimismus
beruht einzig auf Angst."

Pessimisten sind Optimisten, die einfach nur nachgedacht haben.

Mad der notorische Schwarzseher ;-)


www.FlashtoFlash.de/blog
Mad Line ist offline   Mit Zitat antworten
Alt 15-08-2005, 11:23   #2 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Hallo!
Ich weiß zwar nicht so recht, was das soll, aber seit MX ist Flash ja casesensitive - also: MovieClip (nicht movieclip).
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 15-08-2005, 18:50   #3 (permalink)
nobody is perfect
 
Benutzerbild von Decrone
 
Registriert seit: Apr 2002
Ort: Bremen
Beiträge: 3.049
Hi

ändere es mal in dieser Form um!

ActionScript:
  1. MovieClip.prototype.fliege = function (tempo,wackeln) {
  2. do {
  3. this._rotation += random(wackeln*2)-wackeln;
  4. this.posX = this._x+Math.cos((Math.PI*this._rotation)/180)*tempo;
  5. this.posY = this._y+Math.sin((Math.PI*this._rotation)/180)*tempo;
  6. } while (this.posX<0+this._width/2 || this.posY<0+this._height/2 || this.posX>600-this._width/2 || this.posY>450-this._height/2);
  7. this._x = this.posX;
  8. this._y = this.posY;
  9. }
  10. this.onEnterFrame = function(){
  11. mc_fliege.fliege(2, 3);
  12. }

oder so

ActionScript:
  1. MovieClip.prototype.fliege = function (tempo,wackeln) {
  2.     this.onEnterFrame = function(){
  3.         do {
  4.             this._rotation += random(wackeln*2)-wackeln;
  5.             this.posX = this._x+Math.cos((Math.PI*this._rotation)/180)*tempo;
  6.             this.posY = this._y+Math.sin((Math.PI*this._rotation)/180)*tempo;
  7.         } while (this.posX<0+this._width/2 || this.posY<0+this._height/2 || this.posX>600-this._width/2 || this.posY>450-this._height/2);
  8.         this._x = this.posX;
  9.         this._y = this.posY;
  10.     }
  11. }
  12.  
  13. mc_fliege.fliege(2, 3);

Gruss Dec
__________________
FF Unterstützen! Erste Hilfe! häufig gestellten Fragen
...................... ............... ................................

Geändert von Decrone (15-08-2005 um 18:58 Uhr)
Decrone 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 08:19 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele