Wednesday, 23 May 2007

Displaying Volume Levels


Just a quick heads up, you are able to retrieve volume levels as well using FSCommand2. The algorithm for displaying volume levels is completely identical to that mentioned in the Battery Level/Signal Tutorial except for the fact that the FSCommand is different:

status = FSCommand2( "GetMaxVolumeLevel" );
status = FSCommand2( "GetVolumeLevel" );


Using these two values, we can once again calculate the fraction of total volume and convert this to a number in which corresponds to a frame number in a movieclip which contains several frames of increasing volume level. Please refer to the other tutorial for a more indepth look on this.

No comments: