Einzelbildanimation "3D Rotation" onMouseUp abbremsen? [Flash CS3]
| 16.12.2008, 14:34 | | Beiträge: 1 Registriert: Dec 2008
| Einzelbildanimation "3D Rotation" onMouseUp abbremsen? Hallo zusammen!
Folgendes Problem:
Ich habe eine Einzelbildanimation bestehend aus 100 Bildern.
Diese ergeben zusammen eine 360Grad rotation einer Szene.
Das ganze liegt in einem Movieclip „photos“ auf der Hauptzeitleiste. Zudem habe ich auf der Hauptzeitleiste im Schlüsselbild „action“ ein Script, mit dem sich der film bzw. die Rotation über gleichzeitiges drücken und ziehen der linken Maustaste nach links und rechts steuern/rotieren lässt. Bis hierhin funktioniert das ganze einwandfrei.
Nun möchte ich, das beim loslassen der Maustaste die Rotation langsam abgebremst wird und nicht abrupt stehen bleibt!
Wie lässt sich das ganze realisieren?
Ich würde mich sehr über Hilfe freuen!!!
Anbei noch das für den Movieclip verwendete Script.
photos.stop();
var startX:Number;
var startFrame:Number;
var changeDistance:Number;
var travelDistance:Number;
photos.onPress = pressHandler;
photos.onRelease = releaseHandler;
photos.onReleaseOutside = releaseHandler;
function pressHandler():Void {
startX = photos._xmouse;
startFrame = photos._currentframe;
this.onMouseMove = moveHandler;
}
function releaseHandler():Void {
this.onMouseMove = null;
}
function moveHandler():Void {
changeDistance = Math.round((photos._xmouse - startX) / 10);
travelDistance = startFrame + changeDistance;
if (travelDistance > photos._totalframes) {
photos.gotoAndStop(travelDistance % photos._totalframes);
} else if (travelDistance < 0) {
photos.gotoAndStop(photos._totalframes + (travelDistance % photos._totalframes));
} else {
photos.gotoAndStop(travelDistance);
}
} | Geändert von FL_avio am 16.12.08 um 14:38 Uhr
| |
|
| 17.12.2008, 14:16 | Re1 | Beiträge: 3450 Registriert: Jul 2002
| Schau dir mal
ActionScript:1 2 3 4 5 6 | setInterval()
clearInterval()
// und
onEnterFrame()
// bzw
delete onEnterFrame
|
an.
---------------------------
LinUS - Flashhilfe Team
---------------------------
| |
| | Themen Ähnliche Beiträge zum Thema | 30.09.2010 - seppel.3 16.09.2009 - matzelarts 22.09.2010 - Executor 16.10.2009 - manuel.kleinert |
|
Flashhilfe.de Flash Platform Tipps & Tutorials Flash Platform Andere Programmiersprachen Jobangebote Diskussionen
Flashhilfe News 
31.01.12, 12:30#Jobs Wir suchen (freiberufliche) Flash Developer (m/w) in Köln/Aachen http://t.co/4WPsXPOA 20.01.12, 21:02#Jobs Flash-Projekt Produktkonfigurator http://t.co/qPlGSiPd 12.01.12, 18:50#Jobs Flash Freelancer für ca. 2 Wochen in München gesucht http://t.co/XpMJr5dv 10.01.12, 10:45#PureMVC vs #RobotLegs Performance Battle. PureMVC is significantly faster than RobotLegs in nearly every respect. http://t.co/324gWRAr 06.01.12, 21:37#Jobs Flash Developer in Hamburg gesucht http://t.co/hZgTZvHJ
Regeln & Bedingungen
|