How do I translate putting a number in a field that was written in Director's Lingo script?
I'm converting a project that I built many years ago in Macromedia Director into Animate HTML5. One of the scenes contains a humorous stock market that rapidly rotates the cost of the stock between graphic numbers 28, 29, 30, and 32 (no 31 for some reason - I can't remember why). There are 3 buttons: 1 share, 10 shares and 1,000 shares. When you click one of the buttons the amount that is currently displayed is used to calculate the total. And the current total is displayed in a number of shares field and a dollar field.
First of all can you display a number on the stage in a white box (field) named "total" in Animate without it having to be a graphic?
Second question, is how do I re-write this code for HtML5?
on Price
if the mouseCast = the number of member "Price28" then
put field "Stock28" into newNumber
set the floatPrecision to 2
put field "Total" into oldNumber
put value (newNumber) + value (oldNumber) + .001 into field "Total"
if the mouseCast = the number of member "Price29" then
put field "Stock29" into newNumber
set the floatPrecision to 2
put field "Total" into oldNumber
put value (newNumber) + value (oldNumber) + .001 into field "Total"
if the mouseCast = the number of member "Price30" then
put field "Stock30" into newNumber
set the floatPrecision to 2
put field "Total" into oldNumber
put value (newNumber) + value (oldNumber) + .001 into field "Total"
if the mouseCast = the number of member "Price32" then
put field "Stock32" into newNumber
set the floatPrecision to 2
put field "Total" into oldNumber
put value (newNumber) + value (oldNumber) + .001 into field "Total"
end if
end if
end if
end if
end
