Sunday 15 February 2015

actionscript 3 - AS3/Flex/Air - how to capture initial value? -


Changing string values ​​(see example below) I want to get the initial value (first) How do I do this ?

Example:

  var Loading: string; Trace ("" + loading); O / P: 1,2,3,4,5,6,7,8,9   

I need the first value (i.e. "1").

Try it out.

  loading.charAt (0);   

or

  loading.substr (0, 1)    

No comments:

Post a Comment