Exposing plugin to javascript

API = CS4
OS = Mac OS X 10.5
I'm new to Indesign plugin development and was having trouble exposing plugin code to the scripting API. So I went back and created a very basic plugin project using DollyXs. Selected support for Indesign, InCopy and IndesignServer and scripting. Compiled (debug) and installed the plugin in debug builds of Indesign desktop and Indesign server. Wrote a simple javascript to call the app.speak() method that DollyXs creates when the scripting support option is selected.
The app.speak() call works in the Desktop version but on the server version I get "Error String: app.speak is not a function". Looking at the servers "PluginLoadLog.txt" log file the plugin is loading without errors.
In the root fr file I have the following PluginVersion resource;
resource PluginVersion (kSDKDefPluginVersionResourceID)
kTargetVersion,
kplgPluginID,
kSDKDefPlugInMajorVersionNumber, kSDKDefPlugInMinorVersionNumber,
kSDKDefHostMajorVersionNumber, kSDKDefHostMinorVersionNumber,
kplgCurrentMajorFormatNumber, kplgCurrentMinorFormatNumber,
{ kInDesignProduct, kInDesignServerProduct},
{ kWildFS },
kplgVersion
Note: I removed the InCopy ID manually.
Anyone have any ideas as to what the problem may be or can suggest other things to look into?
Thanks Mike

For anyone interested I found the problem. The the root fr file in the "VersionedScriptElementInfo" block must have a locale ID declared for any Indesign context the plugin is will be used in.
Using DollyXs if you choose support for Indesign desktop and Indesign server with scripting. DollyXs will only insert the the locale ID for Indesign desktop.
Add the following after the locale for Indesign desktop to enable the plugin for Indesign server;
kFiredrakeScriptVersion, kCoreScriptManagerBoss, kInDesignServerAllLanguagesFS, k_Wild,
Thanks Mike

Similar Messages

  • How to expose plugin methods to JavaScript ?

    Hi, let's assume I develop a plugin in C++ that performs some tasks with textual tokens within the Acrobat viewer. Can I access my plugin methods from JavaScript in order to launch these tasks from outside the Acrobat frame ?
    Thanks
    Frederic

    It's your plugin - you can do whatever you want and expose them however you wish.

  • 1.3 plugin and Javascript

    I am trying to use the 1.3 plugin with IE 5 and Netscape 6 for my applet. Both are giving similar problems.
    The applet loads OK, but when I try to call its methods from Javascript, I can't find the applet object. This is even though I set the ID attribute in the OBJECT tag to the name of the applet, and stuck in a <PARAM name="name" value="myappletname"> for good measure!
    When I try to reference the applet from Javascript, I get a "not defined" error. In desperation I have tried to refer to it as document.applets[0] which at least is defined, but then I get an error message "mymethod() is not a function". It is seems that the browser is looking for a Javascript function rather than a Java method.
    And yes, I have set scriptable = true and even MAYSCRIPT for good measure.
    If you have an example of a webpage with a Java applet being called from Javascript, with the 1.3 plugin and the OBJECT tag etc, please could you give me the URL. I'm sure if I see an example which actually works, I'll be able to figure out what I'm doing wrong.
    Thanks!

    Hurray! It works!
    I created an empty CSTreeAppletBeanInfo class which extends SimpleBeanInfo for my CSTreeApplet, and it worked!
    I did this after reading
    http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/faq/applet_support.html
    Q: Does Java Plug-in support Java-JavaScript communication?
    A: Yes, Java Plug-in supports basic, bidirectional Java-JavaScript communication. The following, however, is a known incompatibility.
    In the Microsoft implementation, applet methods and properties exposed in JavaScript are exactly the same as the methods and fields in the applet object. In Java Plug-in, an applet's methods and properties are exposed in JavaScript through JavaBeansTM introspection, which treats the applet's fields in a different manner than the Microsoft VM. Therefore, JavaScript accessing fields in an applet object may not work the same when run on JRE/Java Plug-in.
    and also after reading
    http://www.java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/compatibility.html
    Java/JavaScript communication
    In the Microsoft implementation, applet methods and properties exposed in JavaScript in an HTML page are exactly the same as the methods/fields of the applet object. In Java Plug-in, applet methods and properties exposed in JavaScript in HTML are obtained via JavaBeans Introspection, which analyzes methods and properties through naming convention in the applet object. The side effect is that applet fields are treated differently.
    This problem will be fixed in future release of Java Plug-in. In the meantime, JavaScript accessing fields in the applet object may not work properly in Java 2.
    I'm happy, it works! (Even if I don't 100% understand why).
    Thanks for your help,
    Anne

  • ANSWER: HOW TO DETECT Java Plugin from JavaScript

    I created a new topic because the questions about
    how to detect Java Plugin in browsers are scattered
    thoughout this forum.
    Basically you need to employ two approaches for IE and NS.
    In IE you need to try to instantiate a small applet
    (not your production applet) in order to see if browser
    can do it. if the browser can do it, you can make a
    call applet from JavaScript in order to find version of
    JRE (as well as a host of other things).
    In NS you can write a simple JavaScript which will
    interrogate the browser for all plugins installed. Then
    ypu can make a desicion whether to pass execution to
    the next(or generated) page which hosts your applet,
    or ask the user to download/install a plugin.
    I ecourage everybody to host a plugin on your site
    rather leave default link to it which is generated by
    html converter.
    In order to run sample,
    Prerequisites:
    Java Plugin 1.3.
    If you have a different version of plugin,
    substitute hardcoded plugin version in JavaScript for
    value that you have.
    1. compile java file
    2. put class file in the same directory with html file
    3. load html file into the browser.
    4. press "Check Java Plugin.." button
    5. see it work
    6. examine code
    7. uninstall plugin
    8. repeat steps 1 - 4
    9. see it work
    10. install plugin.
    Sample code follows:
    **********************HTML FILE BEGIN***********
    <HTML>
    <HEAD>
    <!-- Generated by Kawa IDE -->
    <TITLE>Detect Java Runtime</TITLE>
    </HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    var browsername;
    function doNetscape()
    for (i=0; i < navigator.plugins.length; i++)
    for (j = 0; j < navigator.plugins.length; j++)
    if(navigator.plugins[i][j].type == "application/x-java-applet;version=1.3")
    alert("You are running Netscape with Java Plugin 1.3.0 - OK");
    return;
    alert("You are running Netscape\nPlease, install Java Runtime Environment 1.3.0");
    function doMicrosoft()
    var applet = document.myApplet;
    if(applet == null)
    alert("You are running Microsoft Browser.\nPlease, install Java Runtime Environment 1.3.0");
    return;
    var version = applet.getJavaVersion();
    if(version == "1.3.0")
    alert("You are running IE, Java Plugin 1.3.0 installed - OK");
    else
    alert("You are running IE, other plugin installed - mybe OK if later that 1.3.0\nYour version: " + version);
    function getJava()
    var applet = document.myApplet;
    if(applet == null)
    alert("Please, install Java Runtime Environment");
    return;
         alert("JRE Version: " + document.myApplet.getJavaVersion());
    function checkJavaPlugin()
         browsername = navigator.appName;
         if(browsername.indexOf("Netscape")!= -1)
              browsername="NS";
              doNetscape();
         else
              if(browsername.indexOf("Microsoft")!=-1)
                   browsername="MSIE";
                   doMicrosoft();
              else
                   browsername="N/A";
                   alert("Unknown browser: " + browsername);
    </SCRIPT>
    <body>
    <Strong>Check Java Plugin</strong>
    <OBJECT id="myApplet" classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
         WIDTH = 1
         HEIGHT = 1 >
         <PARAM NAME = CODE VALUE = "DetectPluginApplet.class" >
         <PARAM NAME="scriptable" VALUE="true" >
         <embed type="application/x-java-applet;version=1.3"
              code = DetectPluginApplet width = 2 height = 2 MAYSCRIPT = "true" >
         </embed>
         </EMBED>
    </object>
    <FORM>
         <INPUT TYPE="button" value="Get Plugin Version in IE" onClick="getJava()">
         <INPUT TYPE="button" value="Check Java Plugin in NS and IE" onClick="javascript:checkJavaPlugin()">
    </FORM>
    </BODY>
    </HTML>
    **********************HTML FILE END***********
    ***************APPLET FILE BEGIN***********
    import java.awt.*;
    public class DetectPluginApplet extends java.applet.Applet
         public void init()
              add(new Label("DetectPluginApplet"));
    public String getJavaVersion()
    return System.getProperty("java.version");
    **************APPLLET FILE END************

    Try following java script, it works on new browsers (NS 4+, IE5+). For IE you have to enable 'ActiveX objects creation' in security options.
    var agt=navigator.userAgent.toLowerCase();
    var is_major = parseInt(navigator.appVersion);
    var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
    && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
    && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.0") !=-1));
    var is_ie5up = (is_ie && (is_major == 4)
    && ( (agt.indexOf("msie 5.0")!=-1)
    || (agt.indexOf("msie 5.5")!=-1)
    || (agt.indexOf("msie 6.0")!=-1) ) );
    var pluginDetected = false;
    var activeXDisabled = false;
    // we can check for plugin existence only when browser is 'is_ie5up' or 'is_nav4up'
    if(is_nav4up) {
    // Refresh 'navigator.plugins' to get newly installed plugins.
    // Use 'navigator.plugins.refresh(false)' to refresh plugins
    // without refreshing open documents (browser windows)
    if(navigator.plugins) {
    navigator.plugins.refresh(false);
    // check for Java plugin in installed plugins
    if(navigator.mimeTypes) {
    for (i=0; i < navigator.mimeTypes.length; i++) {
    if( (navigator.mimeTypes[ i].type != null)
    && (navigator.mimeTypes[ i].type.indexOf(
    "application/x-java-applet;jpi-version=1.3") != -1) ) {
    pluginDetected = true;
    break;
    } else if (is_ie5up) {
    var javaVersion;
    var shell;
    try {
    // Create WSH(WindowsScriptHost) shell, available on Windows only
    shell = new ActiveXObject("WScript.Shell");
    if (shell != null) {
    // Read JRE version from Window Registry
    try {
    javaVersion = shell.regRead("HKEY_LOCAL_MACHINE\\Software\\JavaSoft\\Java Runtime Environment\\CurrentVersion");
    } catch(e) {
    // handle exceptions raised by 'shell.regRead(...)' here
    // so that the outer try-catch block would receive only
    // exceptions raised by 'shell = new ActiveXObject(...)'
    } catch(e) {
    // Creating ActiveX controls thru script is disabled
    // in InternetExplorer security options
    // To enable it:
    // a. Go to the 'Tools --> Internet Options' menu
    // b. Select the 'Security' tab
    // c. Select zone (Internet/Intranet)
    // d. Click the 'Custom Level..' button which will display the
    // 'Security Settings' window.
    // e. Enable the option 'Initialize and script ActiveX controls
    // not marked as safe'
    activeXDisabled = true;
    // Check whether we got required (1.3+) Java Plugin
    if ( (javaVersion != null) && (javaVersion.indexOf("1.3") != -1) ) {
    pluginDetected = true;
    if (pluginDetected) {
    // show applet page
    } else if (confirm("Java Plugin 1.3+ not found, Do you want to download it?")) {
    // show install page
    } else {
    // show error page
    }

  • How to call function in the plugin from javascript?

    Hi,
    I have some function inside my plugin which i want to call from javascript. Is it possible? Sorry, im new to plugin programming.
    For example, i have plugin with function func() which i want to call from external javascript. In what way i will be able to achieve this?
    Thanks.

    Thank you sir for the help.
    Is it possible to assign ID to function and specifying that ID during executeAction call in script?
    Like at the time of executeaction call we will specify pluginID and functionID as parameter so that function will execute from the respective plugin. Is it possible ?
    Thanks.

  • How to pass parameters to automation plugin to Javascript

    Hello,
    We can call automation plugin from java script below code.
    var xx = stringIDToTypeID( "459ac2e6-82d1-11d5-9879-00b0d0201111" );     // Has will be the unique ID for this plugin
    executeAction( xx, undefined, DialogModes.NO );
    I am trying to passing parameters for the same plugin.
    I tried to find a way myself following plug-in resource guide but there information is not so clear.
    Can you tell me,
    How to define parameters in terminology file. (my guess it should be define in terminology file)
    How to JS call with parameters
    And how to extract those parameters inside plugin.
    Sample Pipl.r file  (This is from C++ plugin in SDK)
    // Dictionary (scripting) resource
    resource 'aete' (16000, "Getter dictionary", purgeable)
           1, 0, english, roman, /* aete version and language specifiers */
                "Testing", /* vendor suite name */
                "Adobe example plug-ins", /* optional description */
                'get ', /* suite ID */
                1, /* suite code, must be 1 */
                1, /* suite level, must be 1 */
           { /* structure for automation */
           plugInName, /* name */
           "No comment", /* optional description */
           'get ', /* class ID, must be unique or Suite ID */
           'getr', /* event ID, must be unique */
           NO_REPLY, /* never a reply */
                IMAGE_DIRECT_PARAMETER, /* direct parameter, used by Photoshop */   <-- According to the documentation, I guess here should be come parameters.  (para name, keyID, typeID )
                { // filter or selection class here:
      {}, /* non-filter/automation plug-in class here */
      {}, /* comparison ops (not supported) */
      { // Enumerations go here:
      } /* end of any enumerations */
    // end GetterPiPL.r
    Thank you.

    Hello Mack,
    Thanks for your detail explanation.
    Actually, I haven't much play with PS javascripting plugins niter Fit image.
    The key points I have figure out that, the way you attached parameters to descriptor and point of finding some light from listener.
    That made me a conceptual idea, although I did not get all the mention facts.
    My previous guess was correct.
    Parameter should be something like below according to PiPL grammar. (in Sample Pipl.r file)
    'mymod', /* event ID, must be unique */
           NO_REPLY, /* never a reply */
                IMAGE_DIRECT_PARAMETER, /* direct parameter, used by Photoshop */ 
                "action",    /* name for parameter*/
                 keyMyPara,    /*Key parameter you have define in terminology file*/
                 typeChar,       /*parameter type*/
                 "",     /*optional description*/
                 flagsSingleParameter     /*flags */
    The UUID is enough for calling plugin, only challenge was to define parameter wtr grammar at PiPL and read it at C++ end.
    Another important fact is that we have the message pointer which points to above plug-in parameters.
    Automation plugin would give that access.

  • Detecting java plugin using javascript

    Hello,
    actually I'm neither new to java (but I didn't find a more appropriate forum here) nor my question directly refers to java, instead it concerns javascript:
    I'm looking for a way to detect (inside an html-page) if the java plugin is installed (using javascript). What I don't need/want:
    - Start/use a java applet to check for it (or embed some <object...>-stuff, that probably makes the vm start or opens some dialog automatically)
    - use navigator.javaEnabled() (this merely tells you about the browser settings, not if the plugin is actually installed
    I've already found navigator.plugins to be useful, but this only works on firefox, mozilla etc, but not on IE or Opera.
    Any information or link etc. would be appreciated.
    Thanks.

    I would like to have some script detecting any version of the java plugin (older versions as well).
    Anyway, if you only have a solution for newer versions or some vbscript creating an object... well, I would appreciate if you share it, too. Any help would be just fine :)
    P.S.: About the jws-code you mentioned: I'm new to VBScript. I found something similar I think, but it returns nothing:
    <script>
    function checkPlugin(){
    var r = detectIE("8AD9C840-044E-11D1-B3E9-00805F499D93","java");
    alert("RESULT = " + r);
    function detectIE(ClassID,name){
    result = false;
    alert(ClassID);
    document.writeln('<script language="VBscript">');
    document.writeln('\n on error resume next \n result = IsObject(CreateObject("' + ClassID + '"))');
    document.writeln('msgbox(IsObject(CreateObject("' + ClassID + '")))');
    document.writeln('</scr' + 'ipt>');
    if (result)
    return name+',';
    else return '';
    </script>Isn't that the way it's supposed to work (the vb is encapsulated to prevent some error messages on the mac, I think)? The classid should be correct, according to the registry.... So, how to do it?

  • How do I call an object written in Plugin from Javascript in Acrobat 9.0?

    Hi,
    Since Acrobat 9.0 has no longer support  GetNumAVDocs() called in Javascript, it does not return number counter of opened pdf documents.
    I am looking for a way to write method GetNumAVDocs() or similar one in Plug-in. My questions are that
    1. Can we write the method  GetNumAVDocs() or similar in Plug-in?
    2. Can we integrate that method GetNumAVDocs() which written in Plug-in in Javascript or Can Javascript call that method GetNumAVDocs()?
    Any of your comments or advices are very helpful to me.
    Thanks a lot for your support,
    Thai Nguyen

    Hi lrosenth,
    Thank you for help so far. In fact we our codes have been using COM/ActiveX and AcroExch.App library along. These codes are working find with Acrobat 8.0, but they do not work with Acrobat 9.0 since the function GetNumAVDocs() is no longer working. It always returns 0, instead of maximum number of documents.
    I would like to attach the code along with PDF documents for you to take a look and help us. This zip file is test1.zip.  This zip file include a html file test1.html. This file includes HTML page and a number of Javascript/Activex functions. 
    The function getActiveDoc() is the target of the issue. It contains an AcroExch.App function GetNumAVDocs() which does not return a number of the maximum number of documents the Acrobat application can open on Acrobat 9.0. It always returns 0 regardless how many how many documents are opened.
    At the bottom of the source code is html page that called the function getActiveDoc()  at the <input>  tag.  <input type="button" value="Show Active Docs" onclick="getActiveDoc();">
    For testing this code, you unzip test1.zip file. Open test1.html on a web browser. It will load couple pdf files that include on test1.zip.  Click on button "Show Active Docs" that calls function getActiveDoc().  This function trigger GetNumAVDocs(). It then call alert(numdoc)  to display a value of number of opened documents.
    Thank you,
    Thai Nguyen
    -------------------------------The Codes below-------------------------------------
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Test for Adobe 8&amp;9</title>
    </head>
    <script type="text/javascript">
    function nextPage(){
    var acrobatpdf= document.getElementById("acrobatpdf");
    acrobatpdf.GotoNextPage();
    function prevPage(){
    var acrobatpdf= document.getElementById("acrobatpdf");
    acrobatpdf.GotoPreviousPage();
    function showToolbar(){
    var acrobatpdf= document.getElementById("acrobatpdf");
      acrobatpdf.setShowToolbar(1);
    function hideToolbar(){
    var acrobatpdf= document.getElementById("acrobatpdf");
      acrobatpdf.setShowToolbar(0);
    function loadfile(){
    var file = document.getElementById("file").value;
    alert(file);
    var acrobatpdf= document.getElementById("acrobatpdf");
    var rtn = acrobatpdf.LoadFile(file);
    alert(rtn);
    function getActiveDoc(){
    var acrobatapp= document.getElementById("acrobatapp");
    var numdoc = acrobatapp.GetNumAVDocs();
    alert(numdoc);
    for(i=0;i < numdoc;i++){
      actDoc = acrobatapp.getIEPDFDoc();
      var actDoc = acrobatapp.GetAVDoc(i);
      alert("item:"+i);
      if(actDoc!=null){
              var title = actDoc.GetTitle();
        alert(title);
      }else{
       alert("Null object");
    function findText(){
    var file = "D:\\lab\\adobe\\test1\\fcom012360.pdf";
    var text = document.getElementById("findtext").value;
    var acrobatapp= new ActiveXObject("AcroExch.App");
    var avdoc= new ActiveXObject("AcroExch.AVDoc");
    var acrobatpdf= document.getElementById("acrobatpdf");
    var x = acrobatpdf.LoadFile(file);
    alert(x);
    </script>
    <body>
    <div>
    <input type="button" value="Next Page" onclick="nextPage();">
    <input type="button" value="Prev Page" onclick="prevPage();">
    <input type="text" id="file" width="80">
    <input type="button" value="Load File" onclick="loadfile();">
    <input type="button" value="Show toolbar" onclick="showToolbar();">
    <input type="button" value="Hide toolbar" onclick="hideToolbar();">
    </div>
    <div>
    <input type="button" value="Show Active Docs" onclick="getActiveDoc();">
    <input type="text" id="findtext" width="80">
    <input type="button" value="Find Text" onclick="findText();">
    </div>
    <div>
        <OBJECT id="acrobatapp"
                classid="clsid:85DE1C45-2C66-101B-B02E-04021C009402">
        </OBJECT>
        <OBJECT id="avdoc"
                classid="clsid:72498821-3203-101B-B02E-04021C009402">
        </OBJECT>
        <OBJECT classid="clsid:CA8A9780-280D-11CF-A24D-444553540000"
                width="960" height="492" id="acrobatpdf"
                style="WIDTH: 784px; HEIGHT: 492px">
         <PARAM NAME="_cx" VALUE="26035">
            <PARAM NAME="_cy" VALUE="15663">
            <Param name="SRC" value="fcom012330.pdf">
        </OBJECT>
    </div>
    </body>
    </html>

  • IE PDF plugin hides javascript menu

    Hello, we are using ActiveReports to create report at our web
    project. We use their PDF options, which create PDF file and simple
    display it. We use IE 7 as a browser. And our problem is, that
    client's PDF document viewer hides our Javascript menu. Did anybody
    there have similar issue? I tried all CSS XHTML options but with no
    success. What is interesting at IE6 it is working fine. Thanks for
    your answer
    Tomas

    prcek1985,
    These forums are specific to Acrobat.com and it's set of
    hosted services. We do not provide support for 3rd party PDF
    producing applications on these forums - please contact the vendor
    of your PDF producing application for support with their
    product.

  • How to control PDF plugin from Javascript?

    I need to embed a PDF viewer into a webpage displayed on a special infokiosk withou a keyboard and a mouse. The infokiosk will have just five control button (four arrows and an OK button), which will map to corresponding keys on keyboard. It will be running a simple Linux system and Firefox browser as GUI.
    This is exactly what I need to accomplish:
    http://pdftools.atwebpages.com/embedPDF.html
    However, it works only in Internet Explorer. I need this very functionality in Firefox on Linux. I have not been able to come accross any documentation telling me, how to do it. On the other hand I have found:
    http://www.adobe.com/devnet/acrobat/interapplication.html
    which mentions Windows and Macintosh, but does not mention Linux at all. Does this mena that I will not be able to control PDF viewer with Javascript under Firefox/Linux?

    I need to embed a PDF viewer into a webpage displayed on a special infokiosk withou a keyboard and a mouse. The infokiosk will have just five control button (four arrows and an OK button), which will map to corresponding keys on keyboard. It will be running a simple Linux system and Firefox browser as GUI.
    This is exactly what I need to accomplish:
    http://pdftools.atwebpages.com/embedPDF.html
    However, it works only in Internet Explorer. I need this very functionality in Firefox on Linux. I have not been able to come accross any documentation telling me, how to do it. On the other hand I have found:
    http://www.adobe.com/devnet/acrobat/interapplication.html
    which mentions Windows and Macintosh, but does not mention Linux at all. Does this mena that I will not be able to control PDF viewer with Javascript under Firefox/Linux?

  • How does one use JavaScript with the Windows Media Player Plugin?

    Hi there.
    According to this old [http://msdn.microsoft.com/en-us/library/dd564570%28v=VS.85%29.aspx MSDN Article] it is possible to control the windows media player plugin using javascript.
    It provides a series of objects off the object that should perform certain funtions, such as play stop and seek.
    It states very clearly in the article that some are not supported; however, none of them seem to be working with the latest version(s?) of Firefox.
    I have Firefox 5 installed currently and have not tested in any other version, so I'm not sure when it stopped working.
    The video does load and will display properly -- the ability to control it through javascript however, does not work.
    i.e.:
    var mplay = document.getElementById('myplayer');
    mplay.controls.play(); // mplay.controls is undefined
    This same code works in Internet Explorer.

    You need to place the URL in a data attribute for Firefox.
    <pre><nowiki>document.write(' <OBJECT id="Player" data="http://87.117.197.189:16229" width="320" height="45" type="application/x-ms-wmp">');
    document.write(' <param name="AudioStream" value="true">');
    document.write(' <param name="Enabled" value="True">');
    document.write(' <param name="ClickToPlay" value="false">');
    document.write(' <param name="BufferingTime" value="5">');
    document.write(' <param name="ShowDisplay" value="False">');
    document.write(' <param name="Volume" value="70">');
    document.write(' <param name="autoStart" value="true">');
    document.write(' </OBJECT>');</nowiki></pre>

  • Anyone ever extended JavaScript land with a plugin?

    I've looked through the documentation and headers on the Acrobat API, other than the execute a string as JS, or use COS layer to manipulate the PDF tree, I see no way to add new objects and features to the Javascript API. Is it possible to add new objects/properties to the JS API or not? Has anyone ever done this before?
    A very brutal hack I can think of, is to use SOAP from JS on a loopback connection to an Acrobat plugin running a webserver that then interacts with the Acrobat C API.

    Hi bulk88,
    There is no public API for extending Acrobat JavaScript- Adobe controls this.  However, you can run a menu item from JavaScript, so you could create a plugin that puts a menu item in Acrobat, then run the plugin from Javascript by executing the menu item.
    Hope this helps,
    Dimitri
    WindJack Solutions
    www.pdfscripting.com
    www.windjack.com

  • Newbie qs. how to find duration or set position (in time) of a flash movie from Javascript?

    I am trying to control the Flash player browser plugin from
    Javascript.
    - I need to set the start position to play, based on time.
    example, setPosition(10 seconds)
    However I notice that the flash player API is based upon
    number of frames.
    for example, the methods TotalFrames() and GotoFrame() are
    based on frame number.
    How do I convert it to time? I don't see a frame rate
    variable.
    I don't see a call to access this - but the duration of a
    clip is always shown near the slider
    - can I also query the duration from the player?
    - I also need a callback into my Javascript object when an
    event occurs - for example,
    when the player stops playing because it is stopped by the
    user. Should work on earlier versions than Flash 8.
    Any help appreciated.
    thanks,
    Anil

    no replies?

  • How to call the javascript  through sdk?

    I created a plugin through SDK. Now i need to call my javascript file in that plugin. Could you please advice me with some samples. This is for "Photoshop CS". Kindly help me.

    Could you please provide me an example for
    1) plugin could call JavaScript is if an automation plugin calls a script by name.
    2) And also give an example for how to call plugin through javascript.
    I am new for adobe sdk. So kindly help me.
    Thanks in advance,
    Prabudass

  • ActionScript function not visible to Javascript

    In the example
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15683&sliceId=2
    there is a flash movie that we created using flash 2004 and
    actionscript 2.0 that should expose a function that javascript can
    call for clipboard functionality in firefox.
    The movie is created and displays with a little test text box
    but the function is not showing up as available to the javascript
    (firebug) and its not executing.
    We followed the documentation as closely as possible, so does
    anyone have ideas of little common things that could have been left
    out or ways to troubleshoot this kind of issue?
    We're new to flash/actionscript but very familiar with
    javascript/web interface development...so anything no matter how
    elementary, please feel free to advise!
    Thanks in advance for your time and knowledge!
    Va.
    Update:
    Trying a few things that I've seen, I believe that
    ExternalInterface is not available to my ActionScript, so the
    callback function does not expose anything to Javascript.
    I am using Macromedia Flash MX 2004, which uses Flash 7. Here
    are my new questions:
    - Is ExternalInterface available in Flash 7?
    - If yes, are there configuration settings might need
    tweaking?
    Thanks for reading and any suggestions!

    This is a known issue of CEP (Common Extensibility Platform, a DLL that supports displaying extensions). Code like “document.cookie” in HTML extension is invalid because CEF (CEP integrated CEF3 to display HTML Extensions) intentionally disables cookies on "file://..." for a variety of reasons.
    However, CEP stores cookies at:
    Windows: "C:\Users\yourusername\AppData\Local\Temp\cep_cookies"
    Mac: "/Users/yourusername/Library/Logs/CSXS/cep_cookies"
    Please let me know if more information is needed, thanks

Maybe you are looking for