Variable troubles

Aug 21, 2012

(literally and figuratively)

I've read through many other posts about this exact topic but I can't seem to get it to work.

Users start from a main menu.  They can then choose to either just glide through the course without ever returning to the main menu, (each scene is linked to the next) or they can return to the main menu and hop around to different sections. 

So... Did the whole variable set to false, last button press of a scene changes that to true.  Put a slide trigger on the main menu to change the corresponding button to "completed" when the variable for that scene is "True."

But it's not working.  At all. 

Attached a much smaller version of the whole course.  Only the first four "main menu" buttons have scenes attached to it.

Take a look.  Tell me what I'm doing wrong.

Thanks!

12 Replies
Bruce Graham

Hi Kevin,

Looks to me like you have the "Jump back to the menu" Trigger set BEFORE the "Change Variable", (for example on 3.6)

You have to "change things before moving", or the change never gets recognised.

Can you have a look, a check and change, and see if it changes things?

Sorry - tied up @ moment and cannot do much more on this.

Bruce

Varima Henry

Hi Everyone.

I am having trouble with calling a number of variables in my JavaScript, see javascript below:

var player = GetPlayer();

var email=new Array();

email[0]=player.GetVar("emailadd");

var subject="Onboarding results";

var player = GetPlayer();

var body_start=new Array();

body_start[0]=player.GetVar("w1t");

body_start[1]=player.GetVar("w1q1");

body_start[2]=player.GetVar("w1a1");

body_start[3]=player.GetVar("w1q2");

body_start[4]=player.GetVar("w1a2");

body_start[5]=player.GetVar("line");

body_start[6]=player.GetVar("w2t");

body_start[7]=player.GetVar("w2q1");

body_start[8]=player.GetVar("w2a1");

body_start[9]=player.GetVar("w2q2");

body_start[10]=player.GetVar("w2a2");

body_start[11]=player.GetVar("w2q3");

body_start[12]=player.GetVar("w2a1");

body_start[13]=player.GetVar("line");

body_start[14]=player.GetVar("w3t");

body_start[15]=player.GetVar("w3st1");

body_start[16]=player.GetVar("w3q1");

body_start[17]=player.GetVar("w3a1");

body_start[18]=player.GetVar("line");

body_start[19]=player.GetVar("w3t");

body_start[20]=player.GetVar("w3st2");

body_start[21]=player.GetVar("w3q2");

body_start[22]=player.GetVar("w3a2");

body_start[23]=player.GetVar("line");

body_text = body_start[0] + "%0D%0A%0D%0A" + body_start[1] + "%0D%0A%0D%0A" + body_start[2] + "%0D%0A%0D%0A" + body_start[3] + "%0D%0A%0D%0A" + body_start[4] + "%0D%0A%0D%0A" + body_start[5] + "%0D%0A%0D%0A" + body_start[6] + "%0D%0A%0D%0A" + body_start[7] + "%0D%0A%0D%0A" + body_start[8] + "%0D%0A%0D%0A" + body_start[9] + body_start[10] + "%0D%0A%0D%0A" + body_start[11] + "%0D%0A%0D%0A" + body_start[12] + "%0D%0A%0D%0A" + body_start[13] + "%0D%0A%0D%0A" + body_start[14] + "%0D%0A%0D%0A" + body_start[15] + "%0D%0A%0D%0A" + body_start[16] + "%0D%0A%0D%0A" + body_start[17] + "%0D%0A%0D%0A" + body_start[18] + "%0D%0A%0D%0A" + body_start[19] + "%0D%0A%0D%0A" + body_start[20] + body_start[21] + "%0D%0A%0D%0A" + body_start[22] + "%0D%0A%0D%0A" + body_start[23];

var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_text;

win=window.open(mailto_link,'emailWin');

When email is populated it only shows variables until body_start[17]=player.GetVar("w3a1"); and the rest do not show, is there a limit to how many variables i can call in my script please help

Tracy Parish

Arggggg.  I've got a similar scenario where my variables and triggers are just not cooperating.  No matter how much I think I have them in the "correct" order, they just aren't working.

A few more hours of frustration and I may have be bow to Graham to solve it for me.  I know it's something simple I'm missing.  Now it's a battle of wills, Me vs. Variables.

Allen Moore

I find that writing out all the triggers in sequence as I have them in the slide, makes it easier for me to follow the logic path and easier to troubleshoot.

This also helps when writing a manual for my templates so that others can decipher what I've done a little easier. 

Somethng Like this:

A. Variables used

1. Blinker_Start – Setting Blinker_Start to true initiates the Blinker routine – Initialized False

2. Blinking – Blinker functions work while Blinking is true – initialized False

3. Blinker_Step – Increments by one each blink cycle – Initialized 0

4. Blinker_Limit – Limits the number of Blinks Initialized 3

5. Blinker_On –Determines if the picture “Blinker” is showing or hidden- Initialized False


B. Associated Objects – All on Master Slide

1. Blinker – picture that covers the item that appears to blink (usually over both narration arrows).

1. Slide triggers

a) Change state of Blinker (picture) to hidden when Blinker_Start is set to true if Blinker_Start is equal to true

b) Change state of Blinker (picture) to hidden when Blinker_On is set to false if Blinker_On is equal to false

c) Change state of Blinker (picture) to Normal when Blinker_On is set to true if Blinker_On is equal to true

d) Play media Timer 1 when Blinker_Start changes if Blinker_Start is equal to true

e) Set Blinking equal to true when Blinker_Start changes if Blinker_Start is equal to true

f) Set Blinking equal to false when Blinker_Step changes if Blinker_Step is equal  to 0.00

g) Set Blinker_Start equal to false when Blinker_Step changes if Blinker_Step is equal to 0.00

etc...

 

This discussion is closed. You can start a new discussion or contact Articulate Support.