Been working on some Randomize text effects in Actionscript…I havent quite figured out how to do so yet, but it wont stop me from trying new things with flash…I have seen these effects all over the net..Check the about www.simonrasmussen.com, www.nebojsanikolic.co, and of course www.yugop.com.
The below effects are quite simple mask effects with an invisible button for the event handler….
[kml_flashembed movie="/experiments/random_blog.swf" height="100" width="200" /]
The closest i have gotten to ActionScript verison is this code snippet here.
////////
var $speed = 50;
var $string = “This is the text to unjumble”;
Array.prototype.randomize = function() {
var i = this.length;
if (i == 0) return;
while (–i) {
var j = Math.floor(Math.random()*(i+1));
var tmp1 = this[i];
var tmp2 = this[j];
this[i] = tmp2;
this[j] = tmp1;
}
return this;
}
var $count = 1;
var $max = $string.length;
_root.animateInterval = setInterval(function() : Void {
var $startnormaltext = $string.substr(0, $count);
var $endjumbledtext = $string.substr($count, $max).split(”").randomize().join(”");
trace($startnormaltext + $endjumbledtext);
$count++;
if ($count == $max) { clearInterval(_root.animateInterval) };
}, $speed);
////////////