PDA

View Full Version : Loadmovie and set text inside a movie within a scrollpane


drewboy
07-05-2004, 09:41 AM
Hello, this has been bugging me for the longest time. I have a movie with an instance name "profiles". This movie contains three image placeholders called imageHolder1, imageHolder2 and imageHolder3. Below these are dynamic text fields nameHolder1, nameHolder2 and nameHolder3. In the main stage, there's a script written in one frame that sets the images and text into their respective placeholders:


for(i=0;i<myXML1.firstChild.childNodes.length; i++){
profiles["imageHolder"+i].loadMovie("images/"+i+".jpg");
profiles["nameHolder"+i].text = a_titles1[i];
}


The codes above work like a charm, but I need to place "profiles" into a scrollpane (instance name "scrollpin"). I tried two methods. First, by just placing "profiles" aside where no one can see it and typed after the code above:

scrollpin.setScrollContent("profiles");

That doesn't work.

Next try, I deleted "profiles" from the stage and set the linkage via the library. The code before this works, but the images and text don't load at all. Is there something I'm missing? Please help. Thank you.