Replace your script with the attached.
Note: the keyword 'this' inside the LoadVars onLoad handler points to the
LoadVars object. To reference the buttons you can use this.mvOpenArticle0 and
this.mvOpenArticle1 because 'this' now refers to the 'current' mc (without an
instance name in your fla BTW). I think you will get it but if you have any
questions...
Another matter: (a positive, constructive remark...)
You should try to put all of your code outside of your objects and put it on
frame 1 of your movie in a seperate layer. All of your objects should have
instance names to do this. Not only is it better and advised coding practise
but it's much easier to read and to correct, changed a few months from now...
and there are more reasons not to put the code on the objects themselves.
And... it is easier to get help. Only few are willing to examine a file with
all the code scattered around.
onClipEvent(load){
lvIn = new LoadVars();
lvIn.load("
http://www.moonark.com/content/getNewArticles.php");
lvIn.onLoad = function(success) {
if (success) {
if (this.error !== undefined)
{
}
else
{
txtID0.text = this.ID0;
txtDate0.text = this.Posted0;
txtSummary0.text = this.Summary0;
txtID1.text = this.ID1;
txtDate1.text = this.Posted1;
txtSummary1.text = this.Summary1;
}
}
}
this.mvOpenArticle0.onRelease=function(){
trace("Clicked Article 0");
trace(txtID0.text);
getURL("
http://www.moonark.com/content/getArticle.php?ID="+txtID0.text);
}
this.mvOpenArticle1.onRelease=function(){
trace("Clicked Article 1");
trace(txtID1.text);
getURL("
http://www.moonark.com/content/getArticle.php?ID="+txtID1.text);
}
}