Embedding Flash swf in Google Site displays NaN output but works in Debug mode
Hello,
I am loading a text file with three variables into a flash file (CS5). The flash file then calculates and prints the three values based on some calculations. I am storing the text file as an attachment on the google page in which I am embedding the swf file. What's weird is that the flash file plays correctly in debugging mode (i.e., prints the 3 variables correctly), but as soon as I upload the swf to the Google site page (as an attachment in the same location as the text file), the flash file outputs NaN. I am stuck as to why the file works in debug mode in Flash, but not when it's uploaded to the google site page. I have tried storing the text file on SharePoint and referencing it from there, but I get the same results when viewing the swf on the Google site page.
Is it because the google site page is using SSL?
I am fairly new to flash, so any help would be appreciated.
Thanks!
Lori
________________________
Variables.txt stores this: "current=6950&goal=7175&low=6950"
Here is the code in my flash file:
_global.getPercent = "";
myvars = new LoadVars();
myvars.load("variables.txt");
myvars.onLoad = function(success){
l = Number(myvars.low);
c = Number(myvars.current);
g = Number(myvars.goal);
getPercent = (c-l)/(g-l);
if (getPercent > 0) {
colorshow._height = (getPercent*colorshow._height);
} else {
colorshow._height = 0;
}
}
;
