Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 27-07-2004, 01:56   #1 (permalink)
Neuer User
 
Registriert seit: May 2004
Beiträge: 22
Konturen und Füllfarbe getrennt ansprechen

Hallo,

wie kann ich bei einem Movieclip the Füllfarbe und die Outlinecolor per Actionscript getrennt ansprechen?

Basti
Phoenix130481 ist offline   Mit Zitat antworten
Alt 27-07-2004, 06:23   #2 (permalink)
Flashaholic
 
Benutzerbild von atothek
 
Registriert seit: Feb 2003
Ort: Berlin
Beiträge: 1.459
getrennt geht das nur wenn du das shape mit script erstellt hast oder mit nem workaround in dem du einen outlineMc und einen fillMc erstellst.

hier mal ne einfache script variante

ActionScript:
  1. this.drawRectangle = function(pMc, pW, pH, pFillColor, pLineColor) {
  2.     /*
  3.     * erzeugen des linien stils es gibt nur solid linien
  4.     * lineStyle(linienStärle, linienFarbe, linienAlpha)
  5.     */
  6.     pMc.lineStyle(1, pLineColor, 100);
  7.    
  8.     /*
  9.     * beginFill(füllFarbe, füllAlpha);
  10.     */
  11.     pMc.beginFill(pFillColor, 100);
  12.    
  13.     pMc.lineTo(pW, 0);
  14.     pMc.lineTo(pW, pH);
  15.     pMc.lineTo(0, pH);
  16.     pMc.lineTo(0, 0);
  17.    
  18.     pMc.endFill();
  19. };
  20. /* leeren mc erzeugen */
  21. this.createEmptyMovieClip("testMc", 1);
  22.  
  23. /* in leeren mc zeichnen */
  24. this.drawRectangle(this.testMc, 100, 100, 0xff6600, 0xaa6600);

so hier nochmal ne workaround variante
du hast nen mc "shapeMc" in diesem sind nun "lineMc" und "fillMc"
ActionScript:
  1. var lC = newColor(shapeMc.lineMc);
  2. lC.setRGB(0xff0000);
  3.  
  4. var fC = new Color(shapeMc.fillMc);
  5. fC.setRGB(0x00ff33);
__________________
TVNEXT Solutions

Geändert von atothek (27-07-2004 um 06:28 Uhr)
atothek ist offline   Mit Zitat antworten
Alt 27-07-2004, 12:41   #3 (permalink)
Neuer User
 
Registriert seit: May 2004
Beiträge: 22
Hallo,

vielen vielen Dank für deine Tips. Jetzt kann ich das ganze noch nen bisschen dynamischer machen.

Cheers,

Basti

Geändert von Phoenix130481 (27-07-2004 um 13:42 Uhr)
Phoenix130481 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 20:41 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele