This is similar to the thread about fitting boxes to an area.
I've got this:
MovieClip.prototype.FadeIn = function() {
this._alpha = randomBetween(-200, 0);
this.onEnterFrame = function() {
if (this._alpha < 100) {
this._alpha += 10;
}
};
};
function randomBetween(a, b) {
return Math.min(a, b) + random(Math.abs(a - b) + 1);
}
var textMessage = "Very long string here. Pellentesque habitant morbi
tristique senectus et netus et malesuada fames ac turpis egestas. Nulla
ullamcorper. Praesent nunc nisi, lacinia at, mattis eget, blandit a, lacus.
Praesent vel lacus vitae ante vulputate auctor. Class aptent taciti sociosqu
ad litora torquent per conubia nostra, per inceptos hymenaeos. Duis velit.
Proin cursus mi ac erat. Nunc vel purus. Morbi mauris. Vivamus mauris.
Vestibulum posuere interdum nunc. Sed ac ante sed nulla tempus adipiscing.";
var positioning = 60;
var letterSpacing = 30;
for (i = 0; i < textMessage.length; i++) {
var mc = textToDuplicate.duplicateMovieClip("letterDuplicate" + i, i);
mc._x = positioning;
mc.WhatLetter = textMessage.charAt(i);
mc.FadeIn();
positioning += letterSpacing;
}
Works fine if it's one line, but how to make this wrap in a give area? Is
it possible to adapt the code given for the previous question of how to fit
squares in an area?
Thanks much.
fM.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com