Hey :) I try to make a game for samsung wave with BadaOS there is a support for web apps :) I make game and it works on browser but when i try to write this code on phone sdk i got a error:
Osp::Web::Controls::__WebService::AddMessageToConsole (3943) > TypeError: 'undefined' is not an object (evaluating '$.playground().addSprite') at line 50 loaded from file osp://www.93bt1p123e.com/Res/js/game.js
and options (before line 50 :P): var PLAYGROUND_WIDTH = 480; var PLAYGROUND_HEIGHT = 800; var backgroundIMG = new $.gameQuery.Animation({imageURL: "img/game_bg.png"});
And i dont know what i doing wrong :/ I try jQuery code on phone and its ok, only this function gives error :C
var backgroundIMG =new $.gameQuery.Animation({imageURL:"img/game_bg.png"}); var playerIMG =new $.gameQuery.Animation({imageURL:"img/player.png"}); var enemyIMG =new $.gameQuery.Animation({imageURL:"img/enemy.png"});
Hmm... very wierd :P Before in my html file i have
<body>
<script type="text/javascript" src="./js/jquery-1.8.1.min.js"></script> <script type="text/javascript" src="./js/jquery.gamequery.js"></script> <script type="text/javascript" src="./js/QBwebapp.js"></script> <script type="text/javascript" src="./js/game.js"></script><== my game file :)
</body>
and i delete this last line with my game.js file and in QBwebapp.js i add
var blankSlate =new Osp.Ui.Controls.BlankSlate({bounds:{x:0,y:0,width:480,height:800},mode : Osp.Ui.Controls.BlankSlateMode.MARKUP}); this.form.addControl(blankSlate);//add blank div to form :)