Groups | Blog | Home
all groups > flash actionscript > december 2005 >

flash actionscript : Cannot dynamically load a Button symbol



HenrieMediaInc
12/10/2005 3:35:41 PM
I have been trying to get the script below to work, but cannot. I would like to
load a button symbol and change the text for each item in my list. Everytime I
run the script below nothing happens. can you please help? Thank you very much!

var c = new LoadVars();
c.load("home.php");
c.onLoad = showContent;
function showContent() {
var i;
content.html = true;
content.htmlText = "";
for (i=0; i < this.n; i++) {
content.htmlText += "<li style='color:FFFFFF'><a href='" + this["url"+i] +
"'>"+ this["title"+i] + "</a></b><br><br>";
_root.attachMovie("area_txt_dynamic","my"+i+"_btn",i);
_root["my"+i+"_btn"]._x = 100+i*50; _root["my"+i+"_btn"]._y = 100;
_root["my"+i+"_btn"].label.text = this["title"+i];

}
}
stop();
kglad
12/10/2005 4:07:14 PM
HenrieMediaInc
12/10/2005 4:59:43 PM
kglad
12/10/2005 6:14:13 PM
if nothing in that script works, it's not returning those variables/values or
you have a combination of other problems possibly including no textfield with
instance name content and no movieclip with linkage id area_txt_dynamic that
contains a textfield with instance name label.
HenrieMediaInc
12/10/2005 11:37:39 PM
kglad
12/10/2005 11:44:52 PM
AddThis Social Bookmark Button