Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 25-04-2005, 13:44   #1 (permalink)
Fear & Loathing
 
Benutzerbild von Dr. Gonzo
 
Registriert seit: Oct 2003
Beiträge: 115
CurveTo Animation

hey,

möchte mit curveTo ne kleine actionscript animation erstellen bei der einfach ne linie leicht "schwingt" (verständlich??)

hier mal mein ansatz:

ActionScript:
  1. x=50
  2. y=100
  3.  
  4. _root.createEmptyMovieClip( "kreis", 1 );
  5. _root.kreis.onEnterFrame = function(){
  6.    
  7.     x += 5;
  8.     y += 5;
  9.     with ( _root.kreis )
  10.     {   
  11.         lineStyle( 0, 0x0000FF, 100 );
  12.         moveTo( 0, 0);
  13.         curveTo(100, x, 200, 200 );
  14.     }
  15.    
  16. }

das läuft soweit auch, nur bekomme ich natürlich pro enterFrame immer eine neue kurve gezeichnet und die alten kurven bleiben sichtbar (an sich ein schöner Effekt, aber eben nicht was is möchte)
Jemand ne idee wie ich immer nur die aktuelle kurve angezeigt bekomme?
für jede kurve nen extra mc scheint mir bissel umständlich und resourcen lastig zu sein !?!? (das ganze is für ne HP)
vielleicht irgendwie mit -delete- ???

ich komm einfach nicht drauf...

Geändert von Dr. Gonzo (25-04-2005 um 13:52 Uhr)
Dr. Gonzo ist offline   Mit Zitat antworten
Alt 25-04-2005, 13:48   #2 (permalink)
All-rounder
 
Benutzerbild von thebiz
 
Registriert seit: Mar 2004
Ort: Bayerische Rhön
Beiträge: 2.507
ActionScript:
  1. x = 50;
  2. y = 100;
  3. _root.createEmptyMovieClip("kreis", 1);
  4. _root.kreis.onEnterFrame = function() {
  5.     x += 5;
  6.     y += 5;
  7.     _root.kreis.clear();
  8.     with (_root.kreis) {
  9.         lineStyle(0, 0x0000FF, 100);
  10.         moveTo(0, 0);
  11.         curveTo(100, x, 200, 200);
  12.     }
  13. };
__________________

--------------------------------
Ich klicke, ergo bin ich. (me)
--------------------------------
thebiz ist offline   Mit Zitat antworten
Alt 25-04-2005, 13:55   #3 (permalink)
Fear & Loathing
 
Benutzerbild von Dr. Gonzo
 
Registriert seit: Oct 2003
Beiträge: 115
Lightbulb

ah Clear(),...natürlich !!!!

super, DANKE !!!!
Dr. Gonzo 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 03:18 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele