Hi,
I am trying to create a movieclip, load a jpg into it, and if successfull, create another movieclip (or even better: create that movieclip right away too), with a textfield in it, and place it under the loaded jpg, depending on the postion and height of the jpg. I tried something like this, but the jpg and text don’t show. I am sure it’s full of mistakes, and you probably don’t know where to start, but I was hoping someone could show me what is wrong:
this.createEmptyMovieClip("nieuwsfotoMC", 2);
nieuwsfotoMC._x = 15;
nieuwsfotoMC._y = 194;
var loadFoto:LoadVars = new LoadVars();
loadFoto.load("steef.jpg", nieuwsfotoMC);
loadFoto.onLoad = function(success) {
if (success) {
this.createEmptyMovieClip("NK1MC", 1);
NK1MC.createTextField("NK1", 2, 15, NK1MC._y, 165, 0);
NK1.multiline = true;
NK1.wordWrap = true;
var NK1fmt:TextFormat = new TextFormat();
NK1fmt.font = "Verdana";
NK1.size = 12;
NK1.setTextFormat(NK1fmt);
loadText = new LoadVars();
loadText.load("nieuwstekst.txt", 1);
loadText.onLoad = function(success) {
if (success) {
NK1MC.NK1.html = true;
NK1MC.NK1.htmlText = this.tekst;
NK1MC.NK1.autoSize = true;
NK1MC._y = nieuwsfotoMC._y+nieuwsfotoMC._height;
}
};
};
Thank you very much,
Jerryj.