Variables in Captivate

Hi,
I'm a french developper and I want to use Captivate with
flash. (I created a swfbar)
1) Can I get the name of the project with a variable ?
I want to show the name of the project in the swfbar.
2) I want to stor global variables in captiate.
For exemple, when you click on a button (situated in the
swfbar) you can show some informations (Chapter, Time, etc ...)
I don't know how to do that.
Can I get informations stored in Captivate ?
can I make a swf files with global variables that I can use
after in my swfbar ???
Regards.

Hi Noellet
Captivate doesn't offer this functionality natively. You (and
others) may wish to alert the developers to the need for this by
clicking
here.
I do have in my possession a couple of files that do this.
Another contributor here created them at one point and offered them
for download. Unfortunately I have no idea as to who that was so I
can properly attribute credit. If you shoot me an offline message,
I'll be happy to send them along. Send to captiv8r (at) kc (dot) rr
(dot) com.
Cheers... Rick

Similar Messages

  • Passing a variable from Captivate 5 to Flash CS5/ActionScript 3

    I don't get it. Why is it so difficult to pass a variable from Captivate 5 to AS3/Flash CS5. I must be making it harder than it really is. I cannot figure it out.  Can anyone help?
    I have a variable (gpDone = 1) defined in Captivate 5 (it's a guided practice) on the last frame which will indicate that the learner has completed the guided practice file.
    Now I want to pass that variable back to Flash/AS3 so I can evaluate whether I should show the Continue button so they can continue. They have to complete the guided practice before they can continue. If it is equal to 1, the Continue button will display. If it is not equal to 1, the Continue button will not display, but a message will display telling them they have to complete the guided practice in order to continue in the course.
    Do I need to edit the Flash html? Or just put code in the Flash timeline or the associated AS file?
    Help would be greatly appreciated. Thanks in advance.
    CAH

    Having the same problem...getting variable values FROM captivate to my inserted .swf (not widgets).
    I can set the value from the .swf to the captivate using Object(parent.parent.parent.parent).captivateVariable but not the other way around.
    Very frustrating.
    I hope someone answers your query.

  • Passing variables from Captivate to HTML

    Hi All:
    I am trying to figure out how to export system and user variables from Captivate to the html wrapper. What I need to accomplish here is very simple. I want to capture a quizz score and pass that number back to the html file. Can anyone out there help me with this?
    I have been adding the following javascript code to my html file after publishing for testing:
         <script type="text/javascript">
         function SimpleTest()
                alert('I can call javascript');
         function ComplexTest(grade)
                alert('The grade you passed was: ' + grade);
         function ComplexAlternateTest()
                alert('The grade you passed was: ' + GradeVar);
         </script>
    I have successfully tested the first function SimpleTest() so I know that Captivate can communicate with the html file. However, I have not been able to successfully pass any system or user variables to either of the other two test functions. I suspect that I am not getting the syntax correct in the javascript call in Captivate.
    My approach has been to use execute javascript in the on slide exit. I have also tried creating an advanced action that stores a system variable to a user defined variable and then tried sending the user define variable with no success. In the javascript popup window I have been putting ComplexTest(variablename); . I don't know if this is the correct syntax or not??  I have tried using the cpQuizInfoPointsscored system varialbe with and without the $$ signs and I have tried using {score} on the quiz results page. So far no luck. I always get a "variable not defined" error message.
    Sorry for the lengthy message but you would think that something this simple would be more straight forward, but apparently it is not. Thanks in advance for your help.
    Vernon . . .

    Hi Vernon,
    I'm not a JavaScript ninja so I can't answer your question. However take a look at Philips site here http://pipwerks.com/
    He has a lot of interesting stuff in regards to Captivate and JavaScript integration so hopefully you can find the answer on his site.
    /Michael
    Visit my Captivate blog with tips & tricks, tutorials and Widgets.

  • Retrieving variables from Captivate 4 in Flash (AS2)

    I've found a couple threads in this forum on this topic, but none of the code suggested in these threads seems to work.  I have a quiz created in Captivate 4.  The 'Results' slide changes a user-defined variable, varCAPChp1Test to 1 on enter of the slide (I use the 'Assign' command from the dropdown in slide properties to assign this variable a value of 1).  I want to reference this variable in my .fla file using AS2.  I load the Captivate swf into an empty movieclip using the following code:
    var myMCL = new MovieClipLoader();
    myMCL.loadClip("supporting_SWFs/Quizzes/Chp1_Quiz.swf", "mc_EmptySWF"); //the swf loads and functions just fine
    checkCompletion = function():Void
        var test = mc_EmptySWF.varCAPChp1Test;
        if(test != null && test == 1)
            trace("Chapter 1 Test completed!");
        else
            trace("?");
    addEventListener(Event.ENTER_FRAME, checkCompletion);
    //Here is the output when I publish the .fla:
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varUserPts = varUserPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varUserPts = varUserPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    Branching::script:varCAPChp1Test = 1 //so the value is assigned properly in Captivate, but Flash doesn't "listen" for it.
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];

    I've changed the code below to just trace the value of a variable in Captivate when it's completely loaded in Flash and I keep getting 'undefined.'  I'm also using a system variable instead of a custom user variable this time.
    var myMCL = new MovieClipLoader();
    myMCL.loadClip("Chp1_Quiz.swf", "mc_contentHolder");
    myMCL.onLoadComplete = function(target_mc:MovieClip)
        var test = mc_contentHolder.rdinfoSlideCount;
        trace(test)
    //Here's the output I receive:
    undefined
    Branching::script:varChp1Test = inprogress
    varTotalPts = varTotalPts + 10
    rdcmndResume = 1;
    deepak branching : scripteval:[object Object];
    I know that myMCL.onLoadComplete is working b/c I am receiving the trace output, but Flash is not reading the variable from Captivate.  Can anyone help me see what I'm doing wrong?  I've been doing research on this for several days with no success.  This should be pretty simple and I keep getting 'undefined.'
    Thanks.

  • How do I create variables in Captivate?

    I'm hoping someone will be able to help me out. I'm working
    on some e-learn using Captivate at the moment and am not sure how
    we 'affect' variables once a user as completed a branch. i.e. I
    have three buttons on a page representing 3 different branchs. When
    a user selects a button he/ she follows the slides in the branch.
    At the end of the branch they are returned to the original slide
    with the 3 buttons, only now, the button that they originally
    selected is marked as complete or changed to represent having been
    completed (i.e. text is added, icon changes etc).
    I hope this makes sense. Any help would be greatly
    appreciated. Cheers

    I found that I could export my Captivate project to Flash and
    then use Actionscript to make checkmarks visible on the menu if
    various sections were viewed. Here's some code that may make this
    easier if you care to try the same thing:
    Initialization Code for a menu with four checkmarks (frame
    1):
    _global.section1viewed = false;
    _global.section2viewed = false;
    _global.section3viewed = false;
    _global.section4viewed = false;
    Menu Code (place on the frame(s) that display the menu):
    if (section1viewed) {
    checkmark1._visible=true;
    } else {
    checkmark1._visible=false;
    if (section2viewed) {
    checkmark2._visible=true;
    } else {
    checkmark2._visible=false;
    if (section3viewed) {
    checkmark3._visible=true;
    } else {
    checkmark3._visible=false;
    if (section4viewed) {
    checkmark4._visible=true;
    } else {
    checkmark4._visible=false;
    (Also place on the menu the 4 checkmarks which are movieclips
    and name their instances checkmark1, checkmark2, etc.)
    Set variables to true (place the appropriate statement by
    changing the 1 to 2, 3, or 4, on the last page of each section):
    _global.section1viewed = false;

  • I need to access the quiz variable in Captivate 6

    Is there any way to set the final quiz score in CP6 using either an advanced action or by using AS3 in Flash?
    We use a lot of custom interactions that are created in Flash and we need to use the scores from those interactions as quiz scores. So far i haven't found a Captivate variable that I can set from Flash, to record a quiz score that can be reported to our LMS.
    Thanks,
    Jeff

    My suggestion would be that you look into coding your Flash interactions as Captivate Interactive Widgets.  That way you can assign the score in Captivate and just set the interaction up to either register Success or Failure to achieve the score.
    The WdigetFactory API is the most popular way to achieve this:
    http://www.infosemantics.com.au/widgetfactory/info

  • Importing LMS variables into Captivate

    I would like to retrieve data from the LMS (Moodle) running my Captivate course - specifically, capture the students name from LMS and display it in Captivate. I have read a previous discussion on this, but it ended without a definitive answer it seemed.
    Looks like first the SCORM data in the variable first has to be passed to an embedded Flash file through javascript, then passed on to Captivate from Flash. One suggestion from the post hinted it could be done without the javascript step.
    Has anyone had success with this? And with SCORM 1.2 or 2004? I would greatly appreciate some advice if anyone has pulled this off...
    SCORM variable (student's name) -> Javascript -> embedded Flash file -> displayed in Captivate....
    Thank you in advance to anyone who can help!

    Why sure...this works with Flash AS3, CP5.5, and Moodle as the LMS...
    First, I created a small 10x10 px, one frame flash file to import into Captivate (just want the AS code to run, its hidden in a black part of my background in slide 1...)
    Then entered this code into the frame:
    //Get LMS student name from SCORM
    import flash.external.ExternalInterface;
    try{
    //Assigns the LMS student name to a string
    var UserName:String = String(ExternalInterface.call('g_objAPI.LMSGetValue','cmi.core.student_name'));
    //To separate the first and last name...
    var LastName:String = UserName.slice(0, UserName.indexOf(","));
    var FirstName:String = UserName.slice(Number(UserName.indexOf(",")+2), UserName.length);
    }catch(err:Error){
         trace("Not in an LMS Currently");
    //Send first name to Captivate
    var myRoot:MovieClip = MovieClip(root);
    var mainmov:MovieClip = MovieClip(myRoot.parent.root);
    mainmov.FirstName = FirstName;
    Then, placed this flash file on slide 1 of my Captivate lesson, where I display the value of FirstName I get from Flash. You know, "Welcome, $$FIrstName$$"!! Then when I start my lesson in Moodle the FirstName shows up...
    A quirk though, it didn't work at first - it seems that when Moodle would start the Captivate lesson  and the AS in the Flash file executes at the same time, it wouldn't pull the first name. So I set the Flash movie  to delay for .5 seconds in the timeline, so the Captivate lesson would start, a very brief pause, then the AS code executed and I got the FirstName. And also, the Captivate text box with the $$FirstName$$ variable display has to appear after the Flash code has got the FirstName from LMS, so I set it to delay 1 sec on the timeline.
    That was it, I didn't add anything to the external .js file. Maybe this will help somebody! Thanks again for pointing me in the right direction...

  • Posting variables from Captivate 5

    Dear gurus,
    I would like to be able to post quiz and user variable data from Captivate 5.  I notice that the Cap. 5 has Javascript functionality but is there any way of referencing a lesson's variable data so that it can be posted out of Captivate? 
    My goal is to post data to a server script which will then route the data to a database.  I realise there is the new alternate results feature but I can't use php in my workplace.  I also can't use an LMS for the recording of data.
    Any help would be greatly appreciated.
    Best wishes,
    Mister Gee

    So I keep working with it, trying to get the data from the POST. I've tried using a very rudimentary method of checking to see if I'm able to get the variables, but for some reason, I'm not able to.  Here's a snippet of what I'm doing just to see if I'm getting the values. Once I'm able to write the values to the text file, I'll be able to move forward.
    <%
    dim fs,f
    set fs=Server.CreateObject("Scripting.FileSystemObject")
    dataString = request.form("dataString")
    CompanyName = request.form("CompanyName")
    DepartmentName = request.form("DepartmentName")
    CourseName = request.Form("CourseName")
    Filename = request.Form("Filename")
    Filedata = request.Form("Filedata")
    If NOT fs.FolderExists("D:\Hac_userdata\QWDweb\elearning\CaptivateResults\") then
      fs.CreateFolder("D:\Hac_userdata\QWDweb\elearning\CaptivateResults\")
    Else
    End If
    set f=fs.OpenTextFile("D:\Hac_userdata\QWDweb\elearning\CaptivateResults\test.txt", 8, true)
    f.WriteLine("( " & DepartmentName & " )" & " " & now())
    f.close
    set f=nothing
    Set fs=Nothing
    %>

  • Delete Variables in Captivate 8

    Hello,
        I have read a previous post on variable deletion within a Captivate project but it did not solve my problem. I tried deleting the associated Advanced Actions/Shared Actions and then deleting the variables, but I am having no luck. When I try to delete the variable, I get a dialog box saying "Deleting variables used by Advanced Action, Shared Action, text objects is not allowed". However, when I look at the "Usage", in the dialog box it just says "", which I interpret as Captivate not finding where it's being used.
    I have tried NOT deleting the slide with the actions before trying to delete the actions and variables as a previous post suggested, but this still doesn't work. I was glad to see that they added the ability to delete variables, but clearly either I am missing something or there is a bug. Please tell me I'm missing something!
    Thanks!

    Hello,
    Have not checked this in CP8 but in CP7 the Usage was not showing everything, if you don't get the message that a variable is not used, it is used somewhere but the Usage will not show it. If you do see an empty Usage list, it means that there is Usage. Hope I didn't confuse you more now, blogged about it for CP7, maybe it is still the case for CP8. I certainly logged that bug for CP7 but will first double check before logging again.

  • Create User Variable in Captivate via Widget / AS3 ??

    Hello all,
    I have created a widget which will load many variables into Captive from an XML file.  This is great.
    Now i don't want to create 100 user variables in the Captivate variables section.
    Can you create a user variable within a widget/as3 that will load in Captivate WITHOUT creating the var in Captivate first???
    And how might you do this?
    Thank you so much!
    ~ Sean

    I've had some time to figure this out... so here's what I've found.
    When you place a caption on the Cp canvas, it's base AS3 type is an cpItem.  Once you add a Captivate user $$variable$$ from the Variables Panel to that caption, the AS3 type becomes an rdCaptionItem which has an event associated with it... Once the variable value is changed, the caption text is automatically updated.  You don't get that with a regular cpItem caption.
    What does that mean?  It means that the caption type is determined at design time and not runtime.  So even though you can create variables at runtime, you can't update any captions because the type is still an cpItem with no events.  For example, if I wrote the following AS3 code to create the vTest Cp user variable at runtime in a widget:
    cpVariables.setVariableValue("vTest", "Hello World!", true);
    cpVariables.SetVariableLength("vTest", 100);
    and placed $$vTest$$ in a caption, nothing would get updated during runtime because the vTest variable was not created at design time.  The caption is still a cpItem and has no associated event to update the caption text with the newly created variable value.
    How can we fix this?  You can't... as far as I can tell, you need to define the variable at design time in the Captivate Variables Panel.  I thought about updating the caption myself by watching for changes in the variable by tapping into the WidgetEvent.VARIABLE_UPDATED event, but the newly created variable was not in the variableNamesArray for the callback... so there was no way to know if and when it changed.
    Long story short, Adobe needs to provide a better way to make this easier for widget developers... and I don't see that happening anytime soon.  Right now, the ability to create variables at runtime is somewhat useless.  It may be good for inter-widget communication, but there's better ways to do that.
    Jim Leichliter

  • Is there a way to create a random variable in Captivate?

    I want to create a screen where items appear randomly on the screen for the user to click.  Is there any way to do this using variables?
    I think I can get round it by creating an advanced action which reads
    If "Variable" = "?" then show "Item" etc etc
    I just can't find a way to produce a random value.
    On a second point, can I format a variable to be displayed in a certain format, ie to 2 decimal places or to show seconds as 00, 01, 02 etc rather than 0, 1, 2

    Hello everybody!
    This widget is great!! Thank you for that!!
    I searched for something like that earlier and made an other workaround:
    http://forums.adobe.com/message/1912430#1912430
    The Javascript did not work in my test. I brought to the "if you reach this slide" feature but it failed.
    Regards,
    Markus

  • Variables In Captivate 5.5

    I created a user created variable, "Student Name", in my learning module.  When I launch the module through my lms, where is that user data stored?  Is it saved in RAM only or a temp file?  Or is it, or can it be written to a database?

    Thank you both for taking the trouble to respond.
    Why so many variables?
    A MUCH-simplified, fictitious example. In this one module, we're looking at households of people:
    v_person01firstName, v_person01LastName, v_person01MembershipStatus, v_person01PaymentAmount, v_person01PhoneCell, … more for this person
    v_person02firstName, v_person02LastName, v_person02MembershipStatus, v_person02PaymentAmount, v_person02PhoneCell, … more for this person
    v_person03firstName, v_person03LastName, v_person03MembershipStatus, v_person03PaymentAmount, v_person03PhoneCell, … more for this person
    v_person04firstName, v_person04LastName, v_person04MembershipStatus, v_person04PaymentAmount, v_person04PhoneCell, … more for this person
    v_person05firstName, v_person05LastName, v_person05MembershipStatus, v_person05PaymentAmount, v_person05PhoneCell, … more for this person
    v_person06firstName, v_person06LastName, v_person06MembershipStatus, v_person06PaymentAmount, v_person06PhoneCell, … more for this person
    v_person07firstName, v_person07LastName, v_person07MembershipStatus, v_person07PaymentAmount, v_person07PhoneCell, … more for this person
    v_person08firstName, v_person08LastName, v_person08MembershipStatus, v_person08PaymentAmount, v_person08PhoneCell, … more for this person
    v_streetNumber, v_streetName, v_suburb, v_city, v_country, v_postcode, v_areaCode, v_phoneLand
    Note: address variables cannot be strung because they need to be reported in various ways.
    That's 48 variables so far; there are more variables for each person.
    Then, there are all of the variables for the scenario.
    For each of the ?20 scenarios, the variables are given different values. So, the variables are reused for each scenario.
    Does this clarify the requirement?
    Thanks,
    Kevin

  • Unable to delete unused variables in Captivate 7

    Hi
    I am using CP 7.0.1.237 on a Windows 7 64 bit system.
    While testing few things on a project, I had created some dummy variables and used them in advanced actions. Now, I have deleted those advanced actions and I haven't used them anywhere else. But when I try to delete the associated variables, I am still asked to delete all references to the variable. Is this a bug? Is there a way / workaround to delete them?
    Thanks
    Sreekanth

    No, sorry, only possible in CP8. Finally there is an Unused Items button and an easy way to remove the variables.

  • Passing variables from web server to HTML5 Captivate File

    I am publishing a Captivate quiz as HTML5 and hosting them on a website. I would like to know how I can pass data from my site to the HTML5 based Captivate quiz.
    So far I have had success getting data out of captivate by having the file POST the results of a finished quiz to a RESTful route. However, I have not had success putting data into the file. I would like to pass information such as User ids and quiz ids, maybe even current slide position so that I can associate the quiz information with my database. I am not specifically looking for a solution to user ids, quiz ids, etc. because I can get creative in that regard, I just want to know if others have been able to set variables on Captivate file load.
    I have tried a setting variables in a couple ways:
    - Declaring the variables with javascript, then ajax loading the page into a div. This caused dependency issues since the captivate file uses relative paths for its assets folder.
    - Modifying the published html file by adding the javascript variables, this returned an error message saying I cannot override the existing captivate variables
    - Adding the js variables into the init function, this had no effect.

    To simply pass the username and an id I used the following.
    Note the URL has query string parameters that match the captivate variables
    http://mywebsite/Course/index.html?cpQuizInfoStudentID=IDHere&cpQuizInfoStudentName=Studen tNameHere
    Another way to do this to use JavaScript to read the query string, and the assign variable in CP to the query string values. I remember reading some more detail, but cant remember where.
    Hope it helps
    Luke

  • Can Captivate pass variables to Flash?

    I have a Captivate 4 quiz embedded in a .FLA (AS2).  Can this quiz pass user-defined and/or system variables to the .FLA?  If so, can someone give me an example code of how this would work?  Let's say I have a user-defined variable in Captivate, varTest with initial value of 0.  On the last slide of the quiz I assign varTest a value of 1.  How do I pass this variable to Flash and how will Flash listen for this value change?  I'm looking for something similar to the following code, but I can't seem to get all of it:
    //code that loads movie here; I have this piece working fine.
    //code that listens for varTest1 value in Captivate
    myListener = function():Void
         var myFlashVar = this.mc_Container.varTest //I load my captivate SWF into mc_Container
         if(myFlashVar == 1)
              trace("myFlash Var = 1")
    some listener code here...
    Thanks.

    samprakash,
    You are going into difficult territory.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=464&threadid=1325387
    There is no solution other than a custom solution, likely
    involving many days and hours of work. If you must do this, you can
    begin by analyzing the swf files for variables while in-use (loop
    through the Captivate swf mc object).

Maybe you are looking for

  • Dual-booting with Windows 8, Arch Linux first?

    I initially had Windows 7, then Arch. Now, I have a key for Windows 8. I can just upgrade the previous Windows 7 partition, but I only allocated 37 GB originally, so I want to expand it - I would therefore need to delete the partition and make a new

  • After lion 10.7 no audio sound

    I have a mid 2009 MBP, it worked great on 10.6.8, but after installed 10.7, the audio icon gray out, and showing "The selected device has no output control". It does has sound when boot up, and sound effect is no problem, only the output does not wor

  • Can someone tell me about encode,decode for http url parameters

    All,I got a problem that i want to redirect a url takes some parameters by GET type.if one parameter with url is a passwd field ,i thought it must be encode.And decode by recive-page.what class default in java can i use to encode the field and decode

  • MIME-type issue???

    I have installed WLS 6.1 and have placed my index.html file in the applications/DefaultWebApp_myserver. Everything works fine. For organizational purposes, I want to place all of my documentation in DefaultWebApp_myserver/doc. When I display a MS Wor

  • Audigy SE Issues -- Startup probl

    Hey all - I just recently built a new system and carried over my Audigy SE from my last build to this one. Now, don't know if its a combination of all the new equipment, or the Audigy SE card itself, but for the last two days, I'd been running into p