Unfortunately that doesn't display the image at all. I've double and triple checked to make sure that URL is right also, and it is. Is there something that I'm missing?
Hrm... problems again -_- Before, I was doing it in a seperate swf to get it working before i tried to make it work w/ the site i'm building. It worked great in the test swf I made. But, now that I put it into my actual movie, it's no longer working. -_-
Originally posted by Jaelle_MJ Hrm... problems again -_- Before, I was doing it in a seperate swf to get it working before i tried to make it work w/ the site i'm building. It worked great in the test swf I made. But, now that I put it into my actual movie, it's no longer working. -_-
the condenseWhite is supposed to take out extra white space. Eventually i'm going to be loading an xml file into that text box, but I haven't gotten that far yet, since the image refuses to work.
I'm 99.9% sure the path is right. My directory structure is like this:
It was supposed to fix a possible formatting problem that can occur w/ the xml. However, it seems to work fine w/out it as well. The image still doesn't show up either way though.
hmmm ok what i'm saying is... that means you're referencing something else, an mc or textfield named "label" which makes me wonder if we're targetting the right thing
Ok... now I'm confused. So I just tried to make it simpler. The label.condenseWhite there isn't causing me any problems as of yet. I take it out completely and it still works fine. The image still doesn't appear tho.
I'm going to attempt to explain again in more detail.
The non-simplified version of what I have in my movie is:
maybe this'll help
open a new fla, paste this in frame 1, publish, save, close.
code:
var z:Number = 0;
var tf:TextFormat = new TextFormat();
//add your text formats here
this.createEmptyMovieClip("table", ++z);
function textblock(n, x, y, s) {
var k = _level0.table.createEmptyMovieClip(n, ++z);
k.createTextField("tx", 0, x, y, 220, 15);
k.tx.html = true;
k.tx.htmlText = s;
k.tx.setTextFormat(tf);
}
var x:XML = new XML();
x.ignoreWhite = true;
x.load("jaelle.xml");//change jaelle.xml to the name of your xml sheet
x.onLoad = function(success) {
if (success) {
for (i=0; i<x.childNodes.length; i++) {
j = i*80;
textblock("fieldA"+i, 0, j, x.childNodes[i].childNodes[0].childNodes);
textblock("fieldB"+i, 0, j+15, x.childNodes[i].childNodes[1].childNodes);
textblock("fieldC"+i, 0, j+30, x.childNodes[i].childNodes[2].childNodes);
textblock("fieldD"+i, 0, j+45, x.childNodes[i].childNodes[3].childNodes);
textblock("pic"+i, 300, j, "<img src='"+x.childNodes[i].childNodes[4].childNodes+"'>");
}
}
};