hi everyone,
this is the problem. im trying to get the values of three field's and put them on a certain part of a script. when the 3 field's values change so should the ones on the script. any ideas on how to go about this. any help is always appreciated.
thanks <--DS-->
I'm guessing that you want to extract either a string from a field or the value of an number.
Here's a behavior for a field that checks itself and if it's changed, it loads a property variable with either the string of the field or the value of a number if that's what was inside.
-------------------------------------------- property thisField, contents, thisFieldValue
on beginSprite me thisField = sprite(me.spriteNum).member contents = thisField.text end
on enterFrame me checkFieldForChanges end
on checkFieldForChanges me
-- only do anything if there's been changes --
if contents <> thisField.text then
contents = thisField.text -- save the string (for comparing)
thisFieldValue = thisField.text -- save as a string
-- check for numbers --
test = thisField.text.value.ilk
put test
case test of
#integer : thisFieldValue = thisField.text.value
#float : thisFieldValue = thisField.text.value
end case
-- show any changes (including the 'format')--
put "the value in " & thisField.name & " = " thisFieldValue
end if
end
-----------------------------------------------
hth -Buzz [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
