Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 25-09-2006, 00:49   #1 (permalink)
Neuer User
 
Benutzerbild von chronoo
 
Registriert seit: Sep 2006
Beiträge: 11
Flash 6 AS geht in Flash 8 nicht.

Guten abend ihr allwissenden Flashgurus

Ich hab folgendes Problem:

Code:
MovieClip.prototype.schnee = function(pObj, pAnzahl, pBreite, pHoehe) {
	for (var i = 0; i<=pAnzahl; i++) {
		this.attachMovie(pObj, "flocke"+i, i);
		this["flocke"+i]._x = Math.round(Math.random()*pBreite);
		this["flocke"+i]._y = Math.round(Math.random()*pHoehe);
		this["flocke"+i].faktor = ((this["flocke"+i]._alpha=Math.random()*100));
		this["flocke"+i]._height = (this["flocke"+i]._width=500/this["flocke"+i].faktor);
		this["flocke"+i].zufall = 1+(Math.random()*5);
		this["flocke"+i].onEnterFrame = function() {
			this.kante = pBreite+this._width;
			this.spos = -this._width;
			this.xpos = this._x;
			this.tempo += this.zufall;
			this.rad = (this.tempo/180)*Math.PI;
			if (this.rad>Math.PI*2) {
				this.rad = this.rad-Math.PI*2;
			}
			if (this.xpos<this.kante) {
				this._x = this._x+this.zufall;
				this._y = this._y+Math.cos(this.rad);
			} else {
				this._x = this.spos;
			}
		};
	}
};
schnee("fClip", 100, Stage.width, Stage.height);
Dieses Script ist für Flash MX 6 geschrieben worden. In Flash 8 funktioniert es soweit auch, nur fliegen die Blasen (hier der MC "fClip") keine bögen mehr sondern bewegen sich einfach linear von links nach rechts. Wo liegt das Problem und wie kann man das Script für Flash 8 umschreiben?

Vielen dank schonmal für alle die sich damit auseinandersetzen.
chronoo ist offline   Mit Zitat antworten
Alt 25-09-2006, 08:53   #2 (permalink)
.
 
Registriert seit: May 2003
Ort: bayern
Beiträge: 1.117
du mußt tempo zunächst definieren, also
PHP-Code:
this["flocke"+i].tempo 0
jetzt kann es im onEnterFrame-event auch modifiziert werden, gib doch einfach mal in deinem onEnterFrame event ein trace(this.tempo) ein, dann siehst du was ich meine.
__________________
[mooseMash]
mooseMash ist offline   Mit Zitat antworten
Alt 25-09-2006, 09:50   #3 (permalink)
Neuer User
 
Benutzerbild von chronoo
 
Registriert seit: Sep 2006
Beiträge: 11
hey, es klappt. Vielen dank
chronoo 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 09:57 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele