all groups > flash data integration > may 2007 >
You're in the

flash data integration

group:

"undefine" error


"undefine" error Gr8flash
5/10/2007 10:30:58 PM
flash data integration:
Here is the piece of my code:
if (this["projectName"+three] != "") {
_global.projectFile3 = this["projectFile"+three];
heading3_txt.htmlText = this["projectName"+three];
content3_txt.htmlText = this["description"+three];
if (this["thumbnail"+three] != "") {
picHolder3_mc.loadMovie("images/"+this["thumbnail"+three]);
}
} else if (this["projectName"+three] == "") {
content3_txt.htmlText = "";
heading3_txt.htmlText = "";
}

It is for a portfolio thingie i am working on. My script pulls the data from
the db three records at a time and displays it. the problem is on the last
"else if" statment. If there is only 2 items left to display, the third listing
is suppose to put in blanks, but instead it places "undefined" in both
instances. Any ideas? thanks...
Re: "undefine" error JackGordon
5/11/2007 2:29:02 PM
if it's showing undefined, then it's registering this["projectName" + three] as
equaling undefined, so I would try changing the else if statement to something
like:

else if (this["projectName" + three] == undefined) {
//statements
}

Don't put quotes around undefined as this is a key work that isn't actually
read as a string literal.
Re: "undefine" error Gr8flash
5/11/2007 6:43:53 PM
I actually tried that... and tried just "=" instead of ==
Re: "undefine" error MotionMaker
5/14/2007 2:24:27 PM
before the first if statement try
trace(this["projectFile" + three]);
trace(this["projectName" + three]);
trace(this["description" + three]);
Those will reveal what data is controlling the if statements
AddThis Social Bookmark Button