Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 10th, 2025, 5:41 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Score Totals in Flex
PostPosted: August 28th, 2006, 3:47 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

I'm working on a Flex pub and can't get the scoring totals to work properly in runtime. When I preview in the editor, the score total works correctly, but not in runtime.

I wonder if this is a function of Flex and Flash.

The set up is as follows:

The viewer takes a quiz in which they are shown an image and need to select the correct item portrayed by the image from 7 choices. Using a standard Opus action, each answer, whether right or wrong, is scored: add (+) 1 to SCORE_TOTAL. This captures every try, right or wrong.

On the scoring page, after the 7 questions on 7 pages, a script is as follows (variable <totalaa> has been added as a variable in pub properties):

var totalaa = 7/SCORE_TOTAL

and the variable <totalaa>% is displayed on the scoring page.

The math seems correct: 7, or the actual number of correct answers, divided by the total number of attempts to answer should equal the percent correct. (If a Forum colleague with better math skills suggests a better formula, I would also be grateful, since math is not my strong suit.)

As mentioned, all works well in preview mode, but in runtime, using either the SWF file or the HTML file, created by the Flex pub, the score always equals 0%, no matter how one answers, or how many times they choose.

Any help would be appreciated.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: August 28th, 2006, 3:59 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
I tried this in a publication.

Code:
total=bvar1/60;
total=total*100;
total=Math.round(total);


Without the multiplying by a 100 I get a result of 1. With that line it works as it shoulds.

Perhaps this helps you?

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


Top
 Profile Visit website  
 
 Post subject:
PostPosted: August 28th, 2006, 4:20 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

Thanks for your reply.

I'm afraid I had already done that and failed to include it:

var totalaa = 7/(SCORE_TOTAL)*100

and then my next action is to round total.

Sorry that I left that out, but it doesn't seem to be the issue, since in preview I get the correct total %. I've tested it alot.

The issue is that it won't work in runtime, when I view the actual SWF or HTML file created from Flex. (I have the latest flash player, and Firefox Mozilla on my desktop.)

I wonder if Flex can't manage this extra script or the new variable, like the <totalaa> that I've added. Or, maybe I'm creating the variables incorrectly.

Could it have to do with limitations in Flex?

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: August 28th, 2006, 5:18 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
Any possible way you could send me the page of your IMP file where this occurs?

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


Top
 Profile Visit website  
 
 Post subject:
PostPosted: August 28th, 2006, 5:52 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

Thank you for your reply and offer to take a look.

I believe I've figured it out: it seems the trick is not to use the scripting, but rather to stick with Opus standard actions.

So, I eliminated the script, added a "set variable to expression" using the script's expression (7/SCORE_TOTAL)*100, added a "round" action, and it works.

Again, thanks for your support.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 90 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group