2nde
asked on
Loadvars command working on local machine but not downloading data on server
I have a flash movie that downloads a csv file from yahoo finance (stock quote feed) and parses the information then displays it in some dynamic text boxes.
The movie works fine when I view it on my local machine standalone player, however, when the swf is embedded in my aspx page it refuses to load the csv file data i.e. I just get nothing
somebody please give me direction!
The movie works fine when I view it on my local machine standalone player, however, when the swf is embedded in my aspx page it refuses to load the csv file data i.e. I just get nothing
somebody please give me direction!
var temp = new LoadVars();
var theFileObj = new LoadVars();
var theFile = temp.sendAndLoad("http://download.finance.yahoo.com/d/quotes.csv?s=AXC.TO&f=sl1d1t1c1ohgv&e=.csv", theFileObj, GET);
theFileObj.onData = function(src) {
var myDataProvider = new Array();
var theFileArray = src.split("\r\n");
var theFieldNames = theFileArray[0].split(",");
var numberOfFields = theFieldNames.length;
for (var j = 0; j<numberOfFields; j++) {
// Remove quotes from field names
theFieldNames[j] = removeQuotes(theFieldNames[j]);
trace(theFieldNames[j]);
//trace(j);
switch(j) {
case 1:
_root.price.text = "$" + theFieldNames[j] + " CAN";
var curr = theFieldNames[j];
case 4 :
_root.stockChange.text = "Change : " + theFieldNames[j];
case 5 :
_root.stockChange2.text = "Last Price : $" + theFieldNames[j] + " CAN";
var init = theFieldNames[j];
case 8 :
_root.vol.text = "Volume : " + theFieldNames[j];
}
}
_root.updated.text = "Updated " + theFieldNames[2] + " " + theFieldNames[3];
if (curr < init) {
_root.stock.gotoAndPlay("down");
}else{
_root.stock.gotoAndPlay("up");
}
};
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tried your suggestion, but now I'm having a new problem i.e. my aspx page gets a server timed out response when trying to download the csv info from the yahoo website ...
nutz