# Flash/xm/txt/css ...need help again..goin nuts ;)

**URL:** <https://forum.kirupa.com/t/flash-xm-txt-css-need-help-again-goin-nuts/124857>\
**Category:** Uncategorized\
**Created:** [October 7, 2004, 11:57am UTC](https://forum.kirupa.com/t/flash-xm-txt-css-need-help-again-goin-nuts/124857 "2004-10-07T11:57:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoodz](https://avatars.discourse-cdn.com/v4/letter/h/13edae/32.png) [@hoodz](https://forum.kirupa.com/u/hoodz)\
**Post date:** [October 7, 2004, 11:57am UTC](https://forum.kirupa.com/t/flash-xm-txt-css-need-help-again-goin-nuts/124857/1 "2004-10-07T11:57:18Z")

</div>

i want to combine this:

[color=red]var thumb\_spacing = 40;  
var description\_lv = new LoadVars();  
description\_lv.onData = function(raw\_text){  
description\_txt.htmlText = raw\_text;  
}[/color]  
[color=red][/color]

[color=red]function GeneratePortfolio(portfolio\_xml){  
var portfolioPictures = portfolio\_xml.firstChild.childNodes;  
for (var i = 0; i \< portfolioPictures.length; i++){  
var currentPicture = portfolioPictures\*;

var currentThumb\_mc = menu\_mc.createEmptyMovieClip(“thumbnail\_mc”+i,i);  
currentThumb\_mc.\_x = i \* thumb\_spacing;

currentThumb\_mc.createEmptyMovieClip(“thumb\_container”,0);  
currentThumb\_mc.thumb\_container.loadMovie(currentPicture.attributes.thumb);

currentThumb\_mc.title = currentPicture.attributes.title;  
currentThumb\_mc.image = currentPicture.attributes.image;  
currentThumb\_mc.description = currentPicture.attributes.description;

currentThumb\_mc.onRollOver = currentThumb\_mc.onDragOver = function(){  
info\_txt.text = this.title;  
}  
currentThumb\_mc.onRollOut = currentThumb\_mc.onDragOut = function(){  
info\_txt.text = “”;  
}  
currentThumb\_mc.onRelease = function(){  
image\_mc.loadMovie(this.image);  
description\_lv.load(this.description);  
}  
}  
}[/color]

[color=red]var portfolio\_xml = new XML();  
portfolio\_xml.ignoreWhite = true;  
portfolio\_xml.onLoad = function(success){  
if (success) GeneratePortfolio(this);  
else trace(“Error loading XML file”); // no success? trace error (wont be seen on web)  
}  
portfolio\_xml.load(“webdsign.xml”);[/color]  
[color=black][/color]  
[color=black]with this:[/color]

[color=blue]var format = new TextField.StyleSheet();  
var path = “[/color][[color=blue]http://www.kirupa.com/developer/mx2004/code/flash.css[/color]](http://www.kirupa.com/developer/mx2004/code/flash.css)[color=blue]”;[/color]  
[color=blue]format.load(path);  
format.onLoad = function(success) {  
if (success) {  
output.styleSheet = format;  
myLoadVar = new LoadVars ();  
portfolio\_xml.load(“webdsign.xml”)  
myLoadVar.onLoad = function (success){  
if (success == true) {  
description\_txt.variable = “portfolio”  
description\_txt.htmlText=myLoadVar.portfolio;  
}  
}[/color]

[color=black]So i want the discription\_txt of script part 1 to have a ccs style  
and i really run out of ideas with this, ive been messing around for hours and still no so i hope somebody can help :)[/color]  
[color=red][color=black][/color]

[/color]
