This moviescript function will pad the value you send it with up to 15 zeros (well, 14 + 1 digit number).
To use, for example:
invoiceNum = invoiceNum + 1
member("invoice").text = padZeros(invoiceNum, 8)
on padZeros (theValue, theAmount)
if theAmount > 15 then return VOID
temp = the floatPrecision
the floatPrecision = theAmount
theString = string(value(theValue) * power(10, -(the floatPrecision)))
delete char 1 to 2 of theString
the floatPrecision = temp
return theString
end
Contact
MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA