Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 3rd, 2024, 10:29 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Flex features fail to display in runtime
PostPosted: October 16th, 2005, 1:39 am 
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

(This is related to a recent previous post on displaying scores in Flex, but, given complexity, I've continued it in the "Advanced" section.)

Setting up a multiple choice quiz in XE 5.14 Flex from scratch (didn't use the Opus quiz templates), I gave each of the 5 choices per question a different score value. I set it up to save the final choice among the 5 possible choices/per answer in the same variable, for example, answer1, answer2, etc. So, depending on the choice, answer1, etc. each could have a value of 0 to 4 (Likert scale).

Using an OnShow trigger on the score page (last page in pub), I've scripted: var total = answer1 + answer2, etc. In a text box on the score page, I've inserted the variable <total> to display the total score of all answers.

In the Opus editor in preview mode, it works fine!

When I publish to my desktop and view the same pub in runtime (I'm assuming it's now using my desktop's IE 6.0 and Flash Player, the variable <total> doesn't display at all. Even if I remove the addition of multiple variables and set the OnShow script as: var total = answer1, no score number for answer1 displays in the text box. Blank.

Should I be scripting using Macromedia ActionScript syntax which may be different than OpusScript? If so, can anyone suggest a script for this addition? Is it that Flash OS in a Flash player, can't display a number in a variable nor add variables together and display the total? In that case Flex pubs can't use these particular actions/operations in runtime.

I set the pub up with variables since Flex's store score action didn't provide enough flexibility. However, the store score action, while more limited, does work both in the editor preview and in runtime.

I would appreciate any help.

Kind Regards,
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: October 16th, 2005, 3:59 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Instead of writing:

var total = answer1 + answer2

leave out the var.

write:

total = answer1 + answer2

don't use var in front of anything you want to display.

Paul


Top
 Profile  
 
 Post subject:
PostPosted: October 16th, 2005, 5:08 am 
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 Paul

Thanks for your reply.

I'm afraid I did not use var before total. I hadn't looked at the script when I wrote the post above. Sorry. So, unfortunately, it failed to work with simply: total = answer1 + answer2, etc.

I am beginning to think that except for the store score action for adding/totaling a group of scores, there is no other way in Flex to total them. Setting variables to hold the scores and then scripting a total doesn't work. This may be because of the inability of Flex to store publication variable values. The SCORE_VALUE and other system variables used in the store score action are likely different.

Another limitation in these multiple choice questions is if the viewer selects (clicks the radio button for) one choice, then changes their mind and chooses another (or even makes more choices before settling on one). Each choice is scored by the store score action, which inflates/throws off the total score. I haven't figured out how to fix this using the update score action, since this tab requires input of specific numeric values, and the actual number of times the viewer clicks and unclicks the radio buttons, and which ones with which scores, is unknown.

So, it may be that Flex is limited in creating certain types of quizzes. Over time, these may be useful features to add. In fairness, Flex is not meant to be Flash.

Again, thanks for your help.

Kind Regards,
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: October 16th, 2005, 8:19 am 
Offline

Joined: November 5th, 2004, 6:54 am
Posts: 130
Location: Hengelo, The Netherlands
Opus: 8.5/9.0
OS: Windows 7 64-bits, Android 2.1, Android 4.1.2, iOS 7
System: Pentium 7i, 6GB RAM, 750GB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses
Hi Stephen,

I just built a small publication with the things you want to use.
I created three varaibles in the pageproperties: "total", "answer1" and "answer2"

I created 2 questions with two answers each (true and false), usning radio buttons.
And everything works fine (see the attachment).
I hope this helps. Opus is for me also a great product producing flash applications. Sure you can't do everything you can do with Flash Pro but for me it's easier to use because I'm using Opus for building cd-publications too.

Kind regards,


You do not have the required permissions to view the files attached to this post.

_________________
Oscar Nijst
ON Education & Consultancy
Hengelo, The Netherlands
OPUS Pro 9.5
Pentium 7i, 16GB RAM, 1 TB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses


Top
 Profile Visit website  
 
 Post subject:
PostPosted: October 16th, 2005, 12:37 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 Oscar

Thank you for your kind assistance.

I'm stuck in one respect: using your model, if I now want to add a separate score page (I need one page for each question-15 questions- and a separate, last page-page 16-to display the total of all other pages' scores-the totals from pages 1 to 15), I am unable to get the total to display on that last page (16). In the pub example you've sent, I tried creating a second (score) page and placed a text box inserting <total> as a variable in it. I created the variable total using 2 methods= (1) using the standard Opus tab to create a new variable and (2) by typing into the text box <total> and scripting with page OnShow trigger: total = answer1 + answer2. When I then navigate in preview to page 2 using variable creation method 1, nothing displays. Using method 2, I get an error message saying "undefined identifier answer1."

I think one of the probelms with Flex actions is that you can't store a publication variable's value from one page to the next, nor read a variables value from one page to the next.

Is there anyway around this to get the total to display on a separate score page?

Kind Regards,
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: October 16th, 2005, 6:05 pm 
Offline

Joined: October 25th, 2004, 12:32 pm
Posts: 397
Location: Digital Workshop
To display a variable in a Text box you do not type the variable into it you right mouse click on the text object and then select the insert variable from the menu. Just typing the variable will not work this is not how Opus works.


Regards

Brenden Knifton


Top
 Profile Visit website  
 
 Post subject:
PostPosted: October 16th, 2005, 6:19 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 Brenden

Thanks for your reply.

I had tried it the way that you suggested without any success.

I believe the issue is related to the inability of Flex to store or read publication variables from one page to the next. The only way that a score can be stored in Flex is using the store score action, and the only way I've found to display the total of several scores (all stored by the store score action) is by placing the system variable SCORE_VALUE in the text box as the inserted variable. Unfortunately, I have been unable to store question scores in regular, created variables and then get them to display on different pages using a text box and insert variable action for these.

Any ideas would be appreciated.

Kind Regards,
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: October 16th, 2005, 7:25 pm 
Offline

Joined: October 25th, 2004, 12:32 pm
Posts: 397
Location: Digital Workshop
Stephen,

Please take a look at the attached example it is adding 1 to the variable total and on page 5 displays this variable.

Regards

Brenden


You do not have the required permissions to view the files attached to this post.


Top
 Profile Visit website  
 
 Post subject:
PostPosted: October 16th, 2005, 9:20 pm 
Offline

Joined: November 5th, 2004, 6:54 am
Posts: 130
Location: Hengelo, The Netherlands
Opus: 8.5/9.0
OS: Windows 7 64-bits, Android 2.1, Android 4.1.2, iOS 7
System: Pentium 7i, 6GB RAM, 750GB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses
Hi Stephen,

In my publication I created my variables in the page, so they won't appear in other pages. If you use the publication properties instead of the page properties to declare the variables then they will work on all the pages.


Then you can use as many pages as tou like and shown the total at the final page.

Kind regards,

_________________
Oscar Nijst
ON Education & Consultancy
Hengelo, The Netherlands
OPUS Pro 9.5
Pentium 7i, 16GB RAM, 1 TB HD, DVD-RW (+/-), DV, 3TB EHD, 3D monitor without glasses


Last edited by osni on October 17th, 2005, 5:35 am, edited 1 time in total.

Top
 Profile Visit website  
 
 Post subject:
PostPosted: October 16th, 2005, 10:31 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

My thanks to Brenden and Oscar. I was finally able to use their examples and achieve the result needed for the project.

Kind Regards,

Stephen


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 5 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