Incomplete advanced action script

This is nuts. I must be really spaced out or something...

I haved a very simple advanced expression of action using the user variable that has been initialized:

quizQuestCount = QuizQuestCount + 1

I can't save it in the current draft of cap 6; Captivate said that the script is incomplete.

Works fine in another project.

What might be missing?

Make sure you explicitly select the operator (sign +).  You may be misunderstanding the fact that you can see the sign as a default value in the drop-down menu + and think it means it is actually selected when in fact it has not been yet selected.

So, choose the operator again.

Tags: Adobe Captivate

Similar Questions

  • Advanced action scripts - y at - it a variable that tells me which button is clicked?

    Lilybiri gave me some great tips on the use of conditional tip action scripts. Now, I have another related question.

    I have three buttons A, B and C. Each button performs exactly the same series of actions to hide everything on the page, but shows another group of objects depending on which button was clicked - that is, to display the Group A and Group B group C.

    Currently, I have a separate advanced action script for each button (in fact a lot more than three) because of this difference, then want to combine in a single conditional script. However, I can't understand how I would like to know which button was clicked.  In other words, I think that my conditional script should look like this:

    The condition "always."

    If 1 is equal to 1

    [Script to hide all]...

    Continue

    Condition 'has '.

    If MyButton is equal to 'A '.

    See the group_A

    On the other

    Continue

    Condition 'B '.

    If MyButton is equal to 'B '.

    See the group_B

    On the other

    Continue

    Condition 'C '.

    If MyButton is equal to 'C '.

    See the group_C

    My problem is that I don't know how to set or get the value of MyButton to perform conditional tests. Is there a system variable that returns the value of a selected object? I looked at all the variables, and I don't see one. Or y at - it another way to do what I'm missing?

    You probably can find with Javascript, but not with advanced actions. All the available system variables that can be used - there are more - are in a table that you can download here: System variables in Captivate 8 - Captivate blog

    I have several articles on the shared use of stocks. You apply the same instance of a common action several times and don't have that to indicate parameters, in your case these parameters will be for most groups and objects. I hope that stocks shared will expand more in the future. They have several advantages: given that you use multiple instances of the same action that they do not increase the file size as duplicate advanced actions. In addition, you have them in the library that makes management much easier.

  • Looking for Advanced Action script that will close the project

    Hi all

    It seems so simple but I can't seem to understand. Does anyone know of scripts that will cause the project to close when the user clicks a button? I have a project built in 6 Captivate that is set to close its 'End of the project' preferences and has multiple options of branches. I want to have a button to END that will close the entire project. The best that I got is simply apply an action of 'CONTINUE' on the last slide, but since this slide also includes a button that jumps to another branch, the blade simply crashes when you click the END button.

    Any thoughts?

    Krista

    You can use a 'Execute JavaScript' action with the script below:

    window.close();
    

    OR

    window.top.close();
    

    What script you use depends on how your LMS launches your course.  If it is in the main window, use Window.Close ().  If it is in a window child, then window.top.close ().  If you are not sure, then a little experience by downloading a course of a slide with two buttons.  The first button must execute Window.Close (); and the 2nd button must execute window.top.close ();.  When your LMS is launching the course, try the buttons and see one that works.

    F12 (Web Preview) will not give you a solid test since your LMS can launch your course differently... it's the kind of thing that should be tested in your LMS to be sure it works.

    Jim Leichliter

  • incomplete script in advanced actions

    Hello world!  I have a problem that I can not understand.  I got an existing course to another developer and they have an advanced action is defined on run javascript - code is as follows:

    Original code

    winRef var = window.open ("", "targetWindow", "height = 400, width = 400, menubar = no, scrollbars = yes", false);

    var slideRef = window.cpAPIInterface.getCurrentSlideIndex ();

    transcript of var = $("#transcript_"_+_slideRef_+_"accStr").text ();

    var doc = winRef.document;

    doc. Open ("text/html");

    doc. Write (transcript);

    doc. Close();

    This works, but it does not display the text formatted correctly, so I changed it to this:

    Updated code

    winRef var = window.open ("", "targetWindow", "height = 400, width = 400, menubar = no, scrollbars = yes", false);

    var slideRef = window.cpAPIInterface.getCurrentSlideIndex ();

    transcript of var = $("#transcript_"_+_slideRef_+_"accStr").text ();

    splitText var = transc.split("|");

    var doc = winRef.document;

    doc. Open ("text/html");

    for (i = 0; i < splitText.length; i ++)

    {

    doc. Write (splitText [i] + "< br br > > <");

    };

    doc. Close();

    This code works fine when tested on a separate page, standalone HTML, but whenever I try to update in advanced actions, it will not change.  When you take things off line by line, I discovered it's the loop who dislikes Captivate.

    What I'm missing here?  Thank you guys!

    Generally, you cannot use a loop in the JS window.

  • Advanced Scripts of Action does not not in the advanced Actions window

    I have no idea how or why it happened, but on some scripts that I applied to some buttons, when I click on the folder icon to open the script in the advance action window, the script does not load. It shows just blank like this (screenshot below). If I try to select it from the dropdown of existing shares, it does not load. If I try to make a new script again, it will work initially, but the same thing happens if I try to open it again. No idea how to solve this problem?

    ExistingActions.jpg

    It looks like the corruption of the file. You're careful with naming of decisions and measures? Never use a name that has already been used for another object.

    If you copy an interactive object in a new project, the action in the annex is copied (at least if you're on CP8 or 9).  Normally slides copy and paste in a new project could help, only bit worried on the copy with the actions.

    Have you already restarted Captivate and maybe your system as well? Worth a try.

  • Is it possible to group objects, which are placed in the project and then hide them with line a single action-script? THX in advance, Philip

    I work in CP 9 and I'm going to try the following: the user must be able to make ALL invisible or visible to highlight boxes by clicking on the corresponding button on the first page layout. Thus, for example, if the user does not want the highlight boxes appear, click on "Hide the boxes" and boxes are hidden for the rest of the project. I managed to get to this point for help... but it is still a lot of work for me to manually enter all the different names of these boxes in the action-script. So my question is: is it possible to group objects, which are placed in the project and then hide them with line a single action-script? THX in advance, Philip

    Actually... releasing the CpExtra HTML5 widget, it will be possible.

    It has a function called @syntax that allows you to perform an action (for example HIDE) automatically on any object throughout a project of Cp9 simply based on the name of the object.

    So for example, if you named all the boxes to highlight you want hidden this way to have the suffix _HideMe and you say CpExtra you want all of them hidden if a user variable is assigned to a certain value, then that is what will happen.

    That's the good news.  The bad news is that the widget is still in BETA final tests at the moment, so you may need to wait a bit before you can realize your idea.

  • JavaScript for loop to execute Advanced Actions - execute Javascript does not?

    I use a loop to check the value of a Cookie.  When I add this using Execute Javascript it works fine but I want to run with certain other actions, if I want to use Of execute advanced Actions. When I add this coded to an action to run Javascript in the breast to perform advanced Actions code disappeared if I open the Script window again once.  I try to remove the code for loop in bold below and then the remaining code remains.  So I think that the problem must be with the loop for, but I don't see anything wrong with this code and I have, as I said that this code works fine if I use Javascript to run on its own. I've attached a video clip below to show what I mean.

    var task1_value = readCookie ("task1");

    function readCookie (name) {}

    var nameEQ = name + '=';

    var CA = document.cookie.split(';');

    for (var i = 0; i < ca.length; i ++) {}

    var c = ca [i];

    even if (c.charAt (0) ==' ') c = c.substring(1,c.length);

    If (c.indexOf (nameEQ) == 0) return c.substring (nameEQ.length, c.length);

    }

    Returns a null value.

    }

    I found that window JavaScript of CP does not like loops.

    Your best bet is to put the function in an external JS file from the top of the page. I always run scripts in an external file. Really helps debug that you do not have to republish Captivate. Just change your code and refresh the browser. If you use external file you can store all your functions there.

    I would also look into using the local storage instead of cookies. Very easy to implement and you can store a ton of information.

    Local storage - dive into HTML5

  • The execution of several advanced actions?

    I wonder if there is a way for an object or page to run more than one tip action, or have a call to action script advanced another script (I.e., nested scripts).

    For example, let's say I have a tip called "Close_all" action that hides all objects on the page. When the user clicks A button, it executes Close_All.

    Now I add button B who must do something else (for example, show a different object) in addition to fill the same function as Close_All.

    Is there a way I can run Close_All in the action script Advanced button B without having to copy the script Close_All?

    I don't want to have to create a copy of Close_All, because if I have to change something in this script, I have to also remember to make the same change in all copies.

    The condition is in the part of the State, possible actions are at the TIME and the ELSE part. And thanks to a combination of several decisions, which are always evaluated in order. In your case, you have a (scenario A) sequence that should be executed regardless of the condition, in this case you put it in a standard simulated action:

    First decision "Checkit".

    IF page = X

    Go to page X

    ON THE OTHER

    Continue

    Second decision "always."

    IF 1 is equal to 1

    sequence of commands you have in the script

    You see, no need to repeat the actions at all (and copy/paste works very quickly if you want a decision)

  • Stop() does not, from 2.0 to 3.0 action script

    Hi everyone, some years, I created a website in Flash with Actionscript 2.0

    Now, the client wants to change something in the text and I fall on action script 2.0 became 3.0

    This means that my stop() (I have the kind of menu on the left to be displayed later frame of 5-10 for example)

    Now my swf works when I run it locally, but when online it just goes and...

    someone at - it an idea? I'm going crazy...

    Thanks in advance!

    the site can be considered www.kitwerken.be/index.php

    and the party is "Over ons.

    I don't think that the actionscript code could change itself.  If you use Flash CC, then the problem is that CC Flash isn't compatible AS2, so it took your file and it changed to AS3.  You will need to get your hands on an old version of Flash (CS6 or earlier) to edit the file and keep it as an AS2 file.

  • Timeline navigation in action script 3 based on a key

    Hello!

    I have been using action script 2 for a bit and got decent with it. I'm doing a project that requires a lot of basic key to the timeline navigation. But I can't understand in action script 3?

    In the action script 2 I could just type something like... (Bad example)... Press key "A" Gotoandplay (5)

    But like I said I can't understand things in action script 3. I learned how to use a button on the screen to do that, but it is not the purpose of the project.

    Any help would be much appreciated!

    Thanks in advance!

    You have renamed the event handler function such as the event listener is by specifying / call a function that does not exist

  • action script 3, swapChildren with setChildIndex problem

    Hello to everyone! I do a fighting games of action script 3, and I'm having a problem with swapChildren and setChildIndex. the case is the last fighter who attacked gets in front of the other, so I use swapChildren(fighter_1,fighter_2).

    While the fight goes it works fine, but when the fight ends and I change the second intertwined scene veterans depths during the struggle always appear on the scene! sound like they have been duplicated! does anyone have a solution? Thanks in advance!

    to remove a displayobject and maybe it null, call the removeF:

    function removeF(dobj:DisplayObject,nullBool:Boolean):void {}

    {if (dobj.stage)}

    dobj.parent.removeChild (dobj);

    }

    {if(nullBool&&dobj)}

    dobj = null;

    }

    }

  • Captivate 6 - Advanced action does not work in the project?

    Hello

    I use 6 Captivate. In my project I have a common slide2 which is called when clicking on the two different buttons (C1 and C2). Slide 2 contains several objects, saying Text1, text 2, 1 button, and Button2.

    Slide 5 I have a C1, I defined the on success action: execute advanced actions

    Script: If CPIntoCurrent Slide is equal to 5

    Action:

    Go to slide 2

    See the Text1

    See the Button1

    Hide Text2

    See the Button2

    Similar action has been set to C2 (slide 8) redirecting to slide 2 showing the Text2 and Button2, hiding other objects.

    These scripts where works fine, until I installed a patch on the adobe site. The patch was intended to display the video correctly in the PDF when selected the option display the table of contents.

    But unfortunately he's completely unbalanced the script of existing projects. I also tried to uninstall completely and fresh install Adobe Captivate, but not luck .

    Help, please.

    @Rod and with a concern for users of later versions (I'm not sure 6, this version did more) 6.

    It is perfectly possible to show/hide objects of an 'Advanced' action (not with a simple gesture) that is running on another slide of the slide corresponding to the object. I am certain about it for versions 7 and 8. I have not been much about 6 blogging and was bit sloppy on this release to keep track of all the changes. If you don't believe me (what happens in these forums), CP8 users take a look at the example file Cloudair included with this release: the action advanced in the first slide shows/hides objects anywhere in the file based on the information of the new cpInfoGeoLocation of system variables.

    Rod, I see you post this comment often, I just wanted to add these details. As I explained that I don't know when this change occurred (6.1 is my suspicion, but cannot test). In CP5 you could hide objects that have been timed for the rest of the project on a slide different than its original location. Since 5.5, you might also show this type of object.

    Lieve

  • Action Script 3.0 for Flash Professional CC running Windows

    Hello world

    I am trying to learn Action Script 3 on Flash Professional CC. The video I'm following courses on Lynda.com and they all speak when referencing an instance of a clip that hits this instance name followed by the (dot) will show a list of available properties for this instance. I see this in action when you watch the video, but when I try properties do not appear. For example, I have a video clip of a circle on my scene and the instance of this clip is named mv_Circle

    When I type the line 1 > mv_Circle.   There should be a list appears displaying the properties, but this does not happen, so I try to guess what the property could be and what its value might be. Example of setting the alpha of this instance I type

    1 > mv_Circle.alpha = 0.5;     but the word alpha does not appear in the supposed list. I'm doing something wrong or I have put in implementation hurt somewhere. My OS is Windows 7 64 bit or victory 8 64-bit. No computer will give me this option.

    I really hope that someone can help me because it drives me crazy. Thank you in advance.

    Dougie

    You can "type" (in other words, explicitly tell Flash of the object class) first mv_Circle:

    var mv_Circle:MovieClip;

    .

    .

    .

    Enter mv_Circle point, you should see the available properties.

  • Can I use conditional and advanced actions on the same button?

    I'm fairly new to Captivate, but come from a flash background and I do of Captivate to do certain things, that I expected to be straightforward and a normal requirement.

    I want to create a screen with a number of interactive objects, in this case photos, it's the learner clicks on to display a text element.

    By clicking on the following image, the first piece of text is hidden and a second piece shown.

    There are 6 images/buttons which have to work in this way.

    However, I also want to determine if all the buttons have been used, as we force the user to view the entire slide before you continue.

    I can do the hide/show text and buttons, and I wrote a conditional action to check the variables for each button. However I do not know how and when to appeal to this action.

    I was hoping that in my Advanced action for each button, I could add in a call to the conditional action "record"variables", which would be very well fulfil this requirement, however this doesn't seem to be the case."

    I also animation/effects on the timeline before the images are on the meaning of screen I want to go back to the beginning of the timeline to use an event "on enter.

    I am surprised that this isn't something that people most need because while it may be frowned upon outside in the field of e-learning, disabled navigation is frankly not will disappear and working for a large corporation will be a must.

    If anyone can shed some light on this, or perhaps suggest a better approach then I'd appreciate it.

    Thank you.

    Of course, it is possible. This is the approach I explained (for previous versions):

    http://blog.lilybiri.com/template-for-reusing-script

    The models that I offered it, were invited to a lot of times and are used all over the world, which is funny

    I also have templates for CP6 and 7, but has stopped offering everything for free. And 7, you can have all the shares shared in a library that can be used as external library... just a tip: http://blog.lilybiri.com/new-features-in-captivate-7-dot-01

    Agreement on controls on effects for paths, please submit a feature request as many have already done to have the most control over the coordinate without having to change the XML file.

    It would be nice to have timed events. Jim Leichliter has a widget (only for the SWF) which allows some scripted events. The interaction of timer that can do as well, but is not very accurate because after that time there is always a lag of about 2 seconds.

    http://blog.lilybiri.com/events-and-advanced-actions tells us about the available events.

    Sorry for all these links, but advanced actions are my passion, since they appeared with 4. They are limited, all right, but I managed to convince many users to give them a try at different levels. Would love to train more users for this "point-and-click" approach that does not really need programming skills, but only a logical mind.

  • Alternate slides with JavaScript (or advanced Actions)?

    I was wondering if someone out there with the knowledge of JavaScript could help me a little...

    A colleague came to me with a question about randomization of the slides. We work in Captivate 5.5. The slides are all part of a quiz (but aren't question slides). They have a click box. The idea is that if the user clicks on the box (or off the beaten track), it shows a good (or bad) legend and then jumps to a random slide (new). If the user manages at the end of the slide without selecting anything, their time is running out and they get fried to a random slide and it is regarded as an incorrect answer. The user should see all of the slides in random order, with no recurrence.

    I created a tip Action, integrating the widget of random number, and it works. My problem is that the project has 50 blades, and I'm not sure it is very feasible with advanced Actions. As it is, my test with 3 random slides is an action with 4 conditional statements, so I'm not really looking to create one for 50 slides. (I don't know even if Captivate would be able to handle this).

    Is there a way (judging) to achieve with JavaScript instead? My vague idea based on my very limited knowledge of programming is:

    1. on enter first Captivate slide, create the array of random slides - 1 slide numbers (because cpCmndGotoSlide index starts at 0)
      so if I had a project where I wanted to shoot random slides 3-8, the would be [2, 3, 4, 5, 6, 7]
    2. Shuffle/random table
    3. set up a variable called slideviews = 0 to keep track of how many slides have been seen (and so which item in the table to move to the next randomly)
    4. Create a function that I'm going to run when I want to access a random slide (whether at the end of a slide or in the success or failure of a click on a square)
      something like... If slideviews < array.length, cpCmndGotoSlide = array [slideviews]; slideviews ++; Another thing, cpCmndGotoSlide is 8 (jump at the end of the slides)

    Of course, this lack of things (like the proper syntax and things needed to communicate with captivate)... but is sound logic? Is there a better way to do it?

    Come to think of it, the table and the slideviews variable should be saved if we wanted it works with bookmarking... I think that this project will be SCORM 1.2 LMS System.

    It would be nice to have a variable user I can access within the Captivate project and I can put in a legend to show the script #. Something like scenario = slideviews (I know that's not the syntax, reading series of JavaScript of Jim Leichliter on CaptivateDev.com, but that's the basic idea.)

    Anyway, pointers would be very useful! Thank you.

    Edit: I played a little bit; for randomization, I found a code online, and then I wrote something that automatically creates a table and a function for the jump to a slide randomly. Here's what I have so far (not tested in Captivate yet):

    var objCP = document.Captivate;
    
    var randomNumbers = []; 
    
     // The following creates the values for the array: 3 to 52.
     // I want to randomize slides 4-53, using cpCmndGotoSlide (index starting at 0) to jump to them
    
    for(i=3; i<53; i++) {
                        randomNumbers[i-3] = i;
    }
    
    var n = randomNumbers.length;
      var tempArr = [];
      for (i = 0; i < n-1; i++ ) {
        // The following line removes one random element from arr
        // and pushes it onto tempArr
        tempArr.push(randomNumbers.splice(Math.floor(Math.random()*randomNumbers.length),1)[0]);
      }
      // Push the remaining item onto tempArr
      tempArr.push(randomNumbers[0]);
      randomNumbers=tempArr;
    
    var slideViews = 0;
    
    var randomSlide = function() {
    if (slideViews < 50) {
                        objCP.cpEISetValue("cpCmndGotoSlide", randomNumbers[slideViews]);
                        slideViews++;
                        objCP.cpEISetValue("scenarioNumber", slideViews);
              }
              //after all the slides have been seen, jump to the final results slide
              else {
                        objCP.cpEISetValue("cpCmndGotoSlide", 53);
              }
    };
    

    I doubt it will work off the bat, but maybe this is a beginning?

    I managed to get things working, so I thought I'd post my (probably a little unwieldy and inefficient) code in case people come across this thread and want a starting point:

    var objCP = document. Captivate;
    var randomNumbers = [];
    var slideViews = 0;
    CVS var = 0;

    shuffle var = {function (array)}
    var m = array.length, t, j;
    so that {(m)
    j = Math.floor (Math.random () * m-);
    t = array [m];
    table [m] = array [j];


    table [j] = t;
    }
    };

    var jumpSlide = function() {}
    If (slideViews < randomNumbers.length) {}
    objCP.cpEISetValue ('cpCmndGotoSlide', randomNumbers [slideViews]-1);
    slideViews ++;
    objCP.cpEISetValue ('scenarioNumber', slideViews);
    }
    else {}
    objCP.cpEISetValue ('cpCmndGotoSlide', 52);
    }
    };

    var randomSlide = function() {}
    If (g_objAPI.LMSGetValue ('cmi.comments') = ") {}
    for (i = 3; i < 53; i ++) {}
    randomNumbers [i-3] = i;
    }
    Shuffle (randomNumbers);
    g_objAPI.LMSSetValue ('cmi.comments', randomNumbers);
    resume ++;
    jumpSlide();
    }
    ElseIf (resume = 0) {}
    randomNumbers = g_objAPI.LMSGetValue('cmi.comments').split(',');
    slideViews = objCP.cpEIGetValue ('scenarioNumber');
    resume ++;
    jumpSlide();
    }
    else {}
    jumpSlide();
    }
    };

    The random slide order is stored in cmi.comments, and the position in the sequence is stored in a Captivate variable called scenarioNumber. I could have stored the two variables of Captivate in cmi.suspend_data, but in the end, I liked being able to see the numbers when considering the SCORM data. To work around problems with initialization, I made the creation/restoration of the part of random numbers of the function which climbs to a slide randomly, so nothing is actually executed when entering the first slide.

Maybe you are looking for

  • EPrint labels do not align

    I'm trying to print labels via ePrint.  The labels have been created with Word, using a standard label Avery format (8160) and print on a HP Envy 4500.  The process works well, except that the alignment is incorrect.  Locally, the labels print correc

  • PC turns off randomly

    original title: my pc shuts off when I want that he my computer turns off sudenly while im using it. It shuts down without warning an i in bulk that I'm working on

  • Freezes and the laptop HP 8460p not close

    When to stop the laptop, it disconnects, displays "sutting down" and freezes at this moment, and remains so. Must press off for 5 seconds, stop the laptop. After the restart of a message is displayed, which There or closes normally, give the choice t

  • On startup, I get the message «...\SilkSun-Libapr-1.dll FAILED TO LOAD' can you help me please?

    During the loading process, a screen appears with the message above. I just 'X' out and move. The computer works normally and I never this message, while the computer is now operational. For the last 2 months or more, while the computer is running. I

  • WebEx / integration of telepresence

    Be grateful for help with what I'm trying to achieve - as there seems to be a total lack of documentation available on CCO that covers it! I CUCM 8.6 and have saved him a few EX90s. Video-point works great for internal calls. I also Express Starter P