After Effect CC: Custom JavaScript functions of a flashplayer object return no value

Hi
With AfterEffects CC scripting it looks like custom JavaScript functions of a flashplayer object return no value when invoked from ActionScript code
This can be seen in the sample script shipped with ExtendScript Toolkit named ActionScriptDemo.jsx:
Create a flashplayer object in a JSX file with a custom getJavaScriptNumber function:
var flashPlayer = flashPalette.add("flashplayer", cBounds);
flashPlayer.getJavaScriptNumber = function() {
          return 12345;
Invoke the custom getJavaScriptNumber function from ActionScript code of an .MXML file:
public function requestJavaScriptNumber():void{
          var res:int = ExternalInterface.call("getJavaScriptNumber");
          estkNumber = res;
The ExternalInterface.call("getJavaScriptNumber") call return no value
Any idea or a suggested workaround??
Thanks, Erez.

I wonder if this was intentional on Adobe's part.  It seems rather odd that it just "broke" with the upgrade to CC.
I was thinking of a way to display a "web page" within an ExtendScript dialog / window, and thought that I could use Flash / ActionScript to do just that and then display that within the dialog.  It seems, now, that it is just a bad idea because the API for ExternalInterface is broken--I would need two-way communication between the Flash object presenting the webpage and the ExtendScript ScriptUI Panel.
Is there a workaround for this?
Thanks,
Arie

Similar Messages

  • How can I call a custom javascript function when clicking on cfgrid cell.

    I would like to call a custom javascript function when
    clicking on a cell in an cfgrid (of html format). The closest thing
    I can find is to use the HREF="" attribute, but it doesn't seem to
    work with javascript inside it.
    Simple example:
    <cfgridcolumn name="Foo" header="Foo"
    href="javascript:customFunction(#ID#);">
    Do I need to tap into the underlying Ext JS funtionality? If
    so, where can I start?
    Thanks!

    Hi,
    According to your post, my understanding is that you want to hide/show list columns based on specify the permission for Users, SharePoint Groups or Active Directory Groups.
    Here is a solution from CodePlex for your reference:
    SharePoint 2013 Column & View Permission
    https://sp2013columnpermission.codeplex.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • JavaScript function which fetches return_value from List of Values

    Hi,
    I have created List of Values named "NICKS". I want to write JavaScript function "get_workers_fullname(nick)" which returns display_value from List of Values. The parameter of function is return_value of List "NICKS".
    I am new with this and don't know how to handle this case.
    Please help me.

    Hi,
    The LOV, I mean is the item in Application's Shared Components. I don't mean the visible SelectList on the page.
    This is what I found in ApEx's help: "A List of Values can be referenced by page items as well as report fields. It controls the values displayed and limits the user's selection. Lists of Values can be static (based on values you enter) or dynamic (based on a SQL query)."
    I'd like to access values in such LOV from JavaScript. I am not sure it is possible.
    Cheers,
    Tom.

  • Calling a javascript function from java code and getting tha value in Java

    Hi,
    I would like to call a Java script function confirmRemove() from Java code upon meeting a condition..
    for example the code snippet is:
    if(true){
    // I want to call js confirmRemove() over here. And get the value of variable "answer" in this if block.
    <html>
    <head>
    <script type="text/javascript">
    function confirmRemove() {
         var answer = confirm("Are you sure you want to Delete?")
    </script>
    </head>
    <body>
    <form>...

    Hi,
    Back in 2003 I have used an Applet which contain java code and this java code was calling the java scripts ( different methods, DHTML etc..)
    There was a component developed by NetScape called JSObject I am not sure it there is other third party component other then the JSObject
    look at this article which shows how (based on JSObject)
    [http://java.sun.com/products/plugin/1.3/docs/jsobject.html|http://java.sun.com/products/plugin/1.3/docs/jsobject.html]
    Regards,
    Alan Meio
    London,UK

  • Custom javascript functions in mobile webdynpro for java

    Hi
    We are developing an application for hand scanners. But the client uses different kinds of scanners. For this purpose we have to create some custom java script functions. Can anyone share your experiences on this with us which can guide us in the right way..
    The common features between all these scanners are as follows
    Windown CE .net 4.2
    Always Online wireless network.
    Mobile Internet explorer 6.0/Ibrowse which comes along with the scanner.
    Edited by: Srikanth Kancherla on Jan 5, 2009 7:13 AM

    Hi,
    refer this link where he is talking about java script with web dynpro,and he is talking about a rendering frame work where we can implement the java script .
    and that will support with CE 7.1
    http://help.sap.com/saphelp_nw70/helpdata/EN/f7/f289c67c759a41b570890c62a03519/content.htm
           1.      Navigate to the view where you want to insert the BarCodeReader.
           2.      Double-click the view or choose Edit from the context menu.
           3.      Insert the mobile UI element BarCodeReader.
    This interface element is not visible on the user interface and activates the scanning function of the mobile device when the mobile application is called. When the mobile device reads a barcode u2013 that is, the onRead event is triggered u2013 the data is passed to the server and can be stored in the context. The event parameter must be mapped to the parameter of the action.
           4.      Insert a TextView element u2013 for example, ShowData.
    thanks and regards
    Manohar
    Edited by: Gouri  Manohar Gadhamsetty on Jan 6, 2009 5:46 PM

  • Javascript function to rotate an object around its axis

    Hello,
    I wonder if it is possible to rotate an object around its axis (eg 45 ° rotation)?
    I want to make this rotation with a button and a Javascript code!
    Is it possible? if so, have a track for me to start?
    thank you

    Possible, yes - but you will need some basic knowledge of how 3D matrix transformations work if you want to do anything complex.
    The code to rotate a node in a 3D scene by 45 degrees on the X axis is
    myNode.transform.rotateAboutXInPlace(Math.PI/4)

  • Custom Integrator - Date Picker/LOV does not return a value to the cell

    Hi,
    I have configured a webADI template with a date picker in it. Though the picker is rendered when i double-click on the cell, the selected date is not populated back. Same happens for any other list of values may render in the integrator. Any suggestions on debugging this issue.
    Regards,
    Vinayaka

    I have got the LOV working now. The issue was that I had not provided the table-select-column with the interface column name. It was set to the table column name.
    Regards,
    Vinayaka

  • Custom JS function

    Is there any convenient way to add my custom javascript function to Answers?

    Thanks for reply, Ally
    It seems that I had to do some hardcore coding :(
    I was not very clear from the beginning. Actually, I need to grab Oracle's cookies from a client's machine and send them to my custom app when the user clicks on my custom download-to-ods link. I've looked into JS files. And it's not obvious which file should contain new javascript functions.
    Does anyone have links or manuals that can help in my case?

  • Using Javascript function to change the value of a request variable

    Have a javascript function that activates onchange within a form variable. Would like the javascript function to change the value of a request variable.
    The javascript function is able to obtain the current value of the request variable ( which is 0 ) however I am unsuccessful in changing the value to 1.
    I have been trying to use the following:
         var vchange = 'request.changes_made = 1 ;' ;
         eval(vchange);
    Any ideas?

    If the user makes a change to the content of the form, and then attempts to leave the form, a javascript alert pops up giving the user the option of cancelling the submit, returning to the form and saving it.
    If there have been no changes, then the user is free to migrate to another page.
    This process is to protect users from losing valuable information but not to annoy them with "R U Sure" messages.
    Knowing the status of the form content is important to the functionality of the application.
    G

  • Javascript to JSP question...Can javascript function set session attributes

    hello,
    i have a web app that, on one of its pages, displays "tabbed pane" as an image map at the top (a la amazon.com). my problem is this: each "logical" page contains separate forms that all use the same javabean. in other words, imagine that the tabs represent an account maintenance web ui for an on-line record store. the first tab might be labeled "General," the second "Contact info," the third "Shipping Info." Each uses the same account bean and displays portions of its properties relevant to the tab at hand. what i want to do is allow a user to enter the account maintenance ui, update info on the first tab, click on tab two and have the request with the changes sent to a processing jsp. yet, since each "tab" is actually a separate URL to another page, how do i get the updated info on the first tabe without adding some sort of "SAVE" button on each tab. ive considered using javascript, but dont know how to get the request params out of the first tab whn i click on another tab. is it possible to include an "onClick" function in each URL that "grabs" the updated form fields off the preceeding tab? can a javacript function set session attributes in jsp?

    hello there,
    wow, you've created one big mammy-jammy tool.
    first, javascript cannot access, set values to the session, without having to post to another JSP. javascript is great for manipulating objects, layers, form values, etc.
    you have 2 issues [if i understand correctly]:
    1) you need to able to save user info for a specific tab without having to reloading the page.
    ---you can create a form for EACH of your tabs and POST all the information to a hidden IFRAME or LAYER for NN4. that hidden IFRAME / LAYER will load a JSP page which with all the parameters you posted to it. or you can build a FRAMESET and target that document["frame-name"].src with that same JSP.
    2) handling when the SAVE INFO action should happen: hence some javascript event handler: onMouseOver, onClick, etc
    ---i don't know the dynamics of your tabs, but if store which tab was clicked on last, then if the user clicks on some other tab, javascript can submit that FORM to a JSP [see condition above]
    you have an interesting tool. can i see?
    i hope i wasn't too confusing, but your problem is sooo interesting. =)
    -WJP

  • Calling a javascript function from an Applet

    I am trying to make an applet that works on as many browsers as possible, so I am sticking to Version JCK 1.1
    I am trying to call pass the javascript function into a URL object like this
    URL url = new URL("javascript:" + function, "_self");but I keep getting a MalformedURLException. I've read some of the other comments, but they all say to use the netscape.javascript package and the JSObject class, but I can't find that object anywhere inside the API posted on Sun's website.
    Any help would be greatly appreciated.

    To access JavaScript methods, properties, and data structures from your Java applet, import the Netscape javascript package:
    import netscape.javascript.*
    public class myApplet extends Applet
    {   public void init()
    {     /* Use the following syntax to call JavaScript methods:*/
    JSObject.getWindow().eval("expression")
    /*expression is a JavaScript expression that evaluates to a JavaScript method call. */ }

  • Parsing JSP values on to javascript functions

    HI
    Is it possible for Javascript functions to accept JSP variables?
    For instance:
    <script language="Javascript">
    function selectEdit(fileID) {
       document.forms[0].recordID.value = fileID;
       document.forms[0].submit();
         </script> and a button calls the method like this:
       <input type="submit" name="Submit" value="View" onClick="selectEdit('<%= Record %>'")> I tried but was unsuccessful, can someone help?
    Thanks
    Eugene

    Lets say you use your JSP to generate a set of links
    page1.jsp:
    <form target="targetPage.jsp">
    <input type="hidden name="recordId");
    <% for (int record=0; record<10; record++){  %>
      <input type="submit" name="Submit" value="View" onClick="selectEdit('<%= record %>')">
    <%  }  %>
    </form>This JSP code runs, and generates the following
    <form target="targetPage.jsp">
    <input type="hidden name="recordId");
    <input type="submit" name="Submit" value="View" onClick="selectEdit('0')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('1')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('2')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('3')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('4')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('5')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('6')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('7')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('8')">
    <input type="submit" name="Submit" value="View" onClick="selectEdit('9')">
    </form>This gets sent to your browser on displayed on screen
    When you click on the appropriate button, it calls your function selectEdit, which sets the value of the hidden field according to which button you pushed.
    It then submits the form, to targetPage.jsp
    targetPage.jsp retreives the value using request.getParameter("recordId");
    which is the name of the hidden field being submitted.
    JSP reacts to form submissions, and produces an HTML page.
    The HTML page can then run java script
    JSP gets run again when you submit the form.
    Hope this helps,
    evnafets

  • Pass a para to javascript function

    In a jsp page, a javascript function needs to get a parameter from a variable of the jsp page. How can I do this? Thanks a lot!
    ---a.jsp---
    <SCRIPT language=JavaScript>
    function changeR(userID){
    alert( userID + " chaged a value " );
    </SCRIPT>
    <% userID = "user1" %>
    <form>
    <input type="button" value="bbbb" onclick="changeR(userID)"> <!--it doesn't work this way-->
    </form>
    How should I write this part?
    onclick="changeR(??????)"

    <%! String userID=""; %>
    <html>
    <head>
    <script type="text/javascript">
    function changeR(userID){
    alert( userID + " chaged a value." );     // this line doesn't work.
    alert( "alert" );          // even this line doesn't work either.
    </script>
    </head>
    <body>
    <% userID = "user1"; %>
    <form>
    <input type="button" value="<%= userID %>" onclick="changeR(<%= userID %>)"> <!--it doesn't work this way-->
    <input type="button" value="userID" onclick="changeR(userID)"> <!--it doesn't work this way-->
    </form>
    </body>
    </html>
    This is the sample jsp page. There are two ways tried (two buttons), none of them works. :(
    When the first button is pushed, there's no response.
    When the second button is pushed, the status bar shows "Script Error!".

  • Firefox and click javascript function on h:commandLink

    I was wondering if you can help me with a problem i'm having with a h:commandLink tag. What I am trying to do is give the user a choice of executing the action or not by using the confirm() and click() javascript functions:
    <h:commandLink id="runNowLink" styleClass="tableFooterText" value="#{ViewResources.RunNow}" action="#{Schedule.runNow}" onmouseup="if(confirm('#{ViewResources.RunNowConfirm}')) this.click()"/>
    This works in IE, a dialog box with "ok" and "cancel" appears and depending on which option the user selects, the link is "clicked" or not. However, this does not work in firefox as the browser just goes through with the action regardless of the option selected. Can someone please help?

    probably set the property of <h:commandLink type="submit" /> or <h:commandLink immediate="true" />

  • How to invoke  javascript function after business action??

    How to call javascript function(such as "window.close(), window.open(...),...") in the action method(public String doBusiness(){...}) of <h:commandButton>?If not,then,is there any alternate approach to call javascript function when the bussiness action method finished??
    Thanks a lot!

    Since your business method is called after the form is submitted, and your code is running on the server, probably the only thing you can do is this:
    Create a custom component (Maybe call it the "onLoad" component) that you always render at the top of your JSP. In the regular situation it wouldn't render anything, but in the case you mention, after your busines method, you would call a method on this new component on the server that would cause it to actually render something the next time it is rendered. When rendered this time, it could then render the "onLoad" method which has your window.close() code in it. The window would then close right away.
    The key is that you are not doing any of this on the client. The form is submitted, your business logic is executed, then the next page is rendered. When the next page is rendered, your javascript could be rendered to close the window.
    If I'm offbase here, someone please say something, I'd hate to send this guy on a wild goose chase.
    Dave

Maybe you are looking for

  • Connecting to desktop Java application from R/3

    I want to connect to a java application program in my desktop and return a parameter to R/3. I have installed Java connector and I want to call the java application from R/3 using Java connector. I was able to get few samples to setup the RFC destina

  • Locking Video Clips

    IS there a way to lock video clips so that - at all costs - they stay in the same place? I've been trying to edit this video and every time I mess with a clip EVERYTHING after it gets moved all over the place. This is a music video project so syncing

  • Has anyone solved the "Unable to initialize API" e...

    I have an E61 that I'm trying to Sync to Lotus Notes 7 on my Windows XP sp2 Thinkpad. However, I keep getting the following error "Unable to initialize API" I can see that other people have been getting the error too. Nokia's web Site states that PC

  • ITunes won't sync certain photos from same roll to iPhone.

    Okay here is the deal. Sometimes after importing photos from the iphone's camera roll, iphoto crashes during the process of deleting the images off the iphone. It usually happens halfway through deleting, so there will be a few photos left on the cam

  • Guest WLAN and DNS tunneling (IP over DNS with iodine, NSTX, etc)

    Hello, I'm trying to implement guest WLAN with web authentication on the WLC 2504. L3 for guests WLAN is terminated on ASA 5510 (as subinterface). All works pretty fine. Guests clients are prompted to enter login/password, guests are authenticated ag