Motorola C450, C550, C370 technical manual Java Gaming Sound API, Max Midi Extension Support

Page 61

8

Gaming API and Sound

FileFormatNotSupportedException Constructors

The FileFormatNotSupportedException class defines the following constructors:

public FileFormatNotSupportedException( java.lang.Exception e) – The parameter e is the underlying exception that caused the failure.

public FileFormatNotSupportedException( java.lang.String info) – The parameter info is a String containing information about the failure

public FileFormatNotSupportedException( java.lang.String info, Exception e) – The parameters are info a String containing information about the failure, and e - The underlying exception that caused the failure.

Java Gaming Sound API

BackgroundMusic class objects (from .mid resource file or from bytes array) can be played by using GameScreen.playBackgroundMusic () method.

The following is a code sample to show implementation of the Java Gaming Sound API:

Java Gaming Sound API

import com.motorola.game.*;

public class GS extends GameScreen {

public BackgroundMusic bgm;

public GS()

{

bgm = BackgroundMusic.createBackgroundMusic("vinovata.mid"); playBackgroundMusic(bgm, true);

}

}

Max MIDI Extension Support

Max MIDI Extension Support is an extension of the Gaming API and allows Java Applications the ability to read Max MIDI file types, specifically for the Karaoke application.

61

Image 61
Contents Technical Manual Table of Contents Lcdui JAD Attributes Purpose IntroductionAudience DisclaimerReferences Definitions, Abbreviations, Acronyms Revision HistoryDate Name Reason Acronym DescriptionDocument Overview Introduction Java 2 Platform, Micro Edition J2ME J2ME IntroductionResources Available Motorola J2ME PlatformNetworking Description DisplayFile & RMS Java VMGuide to Development in J2ME Developing and Packaging J2ME ApplicationsIntroduction to Development Page Installation OTA ProcedureDownloading Applications Program and Data space notes Starting Applications Java Application Installer/De-Installer JaidExiting Applications Launching Web Session for Http Download Error ChecksDownloading MIDlets XML Screen Renderings BombMan is back, now on your Taichi series of handsets Taichi handset New Games MIDlet Lifecycle Application ManagementMIDlet Suite Installation MIDlet Suite De-installation DestroyApp MIDlet Suite UpdatingCaller Purpose MethodStartApp or the pauseApp Using startApp MIDlet Control of MIDlet State Transitions Java SystemPage Network Connections Network APIClass Descriptions URL Format IOException when it detects a time-out conditionUDP Sockets TCP SocketsImplementation Notes Network API Description LcduiLcdui Functional Description Gaming API and SoundClass Hierarchy BackgroundMusic Class Using BackgroundMusicBackgroundMusic Methods Gaming API containing a sound APIGameScreen Fields GameScreen ClassPublic int getKeyStates GameScreen MethodsInformation, disabling key events can improve performance GameScreen Using GameScreenImageUtil Fields ImageUtil ClassImageUtil Methods RgbData Using ImageUtilPalleteImage Constructor PalleteImage ClassPalleteImage Methods Public void setTransparentIndexint index throws Using PalleteImagePlayField Class Using Static and Animated TilesDefining View Windows Using SpritesPlayField Constructor 2N+1 2N + Public void addSpriteSprite s throws PlayField MethodsPage Public boolean collidesWithAnyTileSprite s throws PlayField Using PlayFieldSoundEffect Class Using SoundEffectSprite Class SoundEffect MethodsSprite Drawing Animation FramesSprite Constructor Sprite Methods Page Public final void drawGraphics g throws FileFormatNotSupportedException Using SpriteSprites Max Midi Extension Support Java Gaming Sound APIFileFormatNotSupportedException Constructors Java Gaming Sound APIVibe and Backlight API Vibe and BacklightCreating a Message OverviewPermissions Sending a MessageJAD Attributes JAD AttributesMandatory attributes for manifest files MIDlet-Name Class Description Record Management SystemCode Examples RecordStoreCaveats TipsPhonebook Access API Phonebook AccessSample of code to create object of PhoneBookRecord class Phonebook Access API PermissionsSimmemory Sample of code for calling of ‘getMaxEmailLength ’ method Sample of code for calling of ‘isPrimaryint speedNo’ method Sample of code for calling of ‘getNumberCategories’ method Sample of code for calling of ‘setCategoryView’ method Sample of code for calling of ‘getUsedRecords’ method Int index = ReceivedRecord.getRecord1 Intelligent Keypad Text Entry API ITAPKey Mapping for the C370, C450, and C550 Appendix a Key MappingCenter Select END Available Memory Appendix B Memory Management CalculationAppendix C Online FAQC370, C450, and C550 Spec Sheets Appendix D Spec SheetsDocumentation Motorola Developer Information ToolsReferences Purchase Motorola Developer Information Tools Motorola, Inc
Related manuals
Manual 110 pages 1.04 Kb