Blackberry Messenger Bedienungsanleitung Seite 3

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 11
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 2
http://cmer.uoguelph.ca 3
After you’ve finished experimenting with the application, it’s time to begin integrating
this fantastic game with BBM.
Step 2: Integrating the Application with BBM
The first thing that will need to be done is changing the HTML code to include a field
where BBM information can be shown. In the ‘content-frame’ div, underneath the ‘title’
div, add a div which shows BBM information with the text ‘Connecting the BBM…’ as
the default text. Include the class ‘content’ so that the appropriate formatting will be done
by the CSS file included in the lab.
<div id="start" class="content">
<center>
<h5>Connecting to BBM...</h5>
</center>
</div>
This will be the only change that needs to be made in the HTML file, all other changes in
the lab will need to be done to the JavaScript file.
In the tictactoe.js file, lets start by adding global variables which will be used for the
lifetime of the application. Add the following variables on the top of the JavaScript file.
var triesCounter;
var userWins;
var userLoses;
var userTies;
triesCounter is used to count how many times the user played the game, userWins counts
the number of times the user won, userLoses counts how many times the user lost the
game and userTies counts how many times the user had a tied game. These variables will
be used to display information on the users BBM profile.
When the application is launched, the setupApplicaiton function is called by the
following line in the HTML file:
o <body onload="javascript:setupApplication()">.
Seitenansicht 2
1 2 3 4 5 6 7 8 9 10 11

Kommentare zu diesen Handbüchern

Keine Kommentare