Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 05-03-2006, 19:52   #1 (permalink)
Neuer User
 
Registriert seit: Mar 2006
Beiträge: 1
Langsame Animation

Ich habe eine kleine Übung gemacht, wo ich einen Kreis (mc_circle) über eine x-Achse steuern möchte. Wenn der btn_links gedrückt wird, bewegt sich der Kreis nach links, mit der rechten Taste steuert man ihn nach rechts. Dabei soll die Bewegung langsam ablaufen. Das tut sie aber nicht, sondern der Kreis springt von einem linken Ende zum rechten.

Wie kann ich eine langsame Bewegung des mc_circle erreichen?
Die Änderung der fps hat nichts gebracht.

Code:
stop();

_root.btn_links.onRelease = function () {
	while (_root.mc_circle._x > 90.5) {
		_root.mc_circle._x = _root.mc_circle._x-1;
    	trace (_root.mc_circle._x);
	}
};

_root.btn_rechts.onRelease = function () {
	while (_root.mc_circle._x < 416) {
		_root.mc_circle._x = _root.mc_circle._x+1;
    	trace (_root.mc_circle._x);
	}
};
Vielen Dank
Daniel
Dleisegang ist offline   Mit Zitat antworten
Alt 05-03-2006, 20:26   #2 (permalink)
Achim Math.PI
 
Benutzerbild von bloba
 
Registriert seit: Jul 2001
Ort: cool Colonia
Beiträge: 11.642
PHP-Code:
_root.btn_links.onRelease = function() {
    
_root.mc_circle.onEnterFrame = function() {
        if (
_root.mc_circle._x>90.5) {
            
_root.mc_circle._x _root.mc_circle._x-1;
            
trace(_root.mc_circle._x);
        }
    };
};
_root.btn_rechts.onRelease = function() {
    
_root.mc_circle.onEnterFrame = function() {
        if (
_root.mc_circle._x<416) {
            
_root.mc_circle._x _root.mc_circle._x+1;
            
trace(_root.mc_circle._x);
        }
    };
}; 
__________________
gruß bloba

2 x onkel² b_d
bloba 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:19 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele