This content has been marked as final. Show 3 replies
Just append the new number to the member's text property.
member("YourTextMemebersName").text & "2"
Thanks for your help, but with this lingo used on an expanded calculator with 10 diget buttons will I have a problem? While 1 + 2, with your code would = the desired 12, I think 2 + 1 would also = 12 and not the desired 21
Is there any chance you could expand your answer just a bit.
Many many thanks
"While 1 + 2, with your code would = the desired 12, I think 2 + 1 would
also = 12 and not the desired 21"
Why do you think that? You are just appending a digit to the end of the
existing text. You can make a single behavior and attach it to each of your
number buttons ( 0 - 9) assuming you are using Director's built in button
control. If you are using your own custom graphics you will need to modify
the code a little. This is just a starting point, if you want to do other
thing like limit the number to 10 digits you will have to add that to the
script as well.
on mouseUp me
member("display").text = member("display").text &