This content has been marked as final. Show 9 replies
to display code in this forum you should copy and paste your code using the attach code option.
as it is, your answer_1_btn onRelease has, at least, one syntax error. and saveXML doesn't look like it will be a well-formed xml object.
further, there's nothing in your code where you're trying to use finalans as a number so the flash compiler wouldn't generate a NaN error for that string.
Sorry about that and thanks for the reply. I know that NaN should not show up, but that is my response in the Trace section. Also, when I check the syntax, I come up with no errors. Again, I am trying to get these answers to show and they are not. I am baffled because the coding looks fine to me.
the coding doesn't look fine to me.
Oh, ok. I guess my reason for posting my question was because I thought something was wrong and was looking for some assistance. I would appreciate your help instead of just telling me it is not fine. Thank you.
i already did. again:
your answer_1_btn onRelease has, at least, one syntax error
saveXML doesn't look like it will be a well-formed xml object.
i know you don't see a syntax error so the code you posted doesn't match the code in your fla. so, to display code in this forum you should copy and paste your code using the attach code option.
Thanks for your help. Let me try this again.
Here is the exact coding again:
This first portion is 1 movie clip deep. The other 2 are 3 movie clips in.
This is straight from the fla file.
I am not seeing the syntax error on this. This is the coding that results in the NaN.
Also, could you explain more about the savexml not being a well formed object.
I appreciate your help. This coding was inherited from an Indian Company and we are trying to get it to work in a more complicated fla file while still interacting with our database in the same manner.
the compiler may not be giving you an error with your answer_1_btn.onRelease, but that's not good coding. even though flash will accept the lack of a left curly after an if-statement, that's not good coding.
next, use trace(saveXML) to see that you're not creating an xml structure.
and finally, your function maxtrycount() is referencing finalans which is going to be undefined because it lacks a path so when you try and load that to a string and then assign that to _parent._parent.finalans, you're going to get NaN.