men sedan kommer ett problem när jag skriver längre texter och vill sedan att det skall bli radbyte i flash.
hur gör man, skall jag sätta ut något ord i texten och göra en replace osv.
Har suttit och experimenterat lite och det verkar inte bättre än att man får lägga
till ett tecken där själva radbrytningen skall ske, i det här fallet |.
function getInfo(myInfo) {
var myInfo;
for (var count2 = 0; count2 <= myInfo.childNodes.length; count2++) {
if (myInfo.childNodes[count2].nodeName.toLowerCase() == infoName) {
infoDescription = myInfo.childNodes[count2].firstChild.[b]toString()[/b];
// Nu har vi fått tag på den node som vi vill ha
[b]var pos;
while ((pos = infoDescription.indexOf("|")) >= 0) {
infoDescription = infoDescription.substr(0, pos) + "\n" + infoDescription.substr(pos + 1, infoDescription.length);
}[/b]
_root.show_text.text = infoDescription;
// här hämtar vi infon i noden
_root.show_headline.text = myInfo.childNodes[count2].attributes.name;
// Här hämtar vi attributet "name"
_root.show_size.text = myInfo.childNodes[count2].attributes.size;
// Här hämtar vi attributet "size"
pic = myInfo.childNodes[count2].attributes.load;
// Här hämtar vi attributet "load"
loadMovie(pic, _root.load_show);
//we load the swf into an empty MC
}
}
}