Embedded JavaScript

Is it possible to use flash.external.ExternalInterface to embed JavaScript code in my AIR application or this interface only works in the context of a SWF running in a browser? I have several scripts use JS and I want to avoid having to transcribe them in AS3 so that I can use them.

You can call functions JS of asynchronous AS3 via the method of executeJavaScript() of QNXStageWebView. You can also trigger events in AS3 of JS.

Tags: BlackBerry Developers

Similar Questions

  • Help with embedding javascript in Muse

    I tried embedding javascript to detect and redirect mobile browsers, using the function "insert HTML", but the script becomes visible on the page. How can I keep that from happening?

    This is the script:

    (function (a, b) {if (/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|h iptop | iemobile | ip(hone|od) | iris | kindle | lge | maemo | midp: mmp | netfront | Opera m(ob|in) I: palm (os)? |)}) Phone | p(ixi|re)-/ | Plucker. Pocket | PSP | Symbian | Treo | up\. (browser: link) | Vodafone | WAP | Wi ndows (this | phone): xda | xiino/i.test (a) | / 1207 | 6310 | 6590. 3gso | 4thp | 50 [1-6] i | 770 s | 802 s | a wa | ABAC | AC (Re: oo | if-) | ai(ko|rn) | Al (av: ca: co) | Amoi | a (ex: ny: yw) | APTU | ar(ch|go) | as(te|us) | a ttw | AU (di | \-m | r | s) | Avan | be (ck | | nq) | bi(lb|rd) | bl(ac|az) | br(e|v) w | bumb | bw\-(n|u) | c55\ / | CAPI | ccwa | cdm\ | Cel l | chtm | CLDC. cmd\ | co(mp|nd) | craw | da (it: he's: ng). dbte. dc\ - s | Devi | Dica | dmob | do(c|p) o | DS (12: \-d). el(49|ai) | em(l2|ul) | er(ic|k0) | esl8 | EZ ([4-7] 0: os: wa: ze) | ETF | fly (--: _). u|g560|gene|gf\-5|g\-Mo|go(\.w|OD)|GR(ad|UN)|haie|hcit|hd\-(m|p|t)|hei\-|HI(PT|TA)|HP g1 (I: ip) | hs\ - c | HT (c (--| | _ | a | g | p | s | t) | tp) | hu(aw|tc) | jemti-(20 | aller | ma) | i230 | IAC (| \-|\/)|ibro|idea|ig01|ikom|) Im1k | Inno | iPAQ | IRIS | ja(t|v) a | jbro | jemu | jigs | KDDI | Keji | kgt (| \/)|klon|kpt |) kwc\ | kyo(c|k) | le(no|xi) | LG (g |------/ (k | l | u) [| 50 | 54 | e\-| e\ / | \-[AW]) | Libw. Lynx | m1\ - w | m3ga | m50\ / | my (you: ui | xo) | MC (01: 21: ca) | \-CR|me m (di: rc: ri) | MI (o8 | oa | ts) | mmef | mo (01: 02 | bi | of | do | t (-------| | o | v) | zz). MT (50: p1 | v) | mwbp | mywa | N10 [0-2] | N20 [2-3] | n30(0| 2) | n50 (0 | 2 | 5) | N7 (0(0|1): 10) | don't ((c|m) \-|on|tf|wf|wg|wt) | nok(6|i) | nzph | o2im | op(ti|wv) | oran | owg1 | p800 | pan(a|d|t) | pdxg | pg (13 |-------([1-8]|c)) | Phil | worse | pl(ay|uc) | pn\ - 2 | in. (ck | rt | themselves). PROX | PSIO | pt\ - g | qa\ - a | QC ([07: 12: 21: 32 | 60 | \-[2-7] | jemti-) | QTEK | R3 80 | r600 | raks | rim9 | ro(ve|zo) | s55\ / | sa(ge|ma|mm|ms|ny|va) | SC (01 | h\-: oo: p\-) | sdk\ / | is (c (\-|0| 1) | 47 | mc: nd | ri) | sgh\ | Shar | Sie (\-|m) | sk\ - 0 | sl(45|id) | SM (al: ar | b3 | it | t5) | so(ft|ny) | SP (01 | h\-| v-| v) | sy(01|mb) | t2(18|50) | T6 (00: 10: 18). ta(gt|lk) | tcl\ | -tdg\ | tel(i|m) | tim\ | Download - MB | to(pl|sh) | s(70|m\-|M3|M5)|tx\-9|up(\.b|G1|SI)|utst|V400|v750|Veri|VI(RG|TE) t | VK (40: 5 [0-3] | \-v) | vm40 | v oda | vulc | VX (52: 53 | 60: 61 | 70 | 80 | 81: 83 | 85 | 98) | w3c(\-|) | webc | Pentecost | ({(ation window.loc wi (|nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)) g) = b}) (navigator.userAgent |) Navigator.Vendor | Window.Opera,'http://detectmobilebrowser.com/mobile');

    In fact, takes Muse 1.0 by adding code to thesection. Go to 'Page Properties' and click the metadata Panel. Then paste the JavaScript code (inside a script like Abhishek tag shows above) in thesection edit box. Muse come out then this script code in thesection of the page.

  • Embedding javascript graphics in the adf?

    Hello

    I need to incorporate javascript Camembert in the adf and I am a beginner and I don't know how?

    I will be grateful if someone could help me in the present.

    Thank you

    It will not work like that.

    -When you have added your javascript code exactly?

    -You just included javascript for jquery, but you must include libraries for higcharts (as for example: higcharts.js)

    In addition, this isn't very good place for the tag af:resource (this should be placed at the side of af metaContainer: document tag)

    -$(document) .ready () probably does not work.

    - method should be the name of javascript function (if you need to write a javascript method and use the name as the 'method' property).

    -commandButton control should probably have partialSubmit = 'true '.

    -You must attach graph to some html (such as div) components and id of this item of RenderPieChart() function reference

    So, this should probably be similar to the following (note that I'm writing this online so you will need to correct typos)

    In your page:

    
    
      
          
              
          
          

    In js/chart.js:

    function RenderPieChart(elementId, dataList) {
        new Highcharts.Chart({
            chart: {
                renderTo: elementId,
                plotBackgroundColor: null,
                plotBorderWidth: null,
                plotShadow: false
            }, title: {
                text: 'Browser market shares at a specific website, 2010'
            },
    
            tooltip: {
                formatter: function () {
                    return '' + this.point.name + ': ' + this.percentage + ' %';
                }
            },
    
            plotOptions: {
                pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                        enabled: true,
                        color: '#000000',
                        connectorColor: '#000000',
                        formatter: function () {
                            return '' + this.point.name + ': ' + this.percentage + ' %';
                        }
                    }
                }
            },
    
            series: [{
                type: 'pie',
                name: 'Browser share',
                data: dataList
            }]
        });
    };
    
    function showChart(){
       var data = [
              ['Firefox', 42.0],
              ['IE', 26.8],
              {
                  name: 'Chrome',
                  y: 14.8,
                  sliced: true,
                  selected: true
              },
              ['Safari', 6.5],
              ['Opera', 8.2],
              ['Others', 0.7]
          ];
    
        RenderPieChart('chartContainer', data);
    };
    

    Dario

  • JavaScript form stop working when I upgraded to DC

    I have several forms that have embedded javascript that performs calculations. Works fine until I upgraded to DC, now they do not completely work. Counsel on what look?

    The problem is caused by the name of a function in a JavaScript to the document level. The programmer named 'calculate', which is in conflict with the document to calculate property. Previous versions allowed you to overwrite a document in this way property, but Acrobat DC does not work. I must say that it was a bug in previous versions that have allowed this. It is not possible to overwrite other properties of a document in the same way. So the solution is to rename the function (for example, to "calculate1") and update all the code in the form that calls the function.

  • JavaScript for tracking and features such as animation, graphic, dragging etc.

    Hello

    Could someone let me know if it is possible to add JavaScript custom pages for tracking and features such as animation, graph, move etc in Muse itself?

    Thank you

    VJ

    Hello

    Please see the links below which provided some gre to insert JS into the Muse Site.

    https://forums.Adobe.com/thread/1180317?TSTART=0

    A simple way to insert stuff Jquery and Plugins custom in Muse

    Help with embedding javascript in Muse

    Concerning

    Vivek

  • Charge @2 x images of the retina on retina equipped iPads?

    I saw a number of ways to dynamically load the version of the retina of an image (with @2 x added the filename), but none of them seems not to work with animations of edge. I'm guessing that this is because these solutions work within the CSS and not embedded javascript. Has anyone found a way to dynamically load the retina images based on the device?

    Hi there, you would have to hack yourself, but you could potentially take advantage of the image path variable and change the path based on window.devicePixelRatio. Have a path non-retine and 1-way for devices of the retina, 2 sets of images, 1 store in each directory.

    The "im" var is set at the top of this file: youFileName_edge.js

  • SetFocus in one control by default during pageload

    Hello

    I use flex builder 2.0. I want to setFocus on a textbox during pageload.

    I tried to setocus on this control in the two events of an application object below

    1 CreationComplete
    2 turn on

    But the slider does not receive the focus to this control after the page has loaded. When I clicked on the application
    the mouse then this page becomes activation

    (Or)

    I have to press tab to activate the page.

    (Address etc. bar) browser controls get initially focus instead of the Web page.

    How to overcome this problem. I want setFocus after page is loaded by default on a particular control.


    Can someone help me.


    Thanks in advance.


    With respect,

    Mahendiran.K

    MahePya,

    First of all the credit goes to these gentlemen in the comments below. First, create a new folder in your Application, called "actionScript". Then make a RIGHT CLICK the new folder that you just created, and create a NEW 'ActionScript file'. With my example, the FILE name must be 'JavaScript', and then click FINISH. Then COPY and PASTE the code below (Please be sure to include the credit) and paste it into the JavaScript.as file, you just created.

    STEP 1: SELECT AND COPY THE CODE BELOW...
    / * JavaScript: a MXML component for embedding Javascript in HTML container
    * Author: Abdul Qabiz ([email protected])
    * Date: 16 June 2006
    * Version: 0.1
    *
    * Copyright (c) 2006 Abdul Qabiz ( http://www.abdulqabiz.com)
    *
    * Permission is granted hereby, for free, to anyone who gets a
    copy this software and associated documentation files (the "software"),
    * to deal in the software without restriction, including without limitation
    grant rights to use, copy, modify, merge, publish, distribute, sublicense,
    * and/or sell copies of the software and to permit persons to whom the
    * The software is provided to do this, the following conditions:
    *
    * The above copyright notice and this permission notice must appear in
    * all copies or substantial parts of the software.
    *
    * THE SOFTWARE IS PROVIDED "AS WHAT ', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    * ADAPTATION TO A PARTICULAR USE AND INFRINGEMENT. IN ANY CASE, THE
    * AUTHORS OR COPYRIGHT HOLDERS IS RESPONSIBLE FOR ANY CLAIM, DAMAGE, OR OTHER
    * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT CIVIL OR OTHERWISE, ARISING
    * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    * RELATIONSHIP IN THE SOFTWARE.
    */

    This script sets the browser focus
    the actionScript package
    {

    import flash.events.Event;
    import flash.events.EventDispatcher;
    flash.net import. *;
    Import mx.core.IMXMLObject.

    [DefaultProperty ("source")]

    JavaScript/public class extends EventDispatcher implements IMXMLObject
    {

    private var _source:String;
    private var _initialized:Boolean;

    public void JavaScript()
    {

    }

    public function set source(value:String):void
    {
    If (value! = null)
    {
    _source = value;
    var u: URLRequest = new URLRequest ("javascript:eval('"+_value_+"')");
    navigateToURL (u, "_self");
    }
    }

    public void initialized(document:Object,_id:String):void
    {
    _initialized = true;
    }

    }

    }
    STEP 1: SELECT AND COPY THE END JUST AT THE TOP HERE!

    Then, SELECT and COPY the following code and paste it into the opening tag of the mxml file that is the text box that you want to give focus. Example if the text box is located in your main Application, then it must be placed in the opening tag of this file. If the text box is in a separate component, it must be placed in the opening tag of the component. Here's the code...

    STEP 2: SELECT AND COPY THE CODE BELOW...
    xmlns:ActionScript = "actionScript.*".
    creationComplete = "setBrowserFocus (); »
    STEP 2: SELECT AND COPY THE END JUST AT THE TOP HERE!

    Then, SELECT and COPY the code below and paste it just after the opening tag where your text box. Once again if your text box is located in your main Application file and then simply PASTE this code just after the closing tag of the Application. If your text box is in a different mxml file then put the code after the opening tag of this file.

    STEP 3: SELECT AND COPY THE CODE BELOW...

    to import flash.external.ExternalInterface;

    private function setBrowserFocus (): void
    {
    ExternalInterface.call("saveglobalscore",score) ("setBrowserFocus");
    usernameTextBox.setFocus)
    }

    ]]>


    function setBrowserFocus()
    {
    Main.Focus ();
    }
    ]]>

    STEP 3: SELECT AND COPY THE END JUST AT THE TOP HERE!

    The next step is to CHANGE the 'usernameTextBox' ID in the setBrowserFocus function to YOUR ID text box, and it should work. :)

    FOURTH STEP: CHANGE usernameTextBox to YOUR ID TEXT box (for example)
    private function setBrowserFocus (): void
    {
    ExternalInterface.call("saveglobalscore",score) ("setBrowserFocus");
    usernameTextBox.setFocus () * CHANGE 'usernameTextBox. "
    }
    STEP 4 ENDS

    The final step is to CHANGE the name, the Application name, as shown below.

    FIFTH STEP: CHANGE the 'hand' in the name of YOUR APPLICATION

    function setBrowserFocus()
    {
    Main.Focus (); CHANGE the name of you request * 'hand '.

    }
    ]]>

    STEP FIVE ENDS

    Let me know how it works for you. Don't forget to click on the link to "Mark as the answer!" in my post, if it's the right solution. Don't forget to check the link to the author to see why we have to set the focus in this way.

    John

  • How to make a Javascript embedded element (embedded MS Excel chart) updates automatically so that viewers do not have to refresh the entire page to get updated information.

    I am creating a web page that contains an embedded chart in MS Excel. I would like to table automatically update (refresh) to illustrate direct information viewers without having to refresh the entire page. I found that there is a way to activate this via Excel, but with my current subscription can not access this feature. I hope there is a way to do this using Adobe Muse CC. If it is not possible, I would like to know if there is a way to add a button "Refresh" which refreshes only the embedded section (Excel table) of the page for viewers to use manually. Thank you for your help.

    Update! The embedded worksheet is truly integrated using HTML rather than javascript.

  • JavaScript embedded in jsff unavailable until after refresh browser

    Hello
    Not sure if it's a question JHS or JDev, so displaying in both places.

    I have a problem with an af:clientListener that runs custom javaScript embedded in the jsff file. He is a multiple application of tab. I use a clientListener and javaScript to capture the return key, then click on a button. The button then runs a managed bean method.

    This does not work when the jsff page is first loaded. Using firebug I don't see the javascript. If I manually refresh the browser javascript appears in firebug and the process works. If I tab to another page and then back the processes tab is boken again and javascript code is missing, until I have to refresh the browser again.

    Anyone can shed light on this behavior? I tried to find a way to refresh the browser programmatically once the page is loaded, but without success. And this does not seem like the right way to solve the problem anyway.
    11.1.1.5 Jdev
    JHS 11.1.1.4.26

    < af:panelGroupLayout layout = "vertical" id = "ArchivedBoxReconQueryTopLc".
    partialTriggers ="ArchivedBoxReconQueryfbb ArchivedBoxReconQuerySaveButton ArchivedBoxReconQueryCancelButton" > "
    <!-BEGIN: DEBUG: GROUP_ACTION_ATTRIBUTES: customtemplates/archivedmsds/groupActionAttributes_BoxReconQuery.vm, nesting level: 5->
    "< trh:script id ="s2"text =".
    * function MSDSOnkeyEnter (event) {*}
    If {(window.event)
    if(Window.Event.keycode == 13) {}
    document.getElementById('pt:mr:0:pt:*ArchivedBoxReconQueryAddMsdsToList*').click();)
    Returns true; }
    } else {}
    If (Event. Event.keyCode == 13) {}
    document.getElementById('pt:mr:0:pt:*ArchivedBoxReconQueryAddMsdsToList*').click();)
    Returns true; }
    }
    Returns false;
    } "> < / trh:script >"



    < af:panelLabelAndMessage id = "ArchivedBoxReconQueryAddMsdsToListPlm" >
    < af:commandButton id = "" * ArchivedBoxReconQueryAddMsdsToList * ""
    textAndAccessKey = 'Add FS ID'
    action = "#{ArchivedBoxReconTempBBean.ArchivedBoxReconQueryAddMsdsToList_action}" > < / af:commandButton >
    < f: facet = 'end' name >
    < af:panelGroupLayout id = "pgl1" valign = "top".
    layout = "horizontal" > < / af:panelGroupLayout >
    < / f: facet >
    < / af:panelLabelAndMessage >
    <!-DEBUG: END: FORM_COMMAND_BUTTON: default/item/form/formCommandButton.vm, nesting level: 10->
    <!-BEGIN: DEBUG: FORM_TEXT_INPUT: customtemplates/archivedmsds/formTextInput_ReconQueryMsdsScanNo.vm, nesting level: 10->
    < af:inputText id = "ArchivedBoxReconQueryMsdsScanNo".
    value = "#{bindings." ArchivedBoxReconQueryMsdsScanNo.inputValue}.
    label =""required = "false"
    autoSubmit = 'true' immediate = "true".
    clientComponent = "true" >
    < f: validator binding = "#{bindings." ArchivedBoxReconQueryMsdsScanNo.validator} "/ >"
    * < af:clientListener method = "MSDSOnkeyEnter."
    Type = "keyPress" / >
    < / af:inputText >

    Published by: 170412 on 19 June 2012 10:30

    Published by: 170412 on 19 June 2012 10:33

    See here how to run the script in the jsff page - https://blogs.oracle.com/jdevotnharvest/entry/gotcha_when_using_javascript_in

  • cannot enable javascript after trying all the fixes listed for version 25

    After auto upgrade of worm to worm 25 24, javascript stopped working in firefox and will not allow. Have tried every fix I could find in the forum more deleting java and reload, removing all plugins except java, cleaning registry of all references to firefox and reload it and many others. No work. My Internet Explorer and Chrome work very well on all sites and gmail where firefox will not. Suggestions more. Thanks in advance. I have Windows Ultimate on AMD dual core with 4 GB of memory. Worked well with firefox before version 24 update.

    To avoid confusion:

    JavaScript is embedded in Firefox, so if it is not working properly then there's something blocking JavaScript.

    This can be an extension or your security software.

    You can check the javascript.enabled pref on the topic: config page.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the startup window Mode without failure.
  • Does not work black screen embedded youtube, twitch.tv, etc.

    If this problem came a day or two ago and my computer isn't the only one affected by this.

    Youtube embedded videos appear as just a black box. I watch many videos on youtube itself.

    I can watch embedded twitch.tv diffuse however I can't watch on twitch.tv itself.

    On some forums I visit if someone has a spoiler tag and I click to open it just forces me to the top of the page and doesn't do anything to open the spoiler.

    None of the products appear on Target.com and if I try to narrow down the results (which do not exist) on the left side, nothing happens that you get just forced to the top of the page as the number of spoiler tag.

    I tried to uninstall and reinstall java, firefox, quicktime, and flash. I tried to run firefox in safe mode. I tried just to disable adblock and noscript. I tried leaving adblock and noscript on but allowing all scripts and pop-up windows. I made sure that all my plugins are up to date. I cleared my cookies and cache. I don't know I tried some other stuff I don't remember even at this stage. Again, this is not only a problem on my computer, it is also a question about 2 laptops, FF 20.0 operation, my office and the other are running FF 20.0.1.

    (I took screenshots of all the issues involved as well as the plug ins update but I don't see where to add them.)

    So I've narrowed it down so it's most likely a problem with javascript. Before, I never knew that java and javascript have nothing to do with each other. With this knowledge, I found that javascript is linked to your browser itself. Theres no way of javascript itself to uninstall and reinstall to fix the problem. I already tried to uninstall/reinstall firefox so either something went seriously wrong or I somehow had no thought for the guilty again, and whereas I ruined my brain and couldn't think of anything else before formatting my computer, I was at a loss.

    With 2 other computers with these questions, it seemed that it could be the browser related since I had not being updated anything on the other computers recently. But if it is why firefox itself wasn't there a storm of protest from the internet? Certainly, I couldn't be the only one to get screwed.

    Then it dawned on me. I wonder if my router would block javascript somehow. Sure enough there was something called "filter applets java" which is the erroneous mention since its not java but javascript. Unchecked and suddenly everything is all better! I don't know how this started, but I was out, trying to figure out this stupid thing = P

    So if someone else never falls by chance on this thread with a similar problem, check your router, it might be screwing you over and you would never realize. Apparently, it has developed before and people have reformatted trying to fix only to discover later that the router was the question. Thank God it is not come to this!

  • Click the javascript on the web page programmatically

    Hi all

    I have an IP camera with a web interface, where you can enter the web address into a web browser and click on the buttons on the screen to perform actions - one of those being taken a snapshot.

    I want to be able to replicate that in LabVIEW.

    There is also a log on screen when you navigate to the page first, and I don't know if I would need to go into the details first if I access it programmatically (it seems that the same HTML page which hides the main screen until you connect).

    I've attached screenshots of the login page, the main screen with highlighted relevant items and copies of the HTML files and the javascript file (which is minimized, it is hard to read I'm afraid). If someone could give me some advice on how to proceed with this and click on the button I would really appreciate it.

    I did a search on the Forum and found this page which deals with a form

    http://forums.NI.com/T5/LabVIEW/how-to-fill-out-and-submit-a-Web-form-using-LabVIEW/TD-p/289527

    I tried to reproduce it on the login screen and I managed to fill in the fields, but I do not know how to click on the button and when I tried to create a reference as discussed, I just got an error.

    I have not watched your files or accessory in the other thread, but I'm assuming he uses the ActiveX browser, because it is old. The .NET browser is slightly better, and you can see a basic example showing a click here - http://forums.ni.com/t5/LabVIEW/Mouse-event-in-embedded-internet-explorer/m-p/2853440/highlight/true...

    That code does not include handling loaded events, etc. page, but it shows the basic elements.

  • Automate the function find-in-time using Javascript / Custom Button?

    Dear Adobe community,

    Thank you in advance for any help or ideas you may have on this issue.

    My client and his team shoot a lot of video and make a lot of PDF reports based on these videos.

    My client seeks a form created in which he can easily add a MP4 (h.264) file to a PDF and then reference this file several times throughout, incorporating the "Seek time" function, (or another JavaScript solution involving the StartAt / EndAt functions, etc.) to bring up the highlights.

    This would allow its inspectors crew field document their results, place the video they record alongside their notes, and end users of these documents would be able to jump right to the points of interest in the video (as each instance would seek to different starting points along the timeline of an embedded video file).

    In an ideal world, the Inspector documenting the results via PDF would be able to use a button or another simple function to add the video file, which would encourage then to enter the offset / time StartAt, so that they do not spend too much time fishing around in the background dialogs for these functions.  Is there a relatively simple way to do this is in the Acrobat DC, XI or X environment?

    Again, any thoughts would be greatly appreciated.  Thank you.

    You describe the use cases, you don't need JavaScript at all. With the movie embedded in the PDF file, simply open the comments Panel and rubbing to the point of interest in the video with the video, add a comment on the image and save the file. You can even use the annotation of the circle, the pen or the legend to show the specific area of the frame that need attention.

    Then when the comment is selected in the comment Panel, the video will jump up to the moment where the comment was added.

    J-

  • JavaScript in Captivate 9 project does not run

    I tried for hours to get little JavaScript inside an Adobe Captivate 9 (published in SWF and HTML5), deployed to a web server public project, to run. For help troubleshooting, I wrapped in various stages of the script with console.log ("status"); and even those who are not running.

    A demonstration project file is located here: https://dl.dropboxusercontent.com/u/6787201/Test%20Interaction%20Data%20HTML5/Test-Interac tion - Data .cptx

    If you look at the JavaScript window, you will notice there is a function call to sendInteractionData();

    This is a custom function to trigger the data in various Captivate variables in a Google spreadsheet, I wrote. It is contained in the index.html page I change after publication. I tested this feature and it works when the values are explicitly defined and sendInteractionData() is called from a static web site... but when it is embedded in the code JavaScript of Captivate, no luck.

    If you are interested, here is the code I have insert to support the sendInteractionData() function:

    Configuration section

    Paste the URL of the WEB service (obtained after you run the command POST > DEPLOY AS WEB APP) in the variable below!

    var WebServiceURL = "mywebserviceurl";

    Do not edit below this line, unless you intend to change the inner workings of the script

    Declaring variables

    var FirstName;

    var name;

    var Email;

    var attribute;

    Function to send data to interaction in the Google spreadsheet. This function must be called by the Captivate player after setting the variables above.

    function sendInteractionData() {}

    Get and set the relevant data from the Captivate player

    FirstName = window.cpAPIInterface.getVariableValue('cpFirstName');

    LastName = window.cpAPIInterface.getVariableValue('cpLastName');

    Email = window.cpAPIInterface.getVariableValue ('cpEmail');

    Attribute = window.cpAPIInterface.getVariableValue ('cpAttribute');

    Send the data to the Google map via AJAX call

    request = $.ajax({)

    URL: WebServiceURL,

    type: 'post',

    data: "FirstName =" + FirstName + "& LastName =" + LastName + "& Email = ' + Email + ' & attribute ="+ attribute.

    });

    Reminder Manager who will be called to success

    Request.Done (function (response, textStatus, jqXHR) {}

    Save a message to the console

    Console.log ("wrote interaction data sheet: FirstName =" + FirstName + "& LastName =" + LastName + "& Email =" + Email + "& attribute =" + attribute + "/ / Message: success!");

    });

    Reminder Manager who will be called if an error occurs

    Request.Fail (function (jqXHR, textStatus, errorThrown) {}

    Logs the error in the console

    Console.Error)

    "Interaction data could not be saved: FirstName =" + FirstName + "& LastName =" + LastName + "& Email = ' + Email + ' & attribute = ' + attribute + ' / / The following error occurred: ' +"

    textStatus, errorThrown

    );

    });

    }

    PS - declaration of a Google spreadsheet should really be standard features now...

    Thanks for your help.

    You really use the listener attached to the window module ready event to ensure that the API is present.

    var interfaceObj, eventEmitterObj;

    window.addEventListener ("moduleReadyEvent", function (e)
    {
    interfaceObj = e.Data;
    eventEmitterObj = interfaceObj.getEventEmitter ();
    initializeEventListeners();
    });

    function initializeEventListeners()

    {

    If (interfaceObj)

    {

    If (eventEmitterObj)

    {

    window.cpAPIEventEmitter.addEventListener ("CPAPI_VARIABLEVALUECHANGED", function)

    {

    sendInteractionData(); }, 'cpAttribute '.

    );

    }

    }

    }

  • Embeded html slows down the entire site

    Hello

    I'm building a gallery video cutom for self-hosted videocontent. For this purpose I use a widget of composition, fill the trigger with some animated text and circles, incorporate an html5 player and finally put it in the area target.

    General, it works fine, but adding more than five instances/target html embedet leads to horrible long time to load. (this may take some minutes!)

    Here's an example where I simply copy the code for the html5 player: I think it is best to start watching this, so that you get an impression how the site should work. (you must scroll down to the video Viewer. IM using a scrolling wink widget, but it does not work correctly until the site is fully charged)

    http://www.jehleproduktion.de/hans3

    Here's the site with embeded html code.

    http://www.jehleproduktion.de/hans2

    Here's the code for html5 embedded player:

    < video id = "MY_VIDEO_1" class = "video-js VJ-skin by default" - speed control

    " preload ="auto"width ="960"height ="540"poster = ' ' http://www.jehleproduktion.de/filme/Weak.jpg '

    data-setup = "{}" >

    " < source src = ' http://www.jehleproduktion.de/Filme/weak.MP4 "type =" video/mp4"> "

    " < source src = ' http://www.jehleproduktion.de/Filme/weak.WEBM "type =" video/webm"> "

    " < class p 'vjs-No.-js' = > to view this video please enable JavaScript and upgrade to a web browser that < a href =" http://VideoJS.com/HTML5-video-support/ "target ="_blank"> supports HTML5 video < /a > < /p > "

    < / video >

    What can I do?

    THX

    Johannes

    Adjust the preload = 'none' rather than 'auto '.

    Auto tells the browser to immediately begin to download the full video. If do you and have a dozen videos on the ready page auto that will try your browser to download all, regardless of whether or not you look at one of them.

    If you have several videos that are more short loops, you're insanely better to use a service such as Vimeo or YouTube to host your video. These services provide a lot of value to match the capabilities of the site visitor network connection performance device and that you do not get when self-hosting.

Maybe you are looking for

  • Fill feature request AutoFill toolbar

    Hi, I am familiar with the current built-in autofill described in this article: https://support.Mozilla.org/en-us/KB/control-Firefox-automatically-fills-in-forms?ESAB=a & s = AutoFill & r = 0 & s = ACE #Firefox:Mac:fx29 but I would like to put in a f

  • Request for use of the virtual computer RAM

    Hi all I have 3 x VM running to work in a box, each machine was given to 16 GB RAM allocated. My confusion is when a virtual machine starts and become inactive, the memory usage levels out and remains the same (as you know).  However when an applicat

  • Black screen after BIOS windows computer acer laptop 10

    Hello While I was watching a movie, when I watched, my webcam from nothing. I watched the movie again. then a box of AVG showed, I didn't know what he was saying. then my screen went black, I put my laptop, I did it again. the screen acrer showed, af

  • Player Windows Media won't play byte streams as files are damaged or corrupted

    which is a byte stream because my media player won't play it say files are damaged or corrupt

  • not near ms money transactions

    Windows 7 (not relevant) MS Money Deluxe 2006 (relevant)! My main bank account close easily every day.  But balance the real of the Bank and the Bank of money balance are mean by an annoying amount.  Therefore, there are OLD transactions that have no