Skip to content

Commit 8cb41b4

Browse files
author
Lanny McNie
committed
Fixed mobile messaging in game demo
Signed-off-by: Lanny McNie <lanny@gskinner.com>
1 parent 04b9731 commit 8cb41b4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

examples/Game.html

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@
105105
document.getElementById("header").style.display = "none";
106106
}
107107

108+
document.getElementById("mobile").style.display = "none";
109+
108110
if (!createjs.Sound.initializeDefaultPlugins()) {
109111
document.getElementById("error").style.display = "block";
110112
document.getElementById("content").style.display = "none";
111113
return;
112114
}
113115

114-
if (createjs.Sound.BrowserDetect.isIOS || createjs.Sound.BrowserDetect.isAndroid) { // || createjs.Sound.BrowserDetect.isBlackberry OJR blackberry has not been tested yet
116+
if (createjs.Sound.BrowserDetect.isIOS || createjs.Sound.BrowserDetect.isAndroid || createjs.Sound.BrowserDetect.isBlackberry) {
115117
document.getElementById("mobile").style.display = "block";
116118
document.getElementById("content").style.display = "none";
117119
return;
@@ -196,8 +198,8 @@
196198
stage.addChild(scoreField);
197199

198200
//new arrays to dump old data
199-
rockBelt = new Array();
200-
bulletStream = new Array();
201+
rockBelt = [];
202+
bulletStream = [];
201203

202204
//create the player
203205
alive = true;
@@ -511,5 +513,10 @@ <h1>Sorry!</h1>
511513
if you see this in any other browsers.</p>
512514
</div>
513515

516+
<div id="mobile">
517+
<h1>Sorry!</h1>
518+
<p>This demo is currenly not supported on mobile devices.</p>
519+
</div>
520+
514521
</body>
515522
</html>

0 commit comments

Comments
 (0)