Nimroy
Community Manager Threadersteller
Dabei seit: 26.05.2004
Ort: zwischen Köln und D'dorf
Alter: 46
Geschlecht:
|
Verfasst Do 31.03.2005 09:28
Titel Button mit Textanimation per AS bei rollOver |
|
|
So, nachdem ich soviele Informationen wie möglich schon in die Überschrift gepackt habe, weiß ja eigentlich jeder worum es geht.
Ich möchte gerne einen Button basteln, der wie folgt funktioniert:
Auf: Ganz normaler Text, i.d.R. ein Wort
Darüber: Die Buchstaben des Wortes werden per Skript zufällig ersetzt mit neuen Buchstaben. Danach sollen sie per Animation solange per Zufall ersetzt werden, bis das ursprüngliche Wort erschienen ist.
Mein bisheriger Ansatz sieht so aus, dass jeder Buchstabe ein eigenes Textfeld mit einer Variablen ist. Im Movie ist dem Button dann folgendes Skript zugewiesen:
Code: |
on (rollOver)
{
_root.buchstabe1=String.fromCharCode(random(26)+65 );
_root.buchstabe2=String.fromCharCode(random(26)+97 );
_root.buchstabe3=String.fromCharCode(random(26)+97 );
_root.buchstabe4=String.fromCharCode(random(26)+97 );
_root.buchstabe5=String.fromCharCode(random(26)+97 );
_root.buchstabe6=String.fromCharCode(random(26)+97 );
_root.buchstabe7=String.fromCharCode(random(26)+97 );
_root.buchstabe8=String.fromCharCode(random(26)+97 );
_root.buchstabe9=String.fromCharCode(random(26)+97 );
while (_root.buchstabe1!="A")
_root.buchstabe1=String.fromCharCode(random(26)+65 );
while (_root.buchstabe2!="k")
_root.buchstabe2=String.fromCharCode(random(26)+97 );
while (_root.buchstabe3!="t")
_root.buchstabe3=String.fromCharCode(random(26)+97 );
while (_root.buchstabe4!="u")
_root.buchstabe4=String.fromCharCode(random(26)+97 );
while (_root.buchstabe5!="e")
_root.buchstabe5=String.fromCharCode(random(26)+97 );
while (_root.buchstabe6!="l")
_root.buchstabe6=String.fromCharCode(random(26)+97 );
while (_root.buchstabe7!="l")
_root.buchstabe7=String.fromCharCode(random(26)+97 );
while (_root.buchstabe8!="e")
_root.buchstabe8=String.fromCharCode(random(26)+97 );
while (_root.buchstabe9!="s")
_root.buchstabe9=String.fromCharCode(random(26)+97 );
} |
Das funktioniert leider nicht. Also, nicht so wie ich es will. Die Programm-Logik wird schon ausgeführt, nur zeigt er mir nicht die Zwischenschritte an. Das soll halt so ein bißchen aussehen, wie diese Tafeln in Bahnhöfen oder Flughäfen.
Danke im voraus,
der Nimroy
|
|