Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Jul 14, 2016 Jul 14, 2016

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.

TOPICS
Advanced
399
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jul 14, 2016 Jul 14, 2016

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

Translate
Community Expert ,
Jul 14, 2016 Jul 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2016 Jul 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2016 Jul 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 14, 2016 Jul 14, 2016

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 14, 2016 Jul 14, 2016
LATEST

Thanks so much!  Your list was extremely helpful.  I was able to manipulate the Volume variable, which allows me to run conditional statements based off of incremental changes in the volume setting in my Flash game.  Great advice!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 14, 2016 Jul 14, 2016

cpInfoPercentage is also a Quizzing system variable, read only.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources