Skip to main content
Participant
July 14, 2016
Answered

Passing variable information from Captivate 8 to embedded .swf and vice versa

  • July 14, 2016
  • 1 reply
  • 464 views

Hi,

I am using Captivate 8 and have created a game in Flash with AS3.  I am having NO problem running Captivate commands from the embedded Flash file, using the syntax:

MovieClip(this.parent.root).rdcmndNextSlide = 1;

However, anytime I try to import or export values for user-defined variables or even pre-defined variables such as cpQuizInfoPointsscored, the values do not translate back and forth.  I have tried using the same syntax as above to define the value of a variable (e.g. MovieClip(this.parent.root).cpQuizInfoPointsscored = 20;).  Likewise, I have tried to display the value of a Captivate variable inside the Flash file by setting a dynamic text field equal to the desired Captivate variable.  In the former case nothing happens; in the latter case, the text field displays "undefined."

I have not seen a post regarding this particular problem.  Any ideas on what I am doing wrong?  Or, is what I am trying to do possible?

Thanks in advance for any thoughts.

This topic has been closed for replies.
Correct answer Lilybiri

Haha - sorry.  cpInfoPercentage is read-only as well!  I'll see if I can't find another pre-defined variable that might serve my purpose.  Love the updated list that you link BTW.


Look in the Movie Control category: those can be changed (cpCmndMute, cpCmndCC are some examples).

1 reply

Lilybiri
Legend
July 14, 2016

Not sure at all, but the issue with the system variable cpQuizInfoPointsscored cannot it be due to the fact that all the Quizzing system variables are read only? That is not the case with the category Command (like cpCmndNextSlide).

System variables in Captivate 8/9 - Captivate blog

Participant
July 14, 2016

Thanks so much for responding.  That may be the case - which would actually be fine for my purposes if I could find a way to work with a user defined variable in the same way. 

Based on your thought, I did just try using the cpInfoPercentage variable and had the same issue.  I am curious if it only responds to Boolean variables ... or at least only when the code is written as I have written it.

Thanks again - any other thoughts would be welcome.

Lilybiri
LilybiriCorrect answer
Legend
July 14, 2016

Haha - sorry.  cpInfoPercentage is read-only as well!  I'll see if I can't find another pre-defined variable that might serve my purpose.  Love the updated list that you link BTW.


Look in the Movie Control category: those can be changed (cpCmndMute, cpCmndCC are some examples).