Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 17-06-2005, 13:37   #1 (permalink)
Neuer User
 
Registriert seit: Jun 2004
Beiträge: 12
TXT ani & colorSet

Hallo Zusammen,

hab hier en problem mit der Farbpalette des textes

trackTextWriteOn("textMC", 100, "<font face='Arial' size='12' color='#000000'>"+mystring2+"</font>", 0, 0, "brown");

trackTextWriteOn("textMC", 50, "<font face='Arial' size='12' color='#000000'>"+mystring+"</font>", 0, 0, "grey");


er nimmt immer nur die letze cmd farbe für beide sets obwohl ich eine andere angegeben habe

achja für 2nd func myMC erstellen


/////////////////////////////////////////////////////
MovieClip.prototype.trackTextWriteOn = function(textMC, depth, str, startX, yOffset, colorSet) {
if (colorSet == "grey") {
colorSet1 = ["#cccccc", "#eeeeee", "#999999", "#666666", "#333333", "#000000"];
}
if (colorSet == "brown") {
colorSet1 = ["#2E2B21", "#544F3D", "#7E765A", "#A7A083", "#C9B9A9", "#D1C1B1"];
}
trace("TXT ANI STARTS");
this.createEmptyMovieClip(textMC, textMC, depth);
this[textMC]._x = startX;
this[textMC]._y = yOffset;
this[textMC].createTextField("txt", "txt", 0, 0, 150, 150);
// ////////////////////////////////////////////////////////////////////////
this[textMC].txt.multiline = false;
this[textMC].txt.selectable = false;
this[textMC].txt.autoSize = true;
this[textMC].txt.html = true;
this[textMC].txt.htmlText = "";
// ///////////////////////////////////////////////////////////////////////
this.strlength = str.length;
var i = 0;
var j = 5;
this.onEnterFrame = function() {
this.tempstring = "";
for (var l = 0; l<=j; l++) {
this.tempstring += str.charAt(l);
}
this.randomstring = "";
var s = 0;
for (var k = j; k<=Math.min(i, this.strlength-1); k++) {
s += 1;
switch (s) {
case 1 :
col = colorSet1[0];
break;
case 2 :
col = colorSet1[1];
break;
case 3 :
col = colorSet1[2];
break;
case 4 :
col = colorSet1[3];
break;
case 5 :
col = colorSet1[4];
break;
case 6 :
col = colorSet1[5];
break;
}
this.randomstring += "<font face='Arial' size='"+(this.textsize-s)+"' color='"+col+"'>"+String.fromCharCode(Math.floor(M ath.random()*15)+97)+"</font>";
}
this.resultstring = this.tempstring.substring(0, j)+this.randomstring;
if (j>=str.length) {
delete this.onEnterFrame;
}
if (this.strlength>20) {
i += 5;
j += 1.5;
} else {
i++;
j += .75;
}
this[textMC].txt.htmlText = this.resultstring;
};
};
mystring = "1111111111111111111111111111111111111111111111111 1111111111";
mystring2 = "2222222222222222222222222222222222222222222222222 22222222";
trackTextWriteOn("textMC", 50, "<font face='Arial' size='12' color='#000000'>"+mystring+"</font>", 0, 0, "grey");
myMC.trackTextWriteOn("textMC", 100, "<font face='Arial' size='12' color='#000000'>"+mystring2+"</font>", 0, 0, "brown");


thx

Brian
Brian2k ist offline   Mit Zitat antworten
Alt 17-06-2005, 15:45   #2 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
Versuchs mal mit unterschiedlichen Instanznamen, z.B. textMC1 und textMC2. Und dann versuch mal, den Prototype auch tatsächlich an einen MC zu hängen, im Augenblick scheint es so, als würde er an die Hauptzeitleiste gehängt...
  Mit Zitat antworten
Alt 17-06-2005, 18:56   #3 (permalink)
Neuer User
 
Registriert seit: Jun 2004
Beiträge: 12
re

Hi Holger,

Schade das will och ned klappen 8(


ich hab die *.fla angehängt
evtl kannste ja och testen wenn du lust & laune hast
ansonnsten jeder der Helfen möchte

gruss

brian
Angehängte Dateien
Dateityp: zip textEffect_array.zip (5,2 KB, 1x aufgerufen)
Brian2k ist offline   Mit Zitat antworten
Alt 17-06-2005, 20:55   #4 (permalink)
Neuer User
 
Registriert seit: Jun 2004
Beiträge: 12
Re

Hi Holger , habs gelöst

lag an ein paar fehlenden this.



gruss

Brian
Brian2k 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 07:38 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele