Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 15-02-2005, 19:44   #1 (permalink)
Neuer User
 
Registriert seit: Feb 2003
Beiträge: 96
delete~FRAGE

Hi leuts,

habe 2 mc´s als buttons. auf diesen liegt das folgende skript. Dieses steuert per AS einige ander mc´s. Klappt prima...nur das Problem leigt dabei das es nur einmal leuft und beim zweiten mal nicht!?!

habe schon mit delete this.onEnterFrame probiert, will aber nicht....

hier das skript, und nicht erschrecken,,,versuche mich erst an AS!

Code:
stop();
_root.platz1.inhalt_mc.hinterrahmen.zu.onPress = function() {
	_root.platz1.inhalt_mc.home_mc.gotoAndPlay(135);
	_root.platz1.inhalt_mc.hinterrahmen.onEnterFrame = function() {
		_root.platz1.inhalt_mc.hinter.onEnterFrame = function() {
			y = -390;
			pos = this._y;
			move = y-pos;
			this._y += move/10;
			if (Math.round(this._y) == y) {
				_root.platz1.inhalt_mc.hinterrahmen.onEnterFrame = function() {
					x = 287;
					pos = this._x;
					move = x-pos;
					this._x += move/10;
					if (Math.round(this._x) == x) {
						_root.platz1.inhalt_mc.hinterrahmen.auf.onEnterFrame = function() {
							x = -121;
							pos = this._x;
							move = x-pos;
							this._x += move/4;
							delete this.onEnterFrame;
						};
					}
				};
			}
		};
	};
};
_root.platz1.inhalt_mc.hinterrahmen.auf.onPress = function() {
	_root.platz1.inhalt_mc.home_mc.gotoAndPlay(2);
	_root.platz1.inhalt_mc.hinter.onEnterFrame = function() {
		_root.platz1.inhalt_mc.hinterrahmen.auf.onEnterFrame = function() {
			x = 172;
			pos = this._x;
			move = x-pos;
			this._x += move/5;
			_root.platz1.inhalt_mc.hinterrahmen.onEnterFrame = function() {
				x = 0;
				pos = this._x;
				move = x-pos;
				this._x += move/10;
				if (Math.round(this._x) == x) {
					_root.platz1.inhalt_mc.hinter.onEnterFrame = function() {
						y = 0;
						pos = this._y;
						move = y-pos;
						this._y += move/10;
						delete this.onEnterFrame;
					};
				}
			};
		};
	};
};
speedhugo ist offline   Mit Zitat antworten
Alt 15-02-2005, 20:06   #2 (permalink)
muh
 
Benutzerbild von Janoscharlipp
 
Registriert seit: Apr 2002
Ort: Freiburg / Stuttgart
Beiträge: 4.338
sieht seltsam aus, wie wäre es, du "entschachteltest" den Code erstmal?
Du kannst die ganzen Funktionen zwischenspeichern, dann werden sie auch nicht immer neu erzeugt, und belegen neuen Speicher...
__________________
»Carpe diem«, sagte der Graf. (Terry Pratchett: Ruhig Blut!)
Janoscharlipp ist offline   Mit Zitat antworten
Alt 15-02-2005, 20:07   #3 (permalink)
Nix Wisser
 
Benutzerbild von nullidee
 
Registriert seit: May 2003
Ort: Würzburg, Kleinstadt
Beiträge: 3.510
ehrlich gesagt blicke ich da nicht ganz durch,

was willst du denn erreichen? irgendwohin moven und wenn erreicht was anderes irgendwohin?

sind mir zu viele onEnterFrame ineinander verschachtelt.

[edit OT]
@ Janoscharlipp: kann es sein, daß deine Sig meinen Computer nicht mag?
der wird immer so langsam
__________________
nullidee

Abakus GT 10² Kugeln - 80"Leinwand - CARAN D´ACHE SUPRACOLOR®

Geändert von nullidee (15-02-2005 um 20:12 Uhr)
nullidee 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 02:02 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele