Here is a the code on found that will animate the text on the screeen as the mouse moves. I am trying to set the size and color of the text,but having no luck. Also I added the code that is on a movieclip called “controller” Please help
text = “I saw the best minds of my generation destroyed by madness, starving hysterical naked,
dragging themselves through the negro streets at dawn looking for an angry fix,
angelheaded hipsters burning for the ancient heavenly connection to the starry dynamo in the machinery of night… – Howl, Ginsberg.”;
[COLOR=blue]myTF = new TextFormat;[/COLOR]
[COLOR=blue]myTF.font = “Arial”;[/COLOR]
[COLOR=blue]myTF.size = 20;[/COLOR]
[COLOR=blue]myTF.color = 0x663399;[/COLOR]
[COLOR=blue]text.setTextFormat(myTF);[/COLOR]
//
// How many characters per line max?
// Note that if any word has more characters
// than this limit, the script will crash.
//
charWidth = 50;
// Function to convert text into array with no more than
// charWidth chars in each index.
function parseText (input, lineWidth) {
var text = new Array();
text = input.split(" “);
var lineArray = new Array();
var j = 0;
var total = 0;
for (var k = 0; klineWidth) {
j++;
k–;
total = 0;
continue;
} else {
// Otherwise, add this word to the current index
lineArray[j] += text[k]+” ";
total += text[k].length+1;
}
}
// Remove final space from each index (save on MC duplication)
for (var s = 0; s
code on movieclip
// Row and col start at 0
onClipEvent (load) {
row = 0;
col = 0;
_parent.attachMovie(‘blank’, ‘textMC’, 20);
_parent.textMC._x = 20;
_parent.textMC._y = 20;
}
onClipEvent (mouseMove) {
letterCount++;
col++;
if (letterCount<=_parent.totalCharsClipped) {
// If we’re over the charWidth limit, or we’ve reached the
// end of this line of text, reset to next line
if (col>_parent.charWidth or col>_parent.text[row].length) {
col = 1;
row++;
}
if (_parent.text[row].charAt(col-1) != "
") {
// If this char isn’t a newline char, duplicate an
// MC for it and animate it
_parent.textMC.attachMovie(‘transform’, ‘box’+letterCount, letterCount+100);
target = _parent.textMC[‘box’+letterCount];
target._x = col*8;
target._y = (row+1)*20;
target.letter.letter = _parent.text[row].charAt(col-1);
} else {
// Newline char; reset to start of next line
col = 1;
row++;
}
} else {
// Animation of the text has now finished. You can trigger
// an event here if you wish. Keep in mind that this code will still be
// executed every time the mouse is moved, so you may want to
// remove this MC now…
}
}