Actionscript external interface onload

Hi
I Have this external interface code that sends a video url to a video player when a user clicks a button it goes some thing like this:
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
function callJavascript(sendText){
   window.document.myMovie.SetVariable("testValue", sendText);
</script>
The code above works fine when a user click a button with onclick the passed variable is a video url
and is send to the player.
The problem is I would like to get the video url passed when the page is loaded.
I have tried.
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
var sendText=$("Videosroll/Videos/1.flv").val();                                                                      
window.document.myMovie.SetVariable("testValue", sendText);
</script>
This does not work. I think its because the videoplayer is not fully loaded when this action is called. 
I have looked at javascript timers etc. If any one has a solution please help.

Hi
This is extremely helpful. My current actionscript is:
var testValue:String = "";
watchCallback = function (id, oldval, newval):String {       
    result_txt.text = newval;
    myVid.play(newval);
    return newval;   
_root.watch("testValue", watchCallback);
HTML/PHP:
<?Php
//This is a while loop with many videourls and thumb images. When clicked the javascript passes the video url to flash.
<a href="" onclick="return false" class="gt" name="'.$vidfield.'"><img src="'.$vidthumb.'" width="180" height="105" align=center /></a>
?>
Current javascript:
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
    $(".gt").live("click", function(){
        var sendText = $(this).attr("name");
        window.document.myMovie.SetVariable("testValue", sendText);
</script>
The attempt is to automaticly send the a video url onload. So using your advice I added this to current code:
HTML:
<body onload="callnow(videourl)"></body>
Javascript:
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
function callnow(videourl){
return videourl;
</script>
Actionscript 2.0:
import flash.Exteneral.ExternalInterface;
var videoURL:String=ExternalInterface.call("callnow");
//Videoplay called myVid.
myVid.play(videoURL);
This has failed to play the video url onload. Other effort include changing callnow function to:
function callnow(videourl){
  window.document.myMovie.SetVariable("videoURL", videourl);
return videourl;
This has not been a success. I hope you can help and thank you again.

Similar Messages

  • External interface.call is not working

    hi, i am trying to call one java script function in
    actionscript by using External interface.call method. but its not
    working .can u pls tell me why this happend

    "angadala" <[email protected]> wrote in
    message
    news:gmpc58$g9p$[email protected]..
    > skill status.mxml
    >
    >
    > <mx:Script>
    > <![CDATA[
    > if (ExternalInterface.available) {
    > ExternalInterface.call(getDataFromXml);
    > }
    >
    > it is javascript
    > <script type="javascript">
    > var data = new Array();
    > data[0]=[1,2,3];
    > function getData()
    > {
    > return data;
    > }
    > </script>
    > </head>
    > <body>
    > <div id="SkillStatus">
    > <p>Alternative content</p>
    > </div>
    >
    > </body>
    > </HTML>
    >
    1) Your JavaScript function name and the function name you
    are calling
    don't match.
    2) On the Flex side, you are calling a JS function that I
    think you are
    expecting to return a value, but not assigning the result of
    the value to a
    function.

  • Memory leak in external interface SetReturnValue?

    I'm having trouble with a memory leak in my application. I'm
    hoping someone out there can help me find a fix or workaround, or
    tell me what I'm doing wrong.
    The leak seems to be coming from the flash external
    interface; specifically, IShockwaveFlash.SetReturnValue(String). My
    application is written in Visual Basic 2008, connecting to Flash
    9.0.124.0 (activex version).
    I've written a fairly simple flash/VB program pair to
    illustrate the problem.
    The SWF contains a button, 2 dynamic text fields, and the
    ActionScript 2 code below.
    The VB project contains a Form with a AxShockwaveFlash object
    and the VB code below.
    When this program is run, and the button is clicked a lot
    (10's of thousands of times), the application's memory creeps up
    and never seems to fall back down. If the string passed to
    SetReturnValue is longer, memory is consumed faster. But if the
    call to SetReturnValue is commented-out, the application's memory
    usage remains stable.
    If anyone has any suggestions on how to proceed, I'd be
    grateful.
    (By the way: I'm using a freeware program called DoItAgain to
    automate the button pressing.)

    I have developed two simple Java and corresponding
    C++ classes. Use code tags when you post your code.
    You are missing a lot of error checking. JNI calls, every single one, will usually be followed by some sort of error checking. Any that access classes, methods, fields or allocate object must be followed by checks for java exceptions.
    You will need to reduce your code to a smaller sample. Otherwise it is unlikely anyone will look at it.
    You also need to specify how you know that a memory leak is occurring.

  • Delete Intransit from APO which Loaded by PI from external interface

    Hi all,
    I am facinf a problem in deleting the Order created by External Interface.
    We are loading Inransit as PO Mamo (ATP Category AH). Now we need to delete all the Record with AH ATP categoy before we reload new intransit to APO.
    Problem is we are not able to delete those order as those are not in Live Cache.
    We try using transaction /n/sapapo/bp2 but every time its throwing error "SAP APO system Q51CLNT100 has been declared as an SAP R/3 system.
    and even i try deleting from /SAPAPO/RLCDEL. but its not deleting those order.
    Can some one suggest what to do.
    What all the option that we can try to delete the intransit.
    Thanks & Regards,
    Amit Sharma

    Hi Amit,
    You can use BAPI to delete AH ATP Category.
    1. Read all Purchase Documents from BAPI_POSRVAPS_GETLIST3 for product u2013 location for AH Type ATP Category only.
    2.Get the ORDID on the selection made.
    3.Call BAPI_POSRVAPS_REMOVEITEMS and load the list of order no. and then delete it.
    Please try this.
    Thanks,
    Dipankar

  • ASA 5505 external interface dying

    Hi,
    We have an ASA 5505 ( version 9.1(2) ) that frequently stopped functioning ie the external interface refuses to pass any traffic , ASDM wont connect,etc.
    The internal interface does continue to function and if we SSH into the unit and do a reload , everything springs back into life again.
    What are the best steps to troubleshooting and finding a fix to this problem?
    Chris

    Hi Amrin,
    you can configure SLA monitoring on ASA and that woudl work fine for you:
    http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a00806e880b.shtml
    Hope that helps.
    Thanks,
    Varun

  • ASA 5510 Anyconnect VPN question-"Hairpin" vpn connection on same external interface

    I have a Cisco ASA 5510, I want to allow a VPN connection to be established by a client on one of the inside interfaces(10.20.x.x) to be able to go out the single External interface and get authenticated by the ASA to create a VPN tunnel to the other inside interface (10.0.X.X) and access resources on that subnet.
    Basically want clients on a WLAN to be able to VPN back in to the LAN with the ASA in the middle to get to company resources,
    Is this possible?
    Thanks,
    Tommy

    When we connect any VPN on a device then it is always a TO THE DEVICE connection and I am afraid we can connect only to the local / nearest interface where user is connected in a network with respect to ASA.
    I have seen this scenario working though earlier with one of my clients wherein he has configured his DNS server accordingly so that depending upon the source of the DNS request an appropriate IP address was provided for same DNS name. For example if user from IP address range 192.168.0.0 range connects to abc.com then it will get IP address 192.168.1.1 and if a user from range IP address10.0.0.0 connects then it will get 10.1.1.1.
    If we configure the same scenario as well then your requirement will be fulfiled with same name however VPN has to be enabled on wireless interface again. If not, then as you have described configuring a new domain name for VPN connection only for wireless users should do the deal.
    Regards,
    Anuj

  • Is there a way to run an existing PS-JS script using external interface

    I have several previously written Photoshop JS scripts which I'd like to run through buttons on PS panels, much like the example for the HelloWorld introduction. I assume that--using external interface--I'll somehow be able to fire off these script files. Is this a correct assumption?
    Thanks!

    Certainly, but not with external interface.
    Have a look at the cookbooks. There are examples of how to use the root host object to call directly into extendscript.

  • Two external interfaces; one to be used for outboud; second to be used for incoming VPN\Web traffic.

    I'm configuring our ASA and we have two AT&T circuits which we're only using one with our current Juniper firewall. I know the ASA doesn't support policy based routing so I'm wondering if the following hypothetical "config" is possible.
    External Interfaces:
    OUT_01 - 12.133.X.X
    OUT_02 - 201.61.X.X
    I would route all internal traffic to go out through OUT_01.
    We have over 5 site-to-site VPN and 30 external facing servers.  Could I use OUT_2 to configure all the inbound connections for the VPN and NAT rules?

    You can configure the ASA to allow asynchronous routing, as you are describing, by configuring TCP bypass.
    http://www.cisco.com/c/en/us/td/docs/security/asa/asa82/configuration/guide/config/conns_tcpstatebypass.html
    What this will do is you will still need to send traffic out one interface but the ASA will accept return traffic on either of the outside interfaces.  Configuring this can be a security risk as the ASA will ignor the state table.
    Or you could wait until ASA version 9.4 which will have support for PBR.  Ofcourse this is the first version that will support it, so don't be suprised if it has a few bugs.
    Please remember to select a correct answer and rate helpful posts

  • What does "No External Interface" mean?

    Adobe Flash Player will not install the complete program.  It's telling me that it can only install a single file at a time.  The display box states that I have version 9.0.45.0 installed and my operating system is Windows XP then for the browser in states No External Interface.  Not sure how to correct the problem but it's telling me that Flash Player didn't install completely.

    Download and run the offline installers from http://helpx.adobe.com/flash-player/kb/installation-problems-flash-player-windows.html#mai n-pars_header (under the heading Progress bar hangs).

  • External interface memory leak?

    Hello,
    I am embedding the flash player inside a Visual C++
    application. My program uses the external interface extensively.
    The external interface is called several times a second ( ~20 fps )
    each time a ~1k XML string is passed to the flash player.
    During execution the program increases its memory by ~10 Mega
    each hour. I have used the Umdh tool to try to locate the problem.
    It points to the line where the container program uses the external
    interface to call a function inside the swf movie.
    Below is a typical output of the Umdh tool:
    + 3396588 ( 3405883 - 9295) 261991 allocs BackTrace12EF
    + 261276 ( 261991 - 715) BackTrace12EF allocations
    ntdll!RtlpNtMakeTemporaryKey+000074D0
    ntdll!RtlInitializeSListHead+00010D08
    ntdll!wcsncat+00000224
    FlDbg9c!DllUnregisterServer+0010261A
    FlDbg9c!DllUnregisterServer+0010263C
    FlDbg9c!DllUnregisterServer+0000F1B7
    myProgram!CZFlash::CallFunction+0000004D (c:\documents and
    settings\amit\my documents\visual studio projects\ myProgram
    \zflash\zflash.cpp, 255)
    myProgram!MainDialogProc+000012A2 (c:\documents and
    settings\amit\my documents\visual studio projects\ myProgram
    \w32\maindlg.cpp, 2324)
    USER32!GetDC+0000006D
    USER32!PrivateExtractIconExW+000002B2
    USER32!PrivateExtractIconExW+000000FE
    USER32!DefDlgProcW+00000022
    USER32!GetDC+0000006D
    USER32!GetDC+0000014F
    USER32!IsWindowUnicode+000000A1
    USER32!CallWindowProcW+0000001B
    COMCTL32!Ordinal11+00000328
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    COMCTL32!RemoveWindowSubclass+0000017E
    COMCTL32!DefSubclassProc+00000046
    COMCTL32!Ordinal389+000028DF
    The System.totalMemory value of the flash player ranges from
    2.2 Mbyte to 3.2. I tried using memory leak detection software like
    IBM's Purify but couldn't find the problem.
    I also tried to disable the BSTR caching by setting the
    environment variable OANOCACHE, but the memory of my program
    continues to increase.
    Below is my C++ code. The m_iflash object is a pointer to the
    ActiveX of the flash player.
    wstring CZFlash::CallFunction(wstring call_string)
    BSTR pcall_string = SysAllocString(call_string.c_str());
    BSTR presponse = NULL;
    HRESULT status = m_iflash->CallFunction(pcall_string,
    &presponse);
    SysFreeString(pcall_string);
    if (status != S_OK)
    if (presponse != NULL)
    SysFreeString(presponse);
    return L"";
    wstring sresponse(presponse);
    SysFreeString(presponse);
    return sresponse;
    Currently the swf movie contains only action script that
    displays the System.totalMemory value and an empty function that
    the external interface calls.
    Any help will be appreciated.
    Thanks in advance,
    Amit

    Hello,
    Thanks for coming to National Instruments Discussion Forum.
    Can you give us more details about your application? Basically, I can’t find your main VI for your User Interface. Can you also give us the different steps to do to run your application and reproduce your problem?
    Generally speaking, your code on your block diagram have to be displayable in one screen.
    Benjamin R.
    R&D Software Development Manager
    http://www.fluigent.com/

  • Hide messages for External Interface Program Error

    Hi,
    I am facing problem in removing the external interface errors encountered during EPC of a Y program. Can you please suggest any solution for hiding the error in the custom Y program using #EC.
    Regards,
    Kajari

    Hello IvoK,
    The 9881 needs to be externally powered. You can do it with a CAN Breakout Box or with a CAN cable.
    Regards
    Mélinda B
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure - Nouveau contenu
    34 sessions partout en Fra...

  • Problem adding CSA external interface in IPS 6

    I configured my AIP-SSM sensor running IPS 6 to connect to the CSA MC, but I get a connection failure. The sensor is showing the following error when trying to connect:
    evError: eventId=1168311248090659938 severity=warning vendor=Cisco
    originator:
    hostId: os-ips
    appName: externalProductInterface
    appInstanceId: 317
    time: 2007/01/20 02:50:22 2007/01/19 20:50:22 GMT-06:00
    errorMessage: name=errNotAvailable Failure opening a subscription on the Management Center for Cisco Security Agents external interface at 1.1.1.1: Parse response found a different element when expecting the SOAP Envelope element

    The interface is currently disabled, but I think you'll get the picture.
    cisco-security-agents-mc-settings (min: 0, max: 2, current: 1)
    ip-address: 1.1.1.1
    interface-type: extended-sdee
    enabled: no default: yes
    url: /csamc/sdee-server
    port: 443
    use-ssl
    always-yes: yes
    username: adminuser
    password:
    host-posture-settings
    enabled: yes default: yes
    allow-unreachable-postures: yes
    posture-acls (ordered min: 0, max: 10, current: 1 - 1 active, 0 inactive)
    ACTIVE list-contents
    NAME: 1-subnet
    network-address: 192.168.1.0/24
    action: permit
    watchlist-address-settings
    enabled: yes
    manual-rr-increase: 25
    session-rr-increase: 25
    packet-rr-increase: 10

  • Creating PO in SRM through external interface

    Is there a way to create a PO in SRM through an external interface without creating a shopping cart?  I see that we can create a shopping cart through BBP_PD_SC_CREATE_EXTERNAL.  But we need to create a PO in the SRM system without the shopping cart.  Is this possible?  It's neither the classic nor extended classic nor the standalone SRM scenarios that all have the shopping cart generate the PO.  Is there a way to create the PO without the shopping cart?  Is there a BAPI to do this?
    Right now, we generate an XI ABAP server proxy which allows us to push the PO information from an external system through XI into SRM, but we do not know what SRM function we need to invoke.
    Any help would be appreciated.
    Thanks,
    Jay
    SAP Integration Consultant

    I can give you the technical example of how to create a PO. You can get the sample logic of creating PO's from the program MBT_PO_MASS_CREATE.
    Regards,
    Mani

  • Using External Interface on local content

    We're using External Interface for interfacing between Flash
    and
    JavaScript on the HTML page. All works fine online. When we
    try to
    localize the pages though (so that a Salesperson can have a
    CD full of
    demos), none of them seem to work.
    Is this an over-sensitive Flash security issue? We already
    have
    allowscriptaccess='always' and swliveconnect=true in the
    object/embed tags.
    What can we do that doesn't require changes on each
    individual machine
    to set trust paths or any other kind of browser
    configuration? Not only
    do we want to have this content working on the machine of a
    salesperson,
    we may get clients that want to deploy content offline
    (kiosks, machines
    without any network access).
    ~dd

    I believe you also need to have the user add the Flash file's location as a trusted
    source in the Flash Player settings.
    This is obviously an enormous pain. To get around this, you can run a temporary server from the CD. My team has used the Flying Ant server (http://www.wrensoft.com/flyingant/) and it worked quite well, and it runs on Mac, Windows, and Linux.
    Alternatively, you could create an installable AIR app to get around the security sandbox issue. If you don't want to have the customer install anything or have to go through loads of instructions to change Flash Player settings, go with the server solution.

  • External Interface and Apple OS X Security Updates since 28 July 2010

    Ever since the OS X and Safari updates from 28 July onward, we have been unable to send data from Flash player to Javascript and out to Unity 3D.  From the alert() statements I have made, it appears as if the communication is being blocked at the Flash level.  In other words, the browser is either no longer accepting the external interface calls from Flash, or Flash is blocking them internally.  Calls from the browser to Flash are still functional.
    The Flash version number is 10.1.82.76 on both old (non updated machines) and newly updated (doesn't work).  Our application works on Windows fine.  On OS X systems that have not had the updates, it also works fine.
    We purchased a new iMac tonight to test and the communication works fine:
    Mac OS X 10.6.3
    Safari 4.0.5 (6531.22.7)
    On another machine the system worked fine a week ago:
    Mac OS X 10.6.4
    Safari 5.0 (6533.16)
    After the update to the following, it does not work:
    Mac OS X 10.6.4
    Safari 5.0.1 (6533.17.8)
    Anyone experiencing anything like this?  Anyone experiencing ANY trouble with Flash and those updates?
    Any and all information will help.

    A number of folks have posted similar crashing-related reports with that same system.
    http://www.macworld.com/article/2062783/cures-for-a-panicking-mid-2010-macbook-p ro.html
    You may wish to contact Apple support.

Maybe you are looking for

  • "PC" user with new IPAD2 w/3G.  How do you add attachments (pictures, links, documents) when you are creating a new e-mail?

    Just recently purchased an IPHONE4 for myself and an IPAD2 w/3G (16 GB) for my wife.  Our provider is Verizon.  It's a struggle as we both have a lifetime of experience in the "windows" worlds.  It probably is something very obvious to users familiar

  • OSB: cluster creation script fails to delete migratable targets

    Hi, I am working on a wslt script which creates an OSB domain with a cluster with one admin server and two managed servers. In this script, after adding the OSB required templates, I would like to delete the migratable targets created by the template

  • Failind AND step of process chain

    Hi all I am facing problem with AND step in one process chain. AND step is failing as soon as chain is triggered. All the proceses before AND are executing properly with GREEN Status. "This AND process is not waiting for event RSPROCESS, parameter 4B

  • Command T shortcut not working

    Hi, for some reason I'm suddenly unable to use the command T keyboard shortcut to open a new tab in either Safari or FireFox. I'm not sure when the problem started I just noticed it today. I can open a new tab from the finder window but not with the

  • Can't play a song on desktop of Mac

    You know, on Mac OSX, when you download a song and put on desktop, you can play it right away by click on the arrow on the song. So there won't be any need to open itunes. But for some reasons, I can't do it anymore, and i don't know why. Does anyone