Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User yapiskan's Avatar
    Join Date
    May 2011
    Posts
    21
    Hi,

    I'm developing a game for wrt. And in that game I have a timer which counts the time, spent for each new game. But, there is a problem in timer. When I touch in any part of the screen and hold my finger in there, the timer stops until I hold up. What could be the problem, can you help me on that?

    Here is the code of timer;

    Code:
    interval = setInterval(function(){
                var totalTime = parseInt($("#total_time").attr("time"));
                totalTime += 10;
                var ms = (totalTime % 100);
                var sec = Math.floor(totalTime / 100);
                $("#total_time").html((sec < 100 ? ((sec < 10 ? "00" : "0") + sec) : sec) + ":" + (ms < 10 ? "0" + ms : ms));
                $("#total_time").attr("time", totalTime);
            }, 100);

  2. #2
    Nokia Developer Moderator isalento's Avatar
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    832
    Hi,

    I would suggest to look for QML if you want to do a simple game, because WRT is not the Optimal environment for games.

    Timers are often paused in WRT. How they behave on case of touch has changed a bit over time.

    -Browser 7.1 touching the screen will not stop timer, but trying to scroll does (touch and move finger)
    -Browser 7.2 Touching the screen will stop the timer
    -Browser 7.3 Same as 7.1

    Br,
    Ilkka

  3. #3
    Registered User yapiskan's Avatar
    Join Date
    May 2011
    Posts
    21
    @isalento,

    I know that wrt is not the optimal platform for a game. But I'm developing just a board game which can be easily developed with javascript. And I want to publish it as soon as possible to see the reactions. So I have developed it in wrt. If the reactions go well then I can think of converting it to qml. But, for now, I have no experience in qml. So that it is what happened

  4. #4
    Registered User Handout's Avatar
    Join Date
    Jun 2011
    Posts
    14
    Hi,
    Are you sure it's the timer that is stopping?
    Isn't just the screen that isn't being refreshed while you're pressing it?

    If the problem is just refreshing the screen, you could play a little with the values for the following functions.
    widget.setNavigationEnabled(false); // true | false
    widget.setNavigationType("tabbed"); // tabbed | none | cursor

    http://www.developer.nokia.com/Resou...BDCAADEB2.html

    Hope it helps,
    pivo

  5. #5
    Registered User DanSiddiqui's Avatar
    Join Date
    Apr 2011
    Posts
    83
    I am facing the same problem please guide if some one have resolved that error.ASAP

Similar Threads

  1. can i simulate Touch/Multi-Touch on Qt Simulator?
    By 7nail in forum [Archived] Qt SDKs and Tools
    Replies: 5
    Last Post: 2011-01-17, 16:31
  2. JavaScript timer in a homepage widget stops when screen saver starts
    By ElishaMoshe in forum Symbian Web Runtime
    Replies: 6
    Last Post: 2010-10-26, 17:33
  3. Replies: 8
    Last Post: 2009-10-21, 08:55
  4. Timer stops when process goes background
    By slayv in forum Symbian C++
    Replies: 4
    Last Post: 2009-02-02, 12:42
  5. Timer task stops
    By tramos25 in forum Mobile Java General
    Replies: 0
    Last Post: 2005-02-26, 00:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved