Maus-Schrift - Verfolger [Flash 6]
| Beiträge: 6981 Wohnort: München Registriert: Jan 2002
| 13.06.2002, 12:14
Einfach ins erste Frame kopieren:ActionScript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | text = "flashhilfe.de :: Community ::";
abbremsen = 4;
drift = 13;
langsamer = 1.80;
anzahl_symbole=(b_array=text.split("")).length;
meinFormat = new TextFormat();
meinFormat.color = 0x000000;
meinFormat.font = "Arial";
meinFormat.size = 11;
createEmptyMovieClip("b0", 1);
b0.startDrag(true);
for(j=1;j<=anzahl_symbole;j++) {
createTextField("b"+j,j+1,j,0,20,20);
this["b"+j].text = b_array[j-1];
this["b"+j].selectable = false;
this["b"+j].setTextFormat(meinFormat);
}
b0.onEnterFrame = function() {
for(i=1;i<=anzahl_symbole;) {
_root["b"+i].x_speed = (_root["b"+i].x_speed+(_root["b"+(i-1)].x_value+drift-_root["b"+i].x_value)*1/abbremsen)/langsamer;
_root["b"+i].y_speed = (_root["b"+i].y_speed+(_root["b"+(i-1)].y_value-_root["b"+i].y_value)*1/abbremsen)/langsamer;
_root["b"+i].x_value += _root["b"+i].x_speed;
_root["b"+i].y_value += _root["b"+i++].y_speed;
}
this.x_value = this._x;
this.y_value = this._y;
while(i>=1) {
_root["b"+i]._x = _root["b"+i].x_value;
_root["b"+i]._y = _root["b"+i--].y_value;
}
}
|
...ist ne Ableitung vom Flashkurs: Maus-Schrift.
Grüsse,
Sebastian Wichmann
-----------------
flashhilfe - Team
http://www.flashhilfe.de JavaScript & JavaFX Freelancer || Flashhilfe @ Twitter || XING Profil | Geändert von Sebastian am 13.06.02 um 12:51 Uhr | |
| | Beiträge: 6981 Wohnort: München Registriert: Jan 2002
Themenautor/in
| 06.04.2004, 15:31
Flash 7 Version:
ActionScript:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | text = "flashhilfe.de :: Community ::";
abbremsen = 4;
drift = 13;
langsamer = 1.80;
anzahl_symbole=(b_array=text.split("")).length;
meinFormat = new TextFormat();
meinFormat.color = 0x000000;
meinFormat.font = "Arial";
meinFormat.size = 11;
this.createEmptyMovieClip("b0", 1);
b0.startDrag(true);
b0.x_speed =
b0.y_speed =
b0.x_value =
b0.y_value = 0;
for(j=1;j<=anzahl_symbole;j++) {
this.createTextField("b"+j,j+1,j,0,20,20);
this["b"+j].text = b_array[j-1];
this["b"+j].selectable = false;
this["b"+j].setTextFormat(meinFormat);
this["b"+j].x_speed =
this["b"+j].y_speed =
this["b"+j].x_value =
this["b"+j].y_value = 0;
}
b0.onEnterFrame = function() {
for(i=1;i<=anzahl_symbole;) {
_root["b"+i].x_speed = (_root["b"+i].x_speed+(_root["b"+(i-1)].x_value+drift-_root["b"+i].x_value)*1/abbremsen)/langsamer;
_root["b"+i].y_speed = (_root["b"+i].y_speed+(_root["b"+(i-1)].y_value-_root["b"+i].y_value)*1/abbremsen)/langsamer;
_root["b"+i].x_value += _root["b"+i].x_speed;
_root["b"+i].y_value += _root["b"+i++].y_speed;
}
this.x_value = this._x;
this.y_value = this._y;
while(i>=1) {
_root["b"+i]._x = _root["b"+i].x_value;
_root["b"+i]._y = _root["b"+i--].y_value;
}
}
|
Grüsse,
Sebastian Wichmann
Flashhilfe.de Webmaster
http://www.flashhilfe.deJavaScript & JavaFX Freelancer || Flashhilfe @ Twitter || XING Profil | |
| Ähnliche Beiträge zum Thema | 01.05.2020 - cg-creativedesign |
|
Flashhilfe.de Flash Platform Tipps & Tutorials Flash Platform Andere Programmiersprachen Jobangebote Diskussionen
Flashhilfe News 
Regeln & Bedingungen
|