FAQ
Products Showcase Download Extras Support
 
Home :: Support :: Community :: CourseLab Issues

Re: Rounding

Re: Rounding 
Author:  Slav Shchinov
Date: 03.05.2008 15:37:28
Hi, Kev,

the only way to do that now is to use the JavaScript action. CourseLab variables are stored in global JavaScript arrays (one for slide scope and other for module scope). Let it be slide var for example. Then you will need this action sequence:

VARIABLE (my_var, Math.random()*100)
JAVASCRIPT {

g_arSlideVars['my_var'] = Math.round(g_arSlideVars['my_var']);

}

That's all - my_var is rounded. If you var has entire module scope, then name of the array must be changed to g_arVars.  
...

Welcome to CourseLab Community! If you have any questions regarding CourseLab - please post it here in corresponding thread. If you cannot find the thread that exactly fit to your question - you can place New thread message. If such thread already exists - please post your question there. Threads are time slipping - last changed threads are always on the top of the threads list.

Total number of threads: 607
Total number of comments: 2245
Filter by main thread topic:
Search for:  
 
v :)
Subject Author Date
 
Rounding Kev Parker 30.04.08
Re: (1) Rounding Slav Shchinov 03.05.08
 
Re: (2) (1) Rounding Kevin Parker 05.05.08
 
Re: (2) (2) (1) Rounding Slav Shchinov 05.05.08
 
Previous threads>>

Reply

You can also post this message as registered user. [Log in]
Author:
E-mail:
Subject:
Options:  Notify me if there is a new reply
Message emoticon:
Message body:
Insert smilie into text:
 
Jump to thread: