HTML and CSS Reference
In-Depth Information
explodeSound3
.
addEventListener
(
"canplaythrough"
,
itemLoaded
,
false
false
);
shootSound
=
document
.
createElement
(
"audio"
);
audioType
=
supportedAudioFormat
(
shootSound
);
document
.
body
.
appendChild
(
shootSound
);
shootSound
.
setAttribute
(
"src"
,
"shoot1."
+
audioType
);
shootSound
.
addEventListener
(
"canplaythrough"
,
itemLoaded
,
false
false
);
shootSound2
=
document
.
createElement
(
"audio"
);
document
.
body
.
appendChild
(
shootSound2
);
shootSound2
.
setAttribute
(
"src"
,
"shoot1."
+
audioType
);
shootSound2
.
addEventListener
(
"canplaythrough"
,
itemLoaded
,
false
false
);
shootSound3
=
document
.
createElement
(
"audio"
);
document
.
body
.
appendChild
(
shootSound3
);
shootSound3
.
setAttribute
(
"src"
,
"shoot1."
+
audioType
);
shootSound3
.
addEventListener
(
"canplaythrough"
,
itemLoaded
,
false
false
);
saucershootSound
=
document
.
createElement
(
"audio"
);
audioType
=
supportedAudioFormat
(
saucershootSound
);
document
.
body
.
appendChild
(
saucershootSound
);
saucershootSound
.
setAttribute
(
"src"
,
"saucershoot."
+
audioType
);
saucershootSound
.
addEventListener
(
"canplaythrough"
,
itemLoaded
,
false
false
);
saucershootSound2
=
document
.
createElement
(
"audio"
);
document
.
body
.
appendChild
(
saucershootSound2
);
saucershootSound2
.
setAttribute
(
"src"
,
"saucershoot."
+
audioType
);
saucershootSound2
.
addEventListener
(
"canplaythrough"
,
itemLoaded
,
false
false
);
saucershootSound3
=
document
.
createElement
(
"audio"
);
document
.
body
.
appendChild
(
saucershootSound3
);
saucershootSound3
.
setAttribute
(
"src"
,
"saucershoot."
+
audioType
);
saucershootSound3
.
addEventListener
(
"canplaythrough"
,
itemLoaded
,
false
false
);
shipTiles
=
new
new
Image
();
shipTiles
.
src
=
"ship_tiles.png"
;
shipTiles
.
onload
=
itemLoaded
;
shipTiles2
=
new
new
Image
();
shipTiles2
.
src
=
"ship_tiles2.png"
;
shipTiles2
.
onload
=
itemLoaded
;
saucerTiles
=
new
new
Image
();
saucerTiles
.
src
=
"saucer.png"
;
saucerTiles
.
onload
=
itemLoaded
;