amccool
03-23-2007, 02:47 PM
Hello!
I'm having som problem with a dynamic created textfield.
The text wont show up, just like its transparent. I've tried to
add the property .embedFont and cacheasbitmap but nothing works!
Here is my code:
var filearr = Array();
function loadfiles(i) {
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xFFFFFF;
my_fmt.font = 'Arial';
my_fmt.size = 12;
container[i] = files.createEmptyMovieClip("c" + i, files.getNextHighestDepth());
mcLoader.loadClip('interface/flash/themes/miami/icons/ms_word.png', container[i]);
filearr[i] = container[i].createTextField("f" + i, container[i].getNextHighestDepth(), 0, 0, 100, 60);
filearr[i]._visible = true;
filearr[i].embedFonts = true;
filearr[i].cacheAsBitmap = true;
filearr[i].autoSize = true;
filearr[i].text = 'TTTT';
filearr[i].setTextFormat(my_fmt);
files._width = 180;
files._visible = true;
if (i == filelist.length-1) {
setTimeout(function () {progressing._visible=''; progressing._visible = false;}, 300);
}
}
loadfiles(0);
Hope someone can help me out, this is killing me....
/Adrian
I'm having som problem with a dynamic created textfield.
The text wont show up, just like its transparent. I've tried to
add the property .embedFont and cacheasbitmap but nothing works!
Here is my code:
var filearr = Array();
function loadfiles(i) {
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xFFFFFF;
my_fmt.font = 'Arial';
my_fmt.size = 12;
container[i] = files.createEmptyMovieClip("c" + i, files.getNextHighestDepth());
mcLoader.loadClip('interface/flash/themes/miami/icons/ms_word.png', container[i]);
filearr[i] = container[i].createTextField("f" + i, container[i].getNextHighestDepth(), 0, 0, 100, 60);
filearr[i]._visible = true;
filearr[i].embedFonts = true;
filearr[i].cacheAsBitmap = true;
filearr[i].autoSize = true;
filearr[i].text = 'TTTT';
filearr[i].setTextFormat(my_fmt);
files._width = 180;
files._visible = true;
if (i == filelist.length-1) {
setTimeout(function () {progressing._visible=''; progressing._visible = false;}, 300);
}
}
loadfiles(0);
Hope someone can help me out, this is killing me....
/Adrian