Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 19-09-2003, 19:07   #1 (permalink)
Revived @ Sunday
 
Benutzerbild von MacEvil
 
Registriert seit: Apr 2003
Ort: Nowhereland
Beiträge: 3.244
onRollOver change Color = Performance suckt !

Hi Flasher,
ich habe hier per Draw API einige Mcs gezeichnet, die bei rollOver eine neue Farbe bekommen...
Aber beim drüberrollen ruckelt es ziemlich fest...
Wo ist das Performanceteufelchen ?

ActionScript:
  1. MovieClip.prototype.createTile = function(x, y, w,nwcl) {
  2.     this.lineStyle(1, 0x000000, 100);
  3.     this.moveTo(x, y);
  4.     this.beginFill(0x000099, 20);
  5.     this.lineTo(w+x, y);
  6.     this.lineTo(w+x, y+w);
  7.     this.lineTo(x, y+w);
  8.     this.lineTo(x, y);
  9.     this.endFill();
  10.     nwcl = new Color(this);
  11.     this.onRollOver = function() {
  12.         nwcl.setRGB(0x009900);
  13.     };
  14.     this.onRollOut = function() {
  15.         nwcl.setRGB(0x000099);
  16.     };
  17. };
  18. _root.onEnterFrame = function() {
  19.     for (i=1; i<=25; i++) {
  20.         _root.createEmptyMovieClip("mc"+i, i+1);
  21.         _root["mc"+i].createTile(i*5, i*2, 50,"a"+i);
  22.         _root["mc"+i]._x = 100;
  23.         _root["mc"+i]._y = 100;
  24.             }
  25. };

P.S.: Code einfach ins erste Frame tun..

Gruss,

MacEvil

Geändert von MacEvil (19-09-2003 um 19:08 Uhr)
MacEvil ist offline   Mit Zitat antworten
Alt 19-09-2003, 20:13   #2 (permalink)
_//\\#//\\_
 
Benutzerbild von warrantmaster
 
Registriert seit: Jan 2003
Beiträge: 7.060
ActionScript:
  1. _root.onEnterFrame = function() {
  2.         for (i=1; i<=25; i++) {
  3.                 _root.createEmptyMovieClip("mc"+i, i+1);
  4.                 _root["mc"+i].createTile(i*5, i*2, 50,"a"+i);
  5.                 _root["mc"+i]._x = 100;
  6.                 _root["mc"+i]._y = 100;
  7.         }
  8.         delete this.onEnterFrame;//<--------da
  9. };

warrantmaster ist offline   Mit Zitat antworten
Alt 19-09-2003, 20:49   #3 (permalink)
Geomatik-Flasher
 
Benutzerbild von Totty
 
Registriert seit: Aug 2002
Ort: Karlsruhe
Beiträge: 162
'tschuldigung...
War ein Gehirnfurtz!!!
__________________
Where in this small-thinking world can I find a longitude without a platitude?

Geändert von Totty (19-09-2003 um 20:52 Uhr)
Totty ist offline   Mit Zitat antworten
Alt 19-09-2003, 20:53   #4 (permalink)
Revived @ Sunday
 
Benutzerbild von MacEvil
 
Registriert seit: Apr 2003
Ort: Nowhereland
Beiträge: 3.244
@ Totty :
Guckst du oben
@ warrant :
hehe das macht's ja derb aus - thx
MacEvil ist offline   Mit Zitat antworten
Alt 19-09-2003, 20:55   #5 (permalink)
_//\\#//\\_
 
Benutzerbild von warrantmaster
 
Registriert seit: Jan 2003
Beiträge: 7.060
ActionScript:
  1. totty==macevil ? trace("doppel-id ist schaiße") : trace("oups...da hat sich jemand vertan") ;
warrantmaster ist offline   Mit Zitat antworten
Alt 19-09-2003, 20:58   #6 (permalink)
_//\\#//\\_
 
Benutzerbild von warrantmaster
 
Registriert seit: Jan 2003
Beiträge: 7.060
@mac

nun ja, wenn du das onenterframe mal so richtig betrachtest....

du hast befohlen: mach genau das, was in den nächsten zeilen steht, bei jedem durchlauf (hähä...stell dir das mal bei fps 100 vor)

warrantmaster ist offline   Mit Zitat antworten
Alt 19-09-2003, 21:17   #7 (permalink)
Revived @ Sunday
 
Benutzerbild von MacEvil
 
Registriert seit: Apr 2003
Ort: Nowhereland
Beiträge: 3.244
Hey warrant, was soll denn das mit dem Totty ???

Frage doch mal rena, da die IP's ja gespeichert sind
MacEvil ist offline   Mit Zitat antworten
Alt 19-09-2003, 23:50   #8 (permalink)
_//\\#//\\_
 
Benutzerbild von warrantmaster
 
Registriert seit: Jan 2003
Beiträge: 7.060
@mac..
(dann zieht halt das "else" )
warrantmaster ist offline   Mit Zitat antworten
Alt 20-09-2003, 07:58   #9 (permalink)
Revived @ Sunday
 
Benutzerbild von MacEvil
 
Registriert seit: Apr 2003
Ort: Nowhereland
Beiträge: 3.244
Jaja, schon gut hab mich nur bisschen aufgeregt...
Btw. warum gibt es eigentlich anscheinend solce Leute die das tun..
Können ja grad einen Account haben und damit "ihre Posts sammeln"
MacEvil ist offline   Mit Zitat antworten
Alt 20-09-2003, 12:27   #10 (permalink)
Geomatik-Flasher
 
Benutzerbild von Totty
 
Registriert seit: Aug 2002
Ort: Karlsruhe
Beiträge: 162
'tschuldigung...

Kann doch mal vorkommen, daß man sich so'ne Sch...e zusammenschreibt...
Kaum auf 'Abschicken' gedrückt treibt es einem dann die Schamesröte ins Gesicht... ... Und schnell löschen...!!!
Aber trotzdem:
ActionScript:
  1. (Totty!=MacEvil)==true
__________________
Where in this small-thinking world can I find a longitude without a platitude?
Totty 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 00:00 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele