I am actionscript neophyte so to speak, I am loading scores from a text file with the following format
filelist=100,95,78,90,80
when attaching this to a button I am not envoking the trace function, nothing happens. This works fine without attaching it to a button--- it doesn't work when adding the onrelase and the closing curly bracket. Any help with syntax would be great.
Thanks
[as]
on (release, keyPress "<Enter>") {
files = new Array();
lv = new LoadVars();
lv.onLoad = function() {
fl = this.filelist;
data = fl.split(",");
for (var i in data) {data = Number(data);}
n = data.length;
myColor= colorHex.slice(0,n);
//gotoAndPlay (2);{
trace(data);
};
lv.load("scores.txt");
}
[/as]
filelist=100,95,78,90,80
when attaching this to a button I am not envoking the trace function, nothing happens. This works fine without attaching it to a button--- it doesn't work when adding the onrelase and the closing curly bracket. Any help with syntax would be great.
Thanks
[as]
on (release, keyPress "<Enter>") {
files = new Array();
lv = new LoadVars();
lv.onLoad = function() {
fl = this.filelist;
data = fl.split(",");
for (var i in data) {data = Number(data);}
n = data.length;
myColor= colorHex.slice(0,n);
//gotoAndPlay (2);{
trace(data);
};
lv.load("scores.txt");
}
[/as]