web design template

Page: 1 2

Using this command, date and time values are retrieved which are relative to universal time or the operating system, on which flash is running.

To use the date object, create an instance of the date object.

Syntax :
variable name = new date ( );

New date (year, [month [, date [, hour [, minute [, second [, millisecond]])

Example :
a = new date ( );

Where a is the variable which holds the instance of date.

Get Date
The date can be retrieved from the current date using the Getdate ( ) method.

Syntax :
variable.getdate ( );

flash website templates

Example :
a = new date ( );
b = a.getdate ( );

where a holds the value of current date (i.e. 2001/07/10)
b holds the value as "10"

to lowercase ( )
Using this command the string which is typed in upper case can be converted to lowercase.

Syntax:
String.tolowercase() ;

Example:
x = "GALAXY",
trace(x.tolowercase( ) );

The output window will show "Galaxy"

to upper case ( )
Using this command, the lower case letters can be converted to uppercase letter.

Syntax :
string. to uppercase( );

Example :
x = "Galaxy"
Trace (x.touppercase() );

The output window will show "GALAXY"

Length
Using the length command of string, the number of characters in a string can be obtained.

Syntax :
string.length ;

Example :
x = "galaxy"
trace (x.length);

The value 6 will be displayed on the output window.

flash website templates

CharcodeAt
This command returns the ASCII value of the character specified by index. The value will be a 16 bit integer from 0 to 65535.

Syntax :
string.charcodeAt (index);

Example :
x = "galaxy";
trace (x.charcodeAt(3));

The string "x" has galaxy and the 3 position / index in the string is "a". the ASCII value for a is 97.

The output window will show the value 97.

CharAt
Using this command, the character in the specified index position can be obtained.

Syntax :
string. CharAt(index);

Example :
x = "galaxy";
trace (x.charAt(3));

The index value is 3 and the character in the third position is "a" i.e. [G-0, a-1, l-2, a-3….]

The character in the corresponding position can be obtained.

Regards,

Manoj Kotak.
The author is Director of Image Online Pvt. Ltd. developer of
Layout Galaxy web site design templates for photoshop and Flash.

All accompanying logos, brands and product names are trademarks of their respective companies.

Blood for humans comes only from humans : Donate Blood
http://www.donate-blood.org   E-mail - om@donate-blood.org




© Image Online  2001-2003