Calling an external javascript variable in captivate

I need captivate to reference an external JavaScript variable to check if its value is 1 or 0. If the value is '1' I need to display a button, if the '0' button is hidden.

The reason why I need external is I want the customer to be able to change the value of the variable without having to republish files.

I know not if I add a JavaScript file and folder to "program Adobe Captivate 9 x64\HTML\assets", it will be always published whenever captivate publishes, the question is how Captivate to refer to the variable in the JavaScript file?

I use the latest version of Captivate 9.0.2 publish HTML5

Thank you

Gary

Thanks for your suggestions of Peter!

I managed to make it work last night using a different method.

First set the variable 'SP_Assess_Included' in Captivate with a default value of 0.

Then, I went in the folder "C:\Program Files\Adobe\Adobe Captivate 9 x64\HTML" and changed "index.html".

Then I added the following line in the

Tags: Adobe Captivate

Similar Questions

  • How to read the Captivate in external JavaScript variables

    Hello

    I want to develop the combination of quiz questions and test me Captivate simulations. And send the results to external JavaScript, so I can save it in the database.

    I have published the Captivate to HTML5, typed this code in an external .js file, and linked to index.html, but I get only the alert 'no ICC interface' interface is not detected, according to me. I tested from a local web server. Any ideas?

    ==============================================================================

    var interfaceObj;

    var eventEmitterObj;

    window.addEventListener ("moduleReadyEvent", function (evt)

    {

    evt. Data gate through the interface.

    This is the same as window.cpAPIInterface

    interfaceObj = evt. Data;

    eventEmitterObj = interfaceObj.getEventEmitter ();

    });

    Make sure window.cpAPIInterface is available

    If (interfaceObj)

    {

    Make sure window.cpAPIEventEmitter is available

    If (eventEmitterObj)

    {

    Add a listener for the CPAPI_SLIDEENTER event

    eventEmitterObj.addEventListener ("CPAPI_SLIDEENTER", function (e)

    {

    bogus var = interfaceObj.getVariableValue("slideNumber");

    Alert (cAns);

    window.cpAPIInterface.setVariableValue ("mySlideVisitCounter", lSlideVisitCtr);

    });

    }

    } else {}

    Alert ("No. IPC interface")

    }

    You're talking about data are not in this case, the window.

    eventEmitterObj.addEventListener ("CPAPI_QUESTIONSUBMIT", function ( e ) {}

    bogus var = e.Data.correctAnswer;

    Alert ("correctAnswer =" + cAns);

  • How to call the function of reading edge animate external JavaScript


    I have a symbol on the stage called "basket"... on the inside of the symbol is my graph that has a trajectory put on to the timeline (it's called "car_v1").

    On my stage, I have a code to hide the cart symbol with a class of external style sheet:

    SYM. $("panier") .addClass ("hidden");  (it's the css - .hidden {display: none ;})})

    I have a function that calls a file external javascript... Since this external file, I want to get the animation of scenario to work:

    This is the function call:

    checkCar();

    and here's the function:

    function checkCar() {}
    If (AdobeEdge.countCar == 5) {}
    AdobeEdge.getComposition("EDGE-172492634").getStage ().$("cart").removeClass ("hidden"); This works!
    AdobeEdge.getComposition("EDGE-172492634").getStage ().$("cart").play (); does not work!        <-this is the line I need help!

    sym.getSymbol("cart").play (); It works inside the border and the scenario animation works!

    }
    }

    Can someone help me get the playback feature to work my external javascript file? Thank you!

    Kristen

    Hello

    You can try:

    function checkCar() {}

    If (AdobeEdge.countCar == 5) {}

    iCall var = AdobeEdge.getComposition("EDGE-172492634").getStage ();

    iCall.$("cart").removeClass ("hidden");

    iCall.getSymbol("cart").play ();

    }

    }

  • How to call the sym.stop to an external javascript

    I tried different ways to call the sym.stop function, but not being able to stop the animation of an external javascript. Help, please

    Hi, metalshan-

    I posted a sample file in response to the same question by another user:

    http://forums.Adobe.com/message/5289458#5289458#5289458

    Hope that helps!

    -Elaine

  • Is it possible to call actionscript from Javascript?

    Is it possible to call actionscript from Javascript without using the external Interface. The call comes from Javascript of Flash actonscript.

    Kind regards

    Yes. If you call a Javascript function that does not exist, you will get an error.

  • Apex plugins - how to reference the attributes in external javascript plugin?

    Hello

    I created a plugin for item-level.
    It works very well, however I have faced with a new problem - I need to make reference to attributes in the external javascript code of the plugin.

    Here's some of my Javascript:
    function boxesCheck(){
     var itemName = "P" + getAPexVariable("APP_PAGE_ID") + "_DESCRIPTION_ML";  
     var vResult = "";
     
     if(document.wwv_flow.f30.length>0){
       for (var i = 0; i<document.wwv_flow.f30.length; i++) {
           document.wwv_flow.f30.checked=true; 
         
    vResult = vResult + '[' + $.trim(document.wwv_flow.f32[i].value) + '|' + $.trim(document.wwv_flow.f33[i].value) + ']';
         
    }
    }else{
    document.wwv_flow.f30.checked=true;
    vResult = '[' + $.trim(document.wwv_flow.f32.value) + '|' + $.trim(document.wwv_flow.f33.value) + ']';
         
    }
         
    $x(itemName).value = vResult;

    apex.submit();
    }

    function addRow_new(){
    $('#report-standard1').append('<tr class="highlight-row1"><td class="data" headers="CHECK$01"><input type="checkbox" name="f30" value="1" onclick="highlight_row1(this,1)" id="f30_1" /></td><td class="data" headers="LANG"><input type="text" name="f32" size="80" maxlength="100" value="" style="width:85px" size="12" id="f32_1" /></td><td class="data" headers="DESCRIPTION"><input type="text" name="f33" size="80" maxlength="100" value="" style="width:345px" size="46" id="f33_1" /></td></tr>');

    }


    In the above code 2 values has to be substituted by plugin's attributes:
    1st function: var itemName has to receive the plugin's Item Name.
    2nd function: #report-standard1 has to be substituted by plugin attribute.

    How to do it please?
    Thank you!

    Hi Sloger,

    Modify your function to accept two parameters, something like this

    function boxesCheck(pParam1,pParam1){
    //and use them as required within the function
    ...
    .
    .
    

    How you call this function of boxesCheck of your plugin? He must be somewhere in your plugin code.

    Simply pass those two values as parameters

    Thank you

  • Passage of variables in Captivate to Flash widget

    Hello

    I'm developing a widget progress bar simple in Flash to add a Captivate course that I build.  I think that what I want to do is very simple, but I seem to be missing something.

    Quick description:

    • I created a variable in Captivate 5.5 called intProgress , which should be a percentage of the student throughout the course. I set this manually via a tip Action entering the slide.
    • I also created a widget in Flash 5.5 progress bar.  It consists of nothing other than a manual progress bar in Flash component.
    • I want to feed this intProgress of Captivate my Flash widget value and accordingly update the progress bar.

    Here is my function (PDB is my progress bar)-

    function courseProgress (intPercentage)

    {

    aPb.setProgress (intPercentage, 100)

    }

    And here's how I'm trying to pass the variable:

    courseProgress (MovieClip .intProgress (root));

    It does not resemble the variable is coming in front of Captivate to the widget.  How to do this?

    Please let me know what I am doing wrong or what I'm missing here.

    Thanks for any help anyone can provide!

    Daniel



    I think that your problem is that you have this code in the cpSetValue() function which is called only once at the beginning of the film. If the variable cannot be read at the beginning of the film and is not updated for each slide.

    Try to add this code to your cpSetValue() function:

    addEventListener (Event.ENTER_FRAME, updateProgress);

    And to put this function outside of it:

    function updateProgress(e:Event):void

    {

    myText.text = "label:" + m_VariableHandle.cpInfoCurrentSlideLabel;

         myText.text = "prog:" + m_VariableHandle.intProgress;

    }

    Now the code above is not very effective. Basically it updates the text box with the variable for each frame of the movie. However, if it works, I'll go into details on how you can get it to update only when you enter into a slide.

  • External javascript file in the page login.html Campus Mobile

    Hello


    We try to load an external javascript file of Mobile Campus of Oracle application login.html page.  The code works in the Android app, but not the IOS app.  Here is a code snippet:

    Can you offer any help on how we can get the javascript code to load correctly for iOS?  The code is not local to the application is because we're going to make changes so that it displays various messages on the login page at different points throughout the year.

    Thanks for any help you can provide!

    Just wanted to give everyone an update and let you know that we have understood the question.

    in the file Application.xml - MAF, we added our URL to the white list (Security tab).  This allowed the application to invoke successfully the javascript code for the external file.  I hope it is useful to someone, as it seems to help others / Oracle support on this forum is unlikely.

  • Prompt to add external JavaScript

    How can I get Dw CC 2015.1 build 7851 for ask the location of an external JavaScript when I add the < script tag?

    Thank you

    When the browse option appears, you press enter/return, and it will bring up a dialog box browse to a normal file.

    If you type

  • page element to reference in the external JavaScript file

    Hello

    Anyone know how I can refer to page within an "external JavaScript file elements?" Things such as $v ('P3_ITEM1') and & P3_ITEM1. works great if I put the JavaScript code directly in the page header - section of JavaScript. For ease of maintenance, I want to move these JavaScript codes in the external file on the server. I tried the two $v ('P3_ITEM1') and & P3_ITEM1. and they do not work in the external JavaScript file - 4.1.0.00.32 apex.

    Thank you.

    Andy

    Andy,

    Something like this should work. You should not add pAppID or pSession as parameter, if they will always be entries on the page.

    APP_ID: $v('pFlowId')
    SESSION: $v('pInstance') 
    

    and make sure that all substitution strings are replaced.
    >
    var ajaxRequest = new htmldb_Get (null, & APP_ID, 'APPLICATION_PROCESS =?', 0);
    >

    Kind regards
    Janet Tyson

  • How to display the value of a javascript variable in a region of html?

    Hello

    I need to show my title of the page or in a region of html.
    I added a script in the < title > section header of style...:
    (Thanks to Andy: page attributes Get page name? )
    <script type="text/javascript">
    var pageTitle = '#TITLE#';
    </script>
    ... so I can use it in a javascript variable.

    But now I don't know how to view in html syntax...

    Thank you!
    Fanny

    ... so I can use it in a javascript variable.

    See no reason to change the templates to introduce a needless global JS variable when the document property is already there. Display using an appropriate HTML element, for example h1 if it's the overall page header.

  • Problems with external javascript file

    For some reason, I can't get a text external/javascript [.js] file works correctly on my Web page. I went to Adobe Help Viewer and follow the instructions clearly. But it all comes to a cause I can't seem to see a little icon in fashion design javascript to connect my widget external javascript to support javascript on my page. Why is this? I have the visual aid invisible items checked as well. Here is an article of the code below.

    Rufus65 wrote:
    > I'm sorry, I went from one problem to another, the first problem with the
    > javascript shield was my main problem and the first and its fixed. now, it's a new
    > problem, but I think I can just cut this time around, I got the codes mutilated
    > of this site: http://www.widgetbox.com/#. it allows you to customize your own
    > widgets and I thought that it was legitimate, apparently is not. to solve my javascript
    > problem, basically I want to just a website that has downloadable widgets for me
    > to insert into my website using dreamweaver CS3. That is my main task, I was
    > trying to accomplish. I started 5 steps before this goal which was not brilliant
    > at all. So my main problem [outside my other topic post on my screwed upward
    [> header] is just to get legitimate widgets that are free and easy to use in
    > dreamweaver CS3, cause I don't have time to learn Javascript code or whatever it is
    > close to him.

    Depends on which widgets you want and what you need to make them specifically for you. Maybe start a new thread, listing widgets that you feel you need and what you want to do with them.

    You do not have available in the Insert bar Spry widgets, but they can or may not be able to accomplish some of the things you like to do, be specific about what you want to do on your end, and what you want the end result to be. Send examples if you have.

    Many widgets will require some, if not encoding extended, to get the best out of them. For example, widgets to http://ui.jquery.com/ can do something relatively well, but in Dreamweaver CS3, you need to enter the code to be able to set a lot of options.

    Where it's important, DWCS4 added a "web widgets" option that allows you to install widgets from the Exchange:
    http://www.Adobe.com/cfusion/exchange/index.cfm?s=5&from=1&o=desc&cat=290&l=-1&event=Produ ctHome & exc = 3

    But even once, they may need a little digging intot he code to get the best of them.

    HTH

    --
    Danilo Micen
    | http://blog.Extensioneering.com/
    | Extensioneer WebAssist
    | Adobe Community Expert

  • Problems using Captivate in JavaScript variables

    I am running JavaScript associated with click box in Captivate. The script is designed to assign a variable that is defined for the user with a value based on the user by clicking on this area. I was able to assign a value using the code:

    document. Captivate.SetVariable ('Item1', 1);

    where 'Item1' is a variable I set. However, now I'd like to be able to use the value of Item1 update as part of a calculation of the total number of items clicked on this page. I tried the code:

    document. Captivate.SetVariable ('Total', document. Captivate.GetVariable ("Item1") + document. It ptivate. GetVariable ("Item2") + document. Captivate.GetVariable ("Item3"));

    where 'Total' is a variable I set. I tried several variations on this code but none worked (I could get to show the values of the variables, but it seems to be to treat them as text rather than adding the values). I am able to implement multiple actions and that the system is running the first JavaScript and then also use the Increment function to add to the variable 'Total '. But I prefer this if possible in JavaScript. Can someone tell me if there is a script that will allow me to perform a calculation in JavaScript based on a combination of variables defined by the user? If so, examples of code would be greatly appreciated. Thank you!

    Try this link.

    http://JavaScript.about.com/library/blstrnum.htm

    Google can do wonders when you take the time to research.

  • Import of variables in Captivate LMS

    I want to recover the data from the LMS (Moodle) my Captivate class - capture the name of LMS students specifically, and display it in Captivate. I read a previous debate on that, but it ended without a definitive answer, that seemed.

    Looks like that first the SCORM data in the variable must first be passed to a Flash embedded via javascript file and then sent to Captivate of Flash. A suggestion of the post hinted that this could be done without javascript step.

    Anyone successful with this? And with SCORM 1.2 or 2004? I would be very happy to advice if someone has done this...

    Variable SCORM (student's name)-> Javascript-> embedded Flash file-> Captivate displayed in...

    Thanks in advance to anyone who can help!

    Why sure... it works with Flash AS3, CP5.5 and Moodle as the LMS...

    First, I created a small 10 x 10 px, flash file an image to import into Captivate (want to just ACE code to run, its hidden in a black neighborhood of my background in slide 1...)

    In the framework, and then entered this code:

    Get the name of the student of LMS, SCORM

    to import flash.external.ExternalInterface;

    try {}

    Assigns a string name of the LMS student

    var UserName:String is String (ExternalInterface.call("saveglobalscore",score) ('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 ("and not in an LMS at the moment");

    }

    Send name to Captivate

    var myRoot:MovieClip = MovieClip (root);

    var mainmov:MovieClip = MovieClip (myRoot.parent.root);

    mainmov. Name = name;

    Then, this flash file on slide 1 of my lesson of Captivate, where I display the first name value I get from Flash. You know, ' welcome, $$FIrstName$ $! Then when I start my lesson in Moodle name appears...

    A nice quirk, it didn't worked at first - it seems that Moodle would begin the lesson of Captivate and the ACE in the Flash file to run at the same time, it would not disconnect the first name. So I put the animation Flash delay.5 seconds in the timeline, so the lesson of Captivate would begin, a short break, then the code YOU run and I got the name. And also, the area of text in Captivate with variable display of $$ $$FirstName must appear after the Flash code received the name of LMS, then I put delay 1 sec on the timeline.

    It was there, I added nothing to the external .js file. Maybe this will help someone! Thanks again for pointing me in the right direction...

  • Pass the URL query string variable to Captivate?

    I created a Flash button for my total Captivate, it uses PHP to update a CSV file with the user name and the id of course.

    The user name is from a URL string. If it was just a Flash file, I could pass the page HTML using FlashVar values. My flash button is not exposed until the last slide in the room of Captivate. How can I get this value so that my Flash button can pass it?

    If the value passed to the FlashVar to the Captivate swf, is a local variable that can be called from the Flash button? I know I did not adequately explain this right, but maybe someone can decipher this enough to get the gist.

    Hello

    Just write a javascript in html function that returns the user name.

    Call this function in your flash movie using the external interface call

    Hope this helps

    Delighted Kishore.

Maybe you are looking for

  • calling unaproved

    When I try to download capitan it won't let me a window will apear saying calling unaproved

  • Apple vs Outlook 2016 (v 15.23) mail

    My wife uses Apple Mail (Captain El - MacBook) to the e-mail of his work. It is an Exchange Server, the mailbox is large enough (> 25 k messages in 4.6 GB). For some reason any Apple Mail is not stable and closes several times a day. However the ques

  • Satellite L300 - upgrade to Windows7 Home Premium

    Hello (Sorry for my bad English)I have update of Vista home premium Windows 7 premium home with the Update CD sold by Toshiba. Am I forced to download the new drivers for Windows seven or these drivers are located on the Toshiba CD? Thank you... bye

  • Win 7 issues... Help

    I have a new 64 bit, Win7 IE8 system. It seems to me to be hitting brick walls everywhere. #1-installed AOEIII, it seems ok, but the installed "Asian Dynasties" expansion pack does not appear in my programs and will not work for more than 5 minutes w

  • Event ID 5 to start when I start my computer

    My product is not there... the only product of Kaspersky, I ran, is Kaspersky Virus Removal Tool, which is a standalone program.