PDA

View Full Version : Variable Problem


sycross
03-19-2005, 03:57 AM
I don't know what's wrong but my dynamic text will not show a variable!

I have everything set except the variable will not show!

Thanx to any who can help!

CyanBlue
03-19-2005, 04:02 AM
I don't know what's wrong but I cannot read your computer screen...

Please post some details like code snippet or something that we can know more about your problem... ;)

sycross
03-19-2005, 04:15 AM
Sorry... I was in a rush to post there...

All I used was:
Pointsy (the variable) =0

Under another command was:
if (hitTest(_level0.needsave)) {
pointsy=pointsy+1

and finally under the Dynamic Text I put pointsy as the Var.

When i test the movie, nothing shows up in the text.

CyanBlue
03-19-2005, 04:18 AM
Well... You are not givine me much to think, but here are a few things just in case that helps...

Make sure that you are using the correct variable name in the same case... If you are using FMX 2004, Pointsy is not the same as pointsy... In other words, case matters...

Make sure that you are giving the right path to the textField like _root.pointsy or _root.someMC.pointsy instead of just saying pointsy...

Try that and see if that makes any difference... :)

sycross
03-19-2005, 09:02 PM
Ok, thanx!

Just one more Q:
Are variable automatically put in under _root unless you assign it to something?

sycross
03-19-2005, 09:09 PM
Ok. I just did that and change all the pointsies to _root.pointsy. Now when the hiTest is activated (and it should add one) the text just displays "NaN"

CyanBlue
03-20-2005, 01:14 AM
You could try this...
_root.pointsy = parseInt(_root.pointsy) + 1;
Are variable automatically put in under _root unless you assign it to something?
Nope... Flash will look for the variable in the same timeline which is not necessirily _root... For example... If I say someVar in _root.someMC.otherMC timeline, Flash will look for the someVar in that given timeline...

sycross
03-22-2005, 12:06 AM
I don't think I'm gonna be fixing this problem...
I tried everything you said but there is still no result!

Thanx anyway, though...