RE: [Flashcoders] random char

2008-04-30 Thread Cor
Corban,

You can see this work at www.badmintonclubnetwerk.nl , choose menu Fotos

Good luck

Cor van Dooren




//Animate character
//If you rotate the dynamic textfield you must Embed Fonts
TextField.prototype.CycleLetters = function(targetText:String,
speed:Number):Void {
var me:TextField = this;
var i:Number = 0;

var letters:Array = Array();
var numbers:Array = Array(0,1,2,3,4,5,6,7,8,9);
var chars:Array = Array();

for(i=0; i=targetText.length) {
clearInterval(intervalId1);
//Walking through chars
var intervalId2 = setInterval(function () {
var currentText:String = me.text;
var newText:String = "";
var letter:String = "";

for(i=0; i<=currentText.length; i++) {
if (currentText.substr(i, 1) !=
targetText.substr(i, 1)) {
letter =
letters[random(letters.length)];
newText += letter;
} else {
newText +=
currentText.substr(i, 1);
}
}
me.text = newText;
if (targetText == newText) {
clearInterval(intervalId2);
}
updateAfterEvent();
}, speed);
/
}
updateAfterEvent();
}, speed);
};

//On stage create a dynamic text field named txtTest,
//How smaller the number the faster it goes
txtTest.CycleLetters("HERE COMES YOUR TEXT ! ", 20);



 

No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.524 / Virus Database: 269.23.6/1404 - Release Date: 29-4-2008
18:27
 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] random char

2008-04-29 Thread Pedro Taranto
you can download the code, why dont you port it to AS2?

--
Pedro Taranto


On Tue, Apr 29, 2008 at 5:53 PM, Corban Baxter <[EMAIL PROTECTED]> wrote:

> hey guys I'm looking for a little help with doing something similar to
> this:
> http://www.zeuslabs.us/2008/01/17/source-code-for-custom-textfields-with-cool-effects/.
> ..
> but in AS2. Can someone point me in the right direction? thanks!
>
> --
> Corban Baxter
> http://www.projectx4.com
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] random char

2008-04-29 Thread Corban Baxter
hey guys I'm looking for a little help with doing something similar to
this: 
http://www.zeuslabs.us/2008/01/17/source-code-for-custom-textfields-with-cool-effects/...
but in AS2. Can someone point me in the right direction? thanks!

-- 
Corban Baxter
http://www.projectx4.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders