Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am developing Phonegap build game application, where we have 2 parts in single screen which corresponds 2 functions. 1st function will display random image and text in first part. 2nd function will take care of new level in second part. Now the problem is , the UI is completely disturbed since javascript by default single threaded and executes serially! So, How can I overcome this? I tried with async.js plugin, but no use. I don't want to use setTimeOut or setTimeInterval as I read in some posts.

Here is my code snippet:
JavaScript
function checksquence(){
  //if correct
  if(turn == array.length) {
    level++;

     displayMarquee(); // 1st function
     newlevel(); //2nd function
   }
}


Any help greatly appreciated.
Posted
Comments
Mohibur Rashid 5-Jun-14 4:29am    
Javascript do not allow running multiple thread.
Adil S 25-Sep-15 23:26pm    
Hi,
Did you find the answer?
Im looking for the same

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900