Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Open File with associated extension.
DirectTransition3D Xtra Set II.
DeadC Scroll
WebCamXtra - Computer Vision & Camera Tracking
ProMusicLoops
XTinyadoDB xtra
Wait For Media Ready
Dryclean
SM scroll control
Text Drop Shadows (and a moving light)
MediaMacros Xtras Mall
 

 

 

Behavior Pad Number with Zeros

Added on 8/3/2005

 

Compatibilities:
D7 D8 D8_5 D9 Mac PC

This item has not yet been rated

Author: Chunick (website)

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

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail