Software Archive
Read-only legacy content
17061 Discussions

set delay function

zeroman_z_
Beginner
772 Views

 

set delay some seconds for function 

setTimeout(function(){

intel.xdk.player.playSound(intel.xdk.webRoot + "sounds/1.wav");

 

}, 3000);

not work ??

 

0 Kudos
5 Replies
Swati_S_Intel1
Employee
772 Views

First, the XDK base object has been deprecated, so intel.xdk.webRoot will not work. Please use window.location.href to get the webroot. See this post on how to do that :  http://stackoverflow.com/a/21392617

Second, to use the player APIs, you have to add Intel XDK Player plugin through plugins management under Projects tab.

 

0 Kudos
zeroman_z_
Beginner
772 Views

ok 

thanks

how can i set input number from input text as variable x ?

 

0 Kudos
zeroman_z_
Beginner
772 Views

setTimeout(function(){

intel.xdk.player.playSound(intel.xdk.webRoot + "sounds/1.wav");

 

}, x);

x is variable from input text box how i can do it ?

 

 
0 Kudos
Swati_S_Intel1
Employee
772 Views

Can you clarify the question little bit? Also, if it's not related to this topic then please open another topic.

0 Kudos
zeroman_z_
Beginner
772 Views

its another question its my 1st use of intel XDK 

how can get text number like 7 from text box to variable x value 

0 Kudos
Reply