Scripting in Captivate

Greetings!
Can you help me with scripting in JavaScript. I want to know how to use the Execute JavaScript feature. Could you also guide me to some sample scripts with the actions they do, tutorials kind of where I can learn how to script.
Thanks.

Another link for Jim's videos is http://captivatedev.com/course/javascript-video-series-adobe-captivate-7/. I have had that one pinned for a month now with great anticipation. I will have cash flow again in a few more weeks. What would be fun is if we could get a group together that is starting at about the same time on the course and meet up in the live online classroom as a study group. I love on demand, but adding in a study group element would be a lot of fun. Let me know if you decide to do the course.
My cash flow plans also include some resources by Rod as well that I have been looking forward to. It will be like Christmas. lol

Similar Messages

  • Captivate 4 skip logic for quizzes?

    Does Captivate 4 offer any skip logic or branching for questions/quizzes?
    I have a client who wants to create a pre- and post-test for training.
    Some of the questions willl be common to all. But some questions will be region-specific, so a correct answer to one region would be incorrect for another.
    So, I need a branching or skip-logic quiz.
    For example: If California, then answer A is correct
                        If New York, then Answer B is correct.
    Or, if a person selects a region, such as California, then that user goes to the set of California questions.
    Does Captivate 4 offer any of this conditional flexibility? I don't see anything obvious in the interface that would allow that, but I could be missing something.
    Thanks!
    Don

    Hi Lilybiri;
    Thank you for the recommendation of Rick Stone's book..I will pick that up.
    Now..to completely expose my ignorance..I have been looking at C4 and frankly don't see where the scripting is implemented. I don't see access to a code window (such as in Flash) or anyway to import code...nor do I know in what scripting language Captivate works. Is this ActionScript based? Or some Captivate-specific code?
    I have been hitting the help files pretty heavily in C4 and on the forum, and don't see much info on how this scripting is done. Your link was the first tangible piece of information I have seen.
    Thank you!
    Don

  • Disable F11 key and Alt E keys in IE Browser running Captivate Movie?

    I am creating a training module where as part of the user input (that will trigger various functions on screen in Captivate 4), the user has to hit at one point or another F11 and Alt E.
    Of course, when he hits F11, the IE window maximizes out, as well as triggers the desired function on screen.
    Same when he hits Alt E, the "Edit" drop down in the IE toolbar drops down.
    Any way to use some kind of script in Captivate to disable those when the movie is running?  I can't have all the users of this training disable these in their registry files...that would not work.
    Any help would be appreciated.
    Thanks.
    Rob

    Well, sort of.
    I found a setting on my LMS that plays in full screen mode, which solved the problem.

  • Can you do THIS with Captivate ? ...

    Hi,
    I'm new to Adobe Captivate and am using the 30 day trial to see if it does what I need it to do.
    I need to create a test as follows:
    60 questions, split into sections.
    I need a small button for each question, numbered 1 - 60 aligned vertically in one line down the left of the page, so there would need to be some scrolling as 60 buttons would go off the screen.
    Pushing each button would select a multiple choice question from a random pool. eg. Push button No. 5 and a random question would be there. Push 6 and there's be a different question, but if you pushed 5 again, the same question would be there as before. This enables the person being tested to skip back and fore between questions by clicking the buttons.
    There may be numerous sections to each test.
    eg.
    Car Engines
    Car Bodywork
    Steering
    Suspension etc. etc.
    So, questions 1 - 8 say may be picked randomly from the 'Car Engines' question pool.
    Questions 9 - 19 say may be picked randomly from the 'Car Bodywork' question pool. etc. etc.
    At the end of the test, I need the results to be displayed such as:
    Car Engines - 76%
    Car Bodywork - 52%  etc.
    I'd also like a simple bar chart representation if possible.
    Hope this is clear.
    I'd be very grateful if somebody could advise if this type of test scenarion can be created with Captivate.
    I'm prepared to learn to use Captivate if it can be done, but do not want to waste my time if Captivate doesn't have the capability to create this type of test.
    Grateful for any advice.

    Captivate won't give you exactly what you've described straight out of the box.  But then, neither will any other authoring tool that I'm aware of.
    Scrolling Navigation Buttons
    The Captivate screen does not scroll.  You need to think of it as being like a movie you watch on TV, not as an HTML web page.  There are widgets available to give some scrolling of text in captions, but not something that would provide navigation on each and every quiz slide with buttons to jump to any question in the quiz.
    Question Pools
    Captivate can have any number of question pools associated with a single project file, but you have to set up how many questions will come from a given pool before you publish the project. When the project loads into the user's browser, the randomisation is done to select the particular questions from each pool that will appear in the movie at runtime and is then fixed for the duration of that runtime.  You can't control it and perform more randomisation via clicking of buttons. Basically, your navigation buttons are just intended to take you to particular question slides.  Which quiz question appears on that slide at runtime is totally dependent on the randomisation done from the question pool.
    So if you have 5 question pools, each with 20 questions, but only want ten question from each pool to appear in your published project, you can easily do this with Captivate.
    NOTE: One other thing you need to be aware of is that once your user answers a question and moves off that slide, their answer will be locked and cannot be changed until the Retake the Quiz or relaunch the lesson.  So although Captivate can be configured to allow backward movement, it does not necessarily allow your user to go back and change their answers to questions previously answered.
    Quiz Results
    Captivate considers all questions or scored objects in a project file to be part of its Quiz Scope.  This scope begins on the slide containing the first scored element, and goes until the last scored element.  A project file can have only one Quiz Results slide which will show scoring data from all objects in the Quiz Scope.
    If you want to have scoring displayed separately for certain sections of your quiz (Car engines, Car bodywork, etc) you will need to use one of Captivate's more advanced techniquest using Advanced Actions and Variables.  It can be done out of the box, but it takes time to achieve the required scripting.
    Captivate does not have bar charts as standard screen objects.  Once again, you could use some fancy Advanced Actions and Variable scripting to rig up something that looked similar.  But it would take yet more time.
    I hope this helps with your decision.

  • Is there any way to increase the contrast of the slider in the Table of Contents? It becomes very hard to see as you slide down a presentation. This has been asked before, a few years back. Has a solution been provided?

    I designed an interactive script using Captivate 7. It works like a branching scenario, and is currently in use by about 350 phone operators, soon to be over 750. Everybody is pretty happy about it, but I am getting complaints - especially form the older people - that the slider in the TOC is very hard to see, and I agree - as you scroll down the TOC entries, the slider becomes lighter and lighter in color. Is there any way to tweak it so that I can increase contrast, or recolor it in a darker tone? I know this was discussed a couple of years ago, but I don't know if the issue was addressed by Adobe, or if anyone has come up with a solution.

    I designed an interactive script using Captivate 7. It works like a branching scenario, and is currently in use by about 350 phone operators, soon to be over 750. Everybody is pretty happy about it, but I am getting complaints - especially form the older people - that the slider in the TOC is very hard to see, and I agree - as you scroll down the TOC entries, the slider becomes lighter and lighter in color. Is there any way to tweak it so that I can increase contrast, or recolor it in a darker tone? I know this was discussed a couple of years ago, but I don't know if the issue was addressed by Adobe, or if anyone has come up with a solution.

  • TOC Status for a slide doesn't update until all of group is viewed (Cap 5)

    I'm having some trouble understanding some behavior I'm seeing with the TOC status flag. It's my understanding that, in Captivate 5, the status flag only appears after you reach the end of a slide. In newer versions, that has changed so that a user need only view a slide to trigger the status flag.
    Either one of those would be acceptable to me, but I'm experiencing something different. My TOC is structured so that only the first slide in a slide group appears in the TOC, such that these are more like chapter stops than granular, slide-level navigators (I have 174 slides in the project, so chapters are more digestible). Entries in the TOC do not show completion unless all slides in the chapter have been viewed, not just the initial slides which populate the TOC. This becomes a problem in specific chapters, ones in which I turn things over to the user to interact with the demo software and involve some branching, that do not show completion unless every slide in that chapter are touched. Why is this? Shouldn't the TOC depend only on the slides shown in the TOC? If so, I can ensure that opening slide to a chapter, the one populating the TOC is viewed to completion. Instead, this appears to be tied to the branching within these chapters, even though those slides aren't represented in the TOC.
    To be clear:
    I'm only concerned with this status flag in the TOC; I'm not concerned about completion reporting for the course as a whole (I handle that in a different way).
    I've set the activity launch button on the initial chapter slide to "Continue" to the next slide, ensuring the slide is viewed to completion.
    I can reliably reproduce that the status flag does not appear unless every slide in the chapter/group has been viewed, and that it definitely does appear when every slide has been viewed.
    This does not vary with the grouping of the slides; I removed the group and experienced the same status behavior.
    I'm aware of the TickTock widget, may resort to it if necessary, but I'm perplexed by what I thought would be straightforward behavior.
    I'm not concerned with a rigorous check that users have completed every slide; I simply want the TOC to show that a chapter has been visited, and for that purpose viewing the initial slide for the activity is good enough for me.
    Any ideas?

    Thinking bit out of the box, when I read your question. To show that a chapter has been visited, shouldn't a custom menu (or dashboard) be a better solution than trying to use the canned way with TOC? Something like the example in this post:
    Captivate 8 - First Adventures - Captivate blog
    I know this is for CP8, but long time ago I offered even a template for CP5
    Template for reusing script? - Captivate blog
    For that old version advanced actions could only be transferred to a new project using a template. And shared actions were still far away.

  • Looping back to 'Match Test' after incorrect 1st try

    I've just done my first Captivate thing and really like the
    program.
    But I've had a problem with the Match Test...
    - Student incorrectly matches by dragging & dropping and
    then clicks continue...
    - We loop them back to the the lesson slide
    - Then bring them back to the Match Test to retake the test
    - BUT...
    ..Old incorrect 'match lines' still show
    .. "Your Answer" & "Correct Answer" show
    .. Program freezes up
    My Question - We just want them to retake the Match Test so
    how do I prevent all the above?
    Thanks for any help.

    Hi again
    Create your own variables in Captivate? Nope But if you have
    Flash and are comfortable using it, you can probably do it. I know
    that a download exists on the Captivate Exchange
    Click Here to
    visit the Exchange that you may download that uses variables.
    And I think it comes with the source Flash .FLA file too. So
    assuming the Flash bit is an option, you could edit that FLA and
    bend it to your whims.
    Captivate does offer use of JavaScript. But it gets really
    tricksy. I think it fails in .EXE format and only works best if you
    add the script to either your HTML page that launches Captivate, or
    to a JS file you link to from that page. Then you can call
    functions in the script from Captivate that do different things.
    Cheers... Rick

  • Re-Randomizing questions when resume data is on?

    Hi there,
    I suspect I might know the answer I get for this but its worth an ask anyway.
    Is there a way of re-randomizing questions when taking a course with resume data on?
    I've been getting into the nitty gritty of captivate with the functions it sends and I have found the ones for randomizing the questions but I can't run them without knowing the correct parameters (all the variables have confusing names such as gqs, pqs and so on)
    I talked to Adobe support in regards this and was told that  custom scripts were not supported and I would have to pay extra for a Dev support contract if I wanted a (I assume) software developers take on things which I think is a bit unfair considering having randomized questions really should be a basic feature of a course authoring software.
    I was also looking at having resume data turned off in captivate and sending out my own which would track the viewed section variables along with the current page and then having a script for captivate jump to the required page once the course was opened.
    Anyone have any experience with using your own resume data or any other ideas?
    Cheers

    Ok: This is what I understood: You do not want to Display a whole column of 0's (for Feb) but you want the user to be aware that there were 0 deliveries for feb.
    So if you run the report for a Calmonth Range of 01.2006 to 06.2006, then just after the Free Chars in the report, you should see a row like Cal/Year Month Jan 2006..June 2006. This shows that the report was run for Jan to June range and the results show months Jan, March, April, May, June implying that there is no data for Feb.

  • Recording audio portion with two headsets

    I would like to use two people/two headsets to record the
    audio portion of my captivate software demo. We are using two
    digital headset microphones, each with a USB connection
    (Plantronics Gamecom | Pro 1) within a VMware session. The visual
    portion records just fine, but only one headset picks up the audio
    portion. The second headset doesn't pick up anything.
    Ideas on how to get BOTH headsets working while recording?
    (We just spent money on the headsets and would prefer not having to
    spend more money on a single, but shared, microphone that sits on a
    desk; plus we're under a tight schedule :-)

    Sorry I don't have an answer for you - directly, anyway. I do
    understand why you might want to do the dual-mic thing, but I don't
    believe Captivate can handle the double-source audio.
    I would recommend (unless someone here has a better answer)
    that you use your dual microphones and take your script outside
    Captivate to do the recording, then use the Audio Import function
    to bring your saved MP3 or WAV audio into the project that way.
    Best of luck, and welcome to the User Community!
    .

  • Quick way to remove advanced actions

    Hi,
    I have created a module that has over 100 advanced actions throughout. I use the same template with some modifications for the next module I'm creating.
    What I have been doing is a save as and rename the module. Then I delete all but a few of the slides that I will use as guides for the next module I'll be creating.
    The problem is that I still have all 100 of the advanced actions. I am wondering if there is a quick and easy way to remove them from my new template.
    Your help would be appreciated.
    Tricia

    Something very important is missing in your question: which version do you use? If you don't know me, I have been blogging since 4 years about advanced actions (and now about shared actions), but never had a template with over 100 advanced actions, you should have seen my face when I read this .
    Long time ago, a template was the only way to reuse advanced actions, this was/is a very popular article: Template for reusing script? - Captivate blog
    And managing all those actions, especially if they were not very well documented (which is a pain in Captivate) or not well...sorry... designed, is very hard.
    In CP8.0.1 it is not only possible to have shared actions, but if you copy/paste a slide or an interactive object that has an attached advanced action the action will be included in the copy. My present work flow is to have much used shared actions in a separate file (not a template, a cptl-file). Contrary to advanced actions, shared actions appear in the Library and can be managed there: deleting them is a breeze, you have a Usage button like for other objects. I open that special file as an External Library in any other project. When you drag the shared action that you need to your new project, it will appear in the Library, and if variables are used in that action those variables will be created automatically.
    All this is not possible with advanced actions, no easy way to delete or manage them.

  • What kind of variable / advanced action would I need to do this?

    Captivate 8.
    I have a menu slide (of sorts) to allow users to choose which of four topics they want to explore first. It has 4 graphics with click boxes. Each click box jumps to a specific slide and the the user progresses through that section. At the end of that section, the user is automatically brought back to the menu slide, where they could then choose their next topic.
    I want them to be required to complete all four topics (in any order).
    When they have completed all four topics and are bounced back to the menu slide for the fourth and final time, I would like that slide to then have a button on it that they would click to move to the conclusion slides for the module.
    Thanks advance for the shove in the right direction.

    Another time, why is Search in this forum not working as it should. Have posted same answer at least 10 times.
    Have a look at: Captivate 8 - First Adventures - Captivate blog   where I use shared actions to create such a dashboard.
    First tip: you don't need a click box + graphic, because you can use a shape button filled with that graphic:, see Turn an Image into a Button - Captivate blog
    You need to create as many user variables as you have topics: v_one, v_two, .... with a default value of 0. They will be toggled to 1  in the actions.
    For each shape button (or click box if you really want to use two objects instead of one) you'll need a conditional advanced action with two decisions. I will label the button that has to appear after each topic has been visited at least once, Bt_Next. It is initially hidden.
    First decision of the advanced or shared action is a mimicked Standard action:
    'Always'
    IF 1 is equal to 1
       Assign v_one with 1   for the first topic, for a shared action v_one will become a parameter
       Jump to .... slide_11     slide to jump to, will be another parameter
    Second decision will check the value of the variables, and show the Next button if they have all the value 1
    'Checker'
    IF v_one is equal to 1  AND
        v_two is equal to 1 AND...
    Show Bt_Next
    BTW, long time ago I published this solution (with advanced actions) with a more detailed explanation: Template for reusing script? - Captivate blog
    Now it is no longer necessary to create a template to reuse advanced actions, you just create shared actions.

  • Flash Scripting not being recognised in Captivate

    Dear all, I hope someone can help.
    I am placing Flash created sections into a Captivate e-learning module and although my Flash (MX) file works perfectly in Flash (SWF), parts of it stop working when placed within Captivate (CP4)
    Quick description. The Flash file is an interactive menu, and I wanted a way of telling the user that they had already visited a section, so I created a "tick" that appeares when the user clicks on the button. I simply set the visibility to "True". on the button action.
    The issue is that I have a bit of scripting on the first frame to set the visibility to "False" to turn off all the ticks. This works great as a standalone SWF, but as soon as it goes into Captivate it no longer works.
    Here is the script to turn off the ticks...located on the first frame of the movie
    this.onEnterFrame = function () {
    _root.tick1._visible=false;
    _root.tick2._visible=false;
    _root.tick3._visible=false;
    _root.tick4._visible=false;
    _root.tick5._visible=false;
    _root.tick6._visible=false;
    _root.tick7._visible=false;
    _root.tick8._visible=false;
    _root.tick9._visible=false;
    _root.tick10._visible=false;
    Here is the script to turn on a tick from a button press. Pressing the button takes the user to a new section, and on entering the section, the tick appears...The script is atached to a frame at the start of a new section....
    stop();
    this.onEnterFrame = function () {
    _root.tick1._visible=true;
    Any help would be greatly appreciated...

    I'm having the same problem but adding this._lockroot = true isn't working.
    I'm adding an old sfw (flash player 6, AS1) to captivate 4. This flash file has a drag and drop activity and has this clip even on the root level.
    onClipEvent (enterFrame)
        if (_root.currAns == 6)
            allDone = 1;
            _root.currAns = _root.currAns + 1;
        } // end if
        if (allDone == 1)
            if (_root.correct._currentframe == 1)
                _root.congrats.gotoAndPlay(2);
                allDone = 0;
            } // end if
        } // end if
    I tried changing the _root to this. but that didn't work either.
    This is driving me crazy so if anybody knows a quick fix i would love to hear from you.
    thanks

  • Weird issue. Captivate 6 not letting me select a script for an Advanced Action

    Hi, So i'm facing this really weird issue on a captivate 6 project that i built. I need to add an Advance Action on a slide Exit action. This was previously set as "Continue" and now I want to set this to "Execute Advanced Action" (an Advanced Action script that I just wrote). The thing is that when I change the On Exit property to "Execute Advanced Actions", I am not able to select a script from the "Script" dropdown. I've tried everything from:
    changing machines and doing this on different computers with Captivate 6
    Making copies of the file and trying those
    Closing Captivate and Restarting my computer
    Ensuring that the slides are not locked
    but can't seem to figure this out. Also funnily, if I try to set the On Exit property of let's say slide 67 as "Execute Advanced Actions" (when it was previously just "Continue"), all other slides are also changing to this, meaning the On Exit property for all other slides has also been changed from "Continue" to "Execute Advanced Actions".
    I've been stuck with this for the last 6 hours and can't figue this out.
    Please Help!!!
    -Sean    

    If this is the same file you were having issues with before where we suspected corruption, then I'd have to say this probably confirms it.
    http://www.infosemantics.com.au/adobe-captivate-troubleshooting/recover-corrupt-project
    Usually the fix is to copy all slides into a new blank shell project of the same size to try and strip out the corruption issue.
    See item #4 here:
    http://www.infosemantics.com.au/adobe-captivate-troubleshooting/basic-troubleshooting-tech niques
    However, since you are on a Cp version earlier than 7.0.1, please note that this will also strip out all of your current advanced actions as well (which also might be where the corruption is anyway).
    Your issue is actually quite rare.  I cannot guarantee you that Cp 7 would never do the same thing, but one advantage of Cp7 is that you can try copying and pasting slides into a new shell project and it WILL bring along the advanced actions and variables as well.  So I definitely think it's worth downloading the trial version of Cp7, upgrading with the Cp 7.0.1 patch and giving it a go to see if that fixes your issue.
    Alternatively, if you haven't got lots of time-consuming Advanced Actions to recreate, just paste all slides into a new shell project and recreate them.  It's probably not going to take that long if it's only one project file.

  • Captivate 5: Problems with Java Scripts - Trying to Jump to a certain slide on Different Project

    I have the code here I researched for Captivate 5 to jump to a certain slide in a different project, this code was attempted to be used in both projects seperately and simultaniously:
    function GetSlideParam(){
    if(window.location.href.indexOf('?slide=') != -1) {
      var startIndex = window.location.href.indexOf('?slide=' ) + 7;
      var URL = window.location.href.toString();
      var slideNumber = URL.substring(startIndex);
      if(slideNumber != '' || slideNumber != undefined){
       setTimeout(function(){NavigateToSlide(slideNumber);}, 200);
    function NavigateToSlide(requestedSlide){
    var cpObj = document.Captivate;
    cpObj.cpEISetValue('cpCmndGotoSlide',requestedSlide - 1);
    cpObj.cpEISetValue('rdcmndResume',1);
    GetSlideParam();
    Here's my on success URL file in the button properties that was needed to jump to that certain slide according to my research:
    (my project to jump to).htm?slide=2
    In the end, it didn't work and just jumped to slide 1 on the other project no matter what I tried to do or how I altered the script and the project button and slide properties... Please Help... Just thought maybe you guys would know some more about scripting, that's why I'm asking you guys this regardless of it being a Captivate question because the Captivate Specialists couldn't answer my question being clueless about the scripting part of it.

    Tframe01 wrote:
    ... Just thought maybe you guys would know some more about scripting, that's why I'm asking you guys this regardless of it being a Captivate question because the Captivate Specialists couldn't answer my question being clueless about the scripting part of it.
    So the InDesign Scripting Forum is the place to ask about Javascript -- for any other program? Well, paint me red and call me Admiral Ackbar, I didn't see that one coming.
    Are you (and with you those "Captivate Specialists") aware of the fact that
    var slideNumber = URL.substring(startIndex);
    will return a text string, not a number? And so this next operation will (silently) fail, and return some default number instead (most likely, 0)?
    (stuff --) requestedSlide - 1
    If you already knew this, you will have to be more clear on what happens now, what you'd like to happen, and what Captivate actually is supposed to do (since I have no idea what it is).

  • Where is the script window in captivate?

    Hi
    I am reading through the Captivate 4 User Guide and am on Chapter 11 on "Variables and Advanced Actions". There is a tutorial on scripting on page 148 that steps me through how to set up a login slide with user name and password. It states on page 149 that to create a script I need to click on the Project menu and select Actions. "In the script window, create a script named validate with the following code:..." When I click Project>Actions, I don't see the script window. Any idea on what I am doing wrong? Thank you.

    Hello,
    Please click on the tab 'Advanced Actions'. This window has two tabs: your are on the first for Variables, second is for the scripting, called Advanced Actions.
    Lilybiri

Maybe you are looking for