Stop player via javascript.

I am opening a flash player into a floating div. Works almost
perfect, except that when I close the div, the movie contines to
play. I can hear it even though I cannot see it. Is there a way to
stop the movie from playing via javascript when I click on the
div's "close" button?

hello there
look for ExternalInterface class on flash's documentation.
basicly it allows you to define functions in JS that call
functions inside flash and vise versa

Similar Messages

  • Flash inserted via Javascript not working in IE.

    I am having issues viewing flash that has been inserted via
    javascript in Internet Explorer. I had to uninstall my flash about
    a week ago. I've since reinstalled flash and reinstalled flash
    player for all my browsers. All flash shows where it hasn't been
    inserted via javascript (ie. youtube.com) but javascript flash is
    not showing at all in IE. Firefox is working fine. Any help in
    resolving this issue for IE would be greatly appreciated.
    Duncan

    I'm having the same exact problem. I've uninstalled,
    reinstalled, the works. Flash works great in my alternate browser,
    Opera, but not with IE.

  • Problem obtaining BitmapData for a canvas via Javascript

    Hi,
    For my web application I have one HTML button, which is outside of flash application shown on the same page. Via Flex application I've declared callback function to be called by Javascript in this way:
    ExternalInterface.addCallback("cbProcessButton", processButton);
    For HTML button I have this:
    <input id="bSave" name="button" type="submit" value="Save" onclick="getSWF('${application}').cbProcessButton();" />
    And inital lines of processButton function (which is Flex function) are defined as this:
              var bitmapData:BitmapData = new BitmapData(canvas.width, canvas.height, false, 0xFFFFFF);
              bitmapData.draw(canvas);
              var jpgEncoder:JPEGEncoder = new JPEGEncoder(85);
              var jpgStream:ByteArray = jpgEncoder.encode(bitmapData);
    Now I have problem here. If I call that processButton in this way for my canvas via Javascript - then I get length of jpgStream as 32654 bytes and after save into a file - that jpg file cannot be shown properly.
    But if I call the same processButton via a Flex button, which is placed inside my Flex - I get jpgStream in my case of length 33074 bytes and after save to a file - could normally show it later.
    I'm using Flex Builder 3 with Flex sdk 3.5.0.12683 installed and later show everything/work via Flash Player v10,1,53,64 installed on WinXP.
    Is it known bug/limitation of BitmapData usage in such Javascript scenario? Or is it bad sdk/Flash Player? Are you able to reproduce such in your environment?
    I'm really going out of my mind to understand why lengths of encoded data in 2 cases are different. Of course I know about that 2176 Error for other situations dealing with Flex UI, but here I don't get it - so I assume my Javascript scenario is allowed by Adobe so far.
    Any help would be highly appreciated.
    Andrejus

    Thanks very much, Everybody. Here is something that works. This is based on all the inputs provided by you guys. Many thanks.
    <table>
    <td width="3%" align=right></td>
    <td align=left valign=top> <b>Existing Notes:</td>
    <TD><textarea name="existing" wrap="hard" cols="70" rows="10" onkeypress
    ="validateSize(this, 2000)" onchange="validateSize(this, 2000)" READONLY>
    <%
    int logSize = actionLog.size();
    if (logSize > 0) {
    for (int j=logSize-1; j >=0; j--){
    DealStatusAction dsa = (DealStatusAction)actionLog.get(j);
    String actionNm = dsa.getActionName();
    String actionDate = dsa.getActionDate().toString() + "";
    String memo = dsa.getMemo();
    String actionPerformer = ((dsa.getLastName() == null || dsa.get
    FirstName() ==null)?"":(dsa.getFirstName() + " " + dsa.getLastName()));
    String datePerf = actionDate + " " + actionPerformer;
    %>
    <%=datePerf%>
    <%=actionNm%>
    <%=memo%>
    <%
    %>
    </textarea>
    </TD>
    </table>

  • SaveAs and maintain "optimized for web view" via javascript???

    I am trying to do a SaveAs via javascript, but I need to maintain the linearized (optimized for web view) state of the PDF.
    I would get this via the SaveAs menu item, but I need to do it silently and rename the file (replace _H.pdf with .pdf).
    Is there anything that I can read that will help me do this? I have looked through the API reference, AcrobatUsers.com, web search, etc.
    Or, if it cannot be done, stop me now.
    Here is what I am doing currently wtih help from this forum.
    XXX_DoSaveLoRes = app.trustedFunction(function()
    app.beginPriv();
    this.saveAs(this.path.replace(/\_H.pdf$/i,"") + ".pdf");
    app.endPriv();
    Thanks,

    I don't think it can be done.

  • Accessing a network resource via javascript

    Hello,
    we have been using Adobe Reader for linux provided by the yum repository for quite some time, without major issues. Currently, however, we are seeing a mysterious problem with a PDF form which is designed to exchange data with a local server, using javascript functionality, as far as I can see. On one of our machines (running CentOS 5.8 64-bit) this has stopped working recently, and I cannot figure out why. Clicking the respective field simply has no effect, there is no error message, neither in the Reader window, or on the console, both in normal mode and debug mode. Nothing in the system logs either. The function simply seems to be ignored!
    Some observations which might be helpful:
    1. Uninstalling and reinstalling the Reader package, after clearing all personal preferences, did not have any effect.
    2. Using a fresh version of the PDF form did not solve the problem.
    3. Firewall and SElinux are disabled anyway.
    4. With a "clean" account on the same machine, the same problem occurs.
    5. On a very similar machine (same OS, same Reader version) the operation is working properly!
    So it seems to be something specific to this machine, but not specific to a certain account. It is obviously neither a corrupted Reader installation, nor a problem with this specific reader version, nor a corrupted PDF form. Now I am running out of ideas...
    Any suggestions what else might be preventing network access (via javascript) from functioning properly? Javascript itself is (by default) enabled in the preferences.
    Thanks in advance
    Oliver

    Sorry for the double post, but help would be appreciated...

  • Flash Player and JavaScript

    Hi,
    I am the creator of the
    Virtual Cutter.
    This is a website that can be used to create clips and playlists
    for a large number of streaming video formats, and currently
    supports the Windows Media Player, Real Player, Quicktime Player
    and Kasenna Broadband Player. I am now looking to support the Flash
    Player as well, or, more accurately, Flash-specific file formats
    such as swf and flv.
    As I am not a Flash programmer and do not know much about
    Flash files, I hope to find answers to the questions I have about
    this issue in this forum.
    To use the architecture of the Virtual Cutter, I need to
    access the Flash Player using JavaScript.
    1. Is there a JavaScript function to get the current position
    of the videofile? Something like flashplayer.getcurrentposition
    2. Is it possible to add buttons to start, stop, pause,
    rewind the file?
    Off course, to play a clip, it must be possible to play a
    file from any position in the file. The Virtual Cutter therefore
    generates (depending on the player) an .asx, ram or.smil file, that
    contains parameters for start point and end point/duration.
    3. Is there a similar file format that I can use to play only
    a selection of the Flash file?
    4. Is is possible to create a playlist, so a sequence of
    clips can be played?
    5. What Flash-specific file formats could be processed?
    The Virtual Cutter is an Open Source project. If anyone is
    interested in working together on this, please contact me.
    Best wishes,
    André Rosendaal

    No Flash for iPads, iPhones, or iPods
    Here's why there's is no Flash available for iDevices or other mobile devices. Adobe was unable to provide a product that was suitable to the needs of battery powered mobile devices used for Internet browsing. Existing Flash technology used too much memory, ate battery life, and was buggy. Simply put Flash did not work well on mobile devices.
    Apple's Steve Jobs led the escape from Flash dependency when Apple introduced the iPhone, and later introduced the iPad. There was a hue and cry over the omission. Time proved Jobs was right on target.
    So this is why there is no Flash for your iPhone or iPad or iPod nor for most SmartPhones. Flash has been abandoned by many sites in favor of supported technologies such as HTML5 or by providing their own custom app.
    Here is Steve Jobs official comment on his momentous decision to omit Flash from iDevices: Steve Jobs on Flash.
    Here is Adobe's later announcement to cease development of Flash for mobile devices: Adobe on Mobile Flash. Adobe is not providing Flash for Apple iOS devices, and they no longer provide Flash for any other cellular phones. Flash is officially gone.
    Now, you are not necessarily out on a limb. There are some apps that can display some Flash, but don't count on there ability to display anything using Flash.
    A sample of Apps that can display some Flash content:
      1. Puffin
      2. SkyFire
      3. Photon Flash
      4. Browse2Go
      5. Swifter
    Also, note that many sites that use Flash provide their own app for accessing their material. So check with your favorite sites and find out if "there's an app for that."

  • Time capsule to tether a DVD player via Ethernet cable?

    I've bought a new time capsule for my main wireless network. Can I use an old time capsule to connect to the network and then tether a DVD player via Ethernet cable?

    Yes, but keep in mind that the "Ethernet" connection from the old Time Capsule to the DVD player will only be as good as the quality of the wireless connection between the two Time Capsules.....assuming you plan to connect the older TIme Capsule wirelessly to the network.
    If you plan to connect the old Time Capsule to the new using a wired Ethernet connection, then things will be just fine.

  • How to get elements in a multi-value field via javascript?

    The following will set variables.variable1 to variables.variable2 when the "Script Link" component is clicked...
    <Field>
    <Display class='Javascript'>
    <String>
    function myScript() {
    el=getElement(document.mainform,"variables.variable1");
    el2=getElement(document.mainform,"variables.variable2");
    el.value=el2.value;
    </String>
    </Display>
    </Field>
    <Field name='Script Link'>
    <Display class='Link'>
    <Property name='URL'>
    <String>javascript:myScript();submitCommand(document.mainform,%20'Recalculate');</String>
    </Property>
    </Display>
    </Field>
    My issue is, if variables.variabl2 is a list / multivalued, i get errors trying to traverse through the "array".
    How can i read and set an a list element via javascript function above? I've tried things like get() , and variables.variable2[0] .
    any help would be appreciated....
    is there an API somewhere i can reference?

    Hi,
    thanks for your reply!
    If I have the parameters in the URL and use the method GET it works all right.
    but I need the method to be POST. I suppose, I have the wrong way identifying the parameter name
    This is from VB
    varTarget = "http://localhost:9090/gm/getData" ' getData is my servlet
    xmlSendStr = "SQLStmt=SELECT TCPD_Cars.* From TCPD_Cars WHERE (((TCPD_Cars.CarIdent)=45));"
        xmlHttp.Open "POST", varTarget, True   'True means asynchronous
        xmlHttp.Send xmlSendStrthis is part of my Servlet
         protected void doPost(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {
              response.setContentType("text/html");
              PrintWriter writer  = response.getWriter();
              String SQLStmt = request.getParameter("SQLStmt") ;
            //make the database query and get the returns
            writer.println(GetSQLData(SQLStmt));
            //close the write
            writer.close();                    
         }I would appreciate any suggestions

  • Firefox 3.6 crashes or hangs when setting an iframe src to a pdf via javascript. 3.5 works fine

    Firefox hangs or crashes when setting iframe src to a pdf via javascript. Works fine in all previous versions of Firefox. This is using the most recent version of Adobe Reader 9.
    == This happened ==
    Every time Firefox opened
    == I upgraded to Firefox 3.6

    More info:
    Seems to be the same issue as this
    [http://support.mozilla.com/en-US/forum/1/585926#threadId622326]
    and this
    [http://support.mozilla.com/en-US/forum/1/585926?forumId=1&comments_threshold=0&comments_parentId=585926&comments_offset=20&comments_per_page=20&thread_style=commentStyle_plain#threadId659555]

  • How can I add a watermark via JavaScript that includes the current datestamp?

    Part of my daily work process here is to scan in a huge stack of inbound mail. I then OCR the scans, delete the blank pages, and add a watermark. I've got a batch process set up for the first two steps, but I can't make a watermark for the datestamp itself and need to do so via JavaScript, but I have a luddite-level understanding of it.
    As of right now, these are my settings I'm using to add the datestamp:
    What I want to do is run a script to do the same thing and insert the current date where I have mm-dd-yy currently, but I don't have the first clue of where to start. Any help you could offer would be hugely appreciated

    You can use the doc.addWatermarkFromText() method as a JavaScript step in an Action.
    for example
    var dt = new Date();
    var stoday = (dt.getMonth() + 1) + '-' + dt.getDate() + '-' + dt.getFullYear();
    this.addWatermarkFromText({
    cText: "Deposit\r" + stoday,
    nTextAlign: app.constants.align.right,
    nHorizAlign: app.constants.align.right,
    nVertAlign: app.constants.align.top,
    nHorizValue: -72, nVertValue: -72
    See the SDK Help files for information on what all the parameters do.

  • Firefox 4.0 support for printing embedded PDF files in iFrames via JavaScript

    I recently upgraded to Firefox 4.0 and can no longer print embedded PDF documents contained in an iFrame.
    My company's web application has several pages which load PDF files from a Servlet into an iFrame. The pages in question all have "Print" buttons which when clicked executes a JavaScript function to obtain reference to the iframe containing the PDF, place it into focus() (e.g., frames['pdfdoc'].focus();), and invoke print() (e.g., frames['pdfdoc'].print();). There are no errors, or exceptions caught when the JavaScript function is invoked, but the "Print" button is no longer operational.
    Does Firefox 4.0 no longer support iFrames? The issue goes away if I revert back to ver 3.6.16

    I have same issue for printing embedded PDF files in iFrames via JavaScript in Firefox 5.0.
    In previous versions it was working fine. But not in Firefox 4.0/5.0.
    Is there any solution for this problem?

  • Uploading a File with AppleScript via JavaScript

    Hi everybody,
    being new to AppleScripting and JavaScripting I'm faced with the following problem:
    Is it possible to make AppleScript to input the path for a file to be uploaded via JavaScript? If yes, what should be the correct Path Format and how to wrap it up the JavaScript action into AppleScript? I've tried a few comands but to no success.
    On the webpage in question, there's a "Choose" button, that is defined as follows:
    <input type=​"file" class=​"gwt-FileUpload" name=​"swfFile">​
    I've been trying to use the following syntax:
    do JavaScript "document.getElementsByName('swfFile')[0].value('Macintosh HD:Users:myaccount:Desktop:Scrapbook:!动画.swf')" in document 1
    as well as this one, where the Path is definitelly understood by shellscript:
    do JavaScript "document.getElementsByName('swfFile')[0].value('/Users/myaccount/Desktop/Scrap book/!动画.swf')" in document 1
    The name of the file is (and must remain) in chinese, but for testing purposes I have also tried files with english names, without success.
    Currently I'm using a solution with JavaScript comand:
    do JavaScript "document.getElementsByName('swfFile')[0].click()" in document 1
    to click the finder  window to browse for the file, and manipulating  keystrokes by using System Events to find the right file, but it's not  infallible with a number of files and it's hardly an ellegant sollution.
    Any idea what I'm doing wrong?
    Cheers!

    @twtwtw
    the do JavaScript "document.forms[0].submit()" command didn't work, so I kept the original way of submitting by clicking the button. The submitting part works, but not the input file part.
    That's the code I used
        tell application "Safari"
            do JavaScript "document.getElementById('gwt-uid-13').value='on'" in document 1
            do JavaScript "document.forms[0].elements['swfFile'].value=" & "'" & SWFFilePath & "'" in document 1
            do JavaScript "document.getElementsByClassName('gwt-SubmitButton')[0].click()" in document 1  
            delay 1
        end tell
    with SWFFilePath set as the POSIX path as well as the default file format
    Macintosh HD:Users:myaccount:Desktop:Scrapbook:!动画.swf'
    but it did not work.
    If you've got the time, feel free to upload an .swf. The service is free and the server delats uploaded files after 15 min. (if you don't have any, you may try an empty .txt file instead - it won't get converted, but the point is just to get it into the input box).
    In the meantime, I'll have a look at adayzdone's suggestion. It's not perfect (the downside being that it requires the window to be active, so I can't run the script in the background or with my screensaver & password on), but it's still more reliable than my sollution with navigating arrowkeyes.

  • Charging Zen Stone 1GB Player via Laptop USB P

    Greetings to the forum.
    I tried to charge my new Zen Stone GB player via my laptop's USB port. Even though the charge indicator went solid, I got only about three minutes out of the player. I then repeated the process, and the player charged perfectly. I may have used a different port the secont time around. Are there differences between laptop USB ports?
    In both charge attempts, I made sure "Standby" and "Hibernate" were disabled, and I did not use a USB hub.
    Thanks for all help.
    Craig

    Using a different port may have been the solution. Laptop USB ports can be a little flakey when it comes to standards compliance. The USB ports on the back of the laptops are generally compliant to USB standards.

  • Apply watermark and then apply Flattener Preview via JavaScript

    Hello all,
    I have a bunch of PDF files which were generated from InDesign.
    Currently I am applying a watermark to all the PDFs in Acrobat XI and then a flattener preview to all of the PDFs manually one PDF at a time.
    I want to make a script which does all this.
    I also tried the Action panel, but it didn't automate the flattener preview part.
    I am comfortable with JavaScript and scripting in general.
    Any help or a pointer to resources will be appreciated.
    Thanks and regards.

    Thanks for replying.
    The flattener preview is located under "Print Production" panel. Where one can configure the text flattening options, among many other settings.
    I want to flatten the text (convert it to outlines) via JavaScript as you have suggested.
    Please suggest any sample code.
    Thanks and regards.

  • Accessing Properties of Individual Tool Buttons via JavaScript

    Hi all!
    I am new to both this forum and scripting Acrobat so please excuse me if the question sounds naive.
    I am trying to find a way to access the properties of individual tool buttons via JavaScript (if there is one). I could not find it yet in JS API Reference. If anybody can help me or direct me to the right way, I will greatly appreciate that.
    For example, in 'Comment & Markup' toolbar one can right-click and change the 'Tool Default Properties' of various markup tools like Highlighter, Line, Rectangle etc. Is it possible to access these properties through JavaScript so that buttons can be added for dynamically changing these? Hope this makes sense!
    Thanks in advance for your interest and help.
    John.

    Hi Andy, thanks for the answer. It was pretty simple - I just added an authorization scheme to the report column, wehre the javascript is executed. Christof

Maybe you are looking for

  • I have restored my iphone but it has been 2days saying that the activation server is not available. please help me.

    i have restored my iphone but it has been 2days saying that the activation server is not available. please help me.

  • Crystal Designer option missing in SAP B1

    Hi I have re-installed Crystal 2008 and SAP Crystal add on in my PC, Now I donu2019t see the Crystal designer tab option available which I had before. I followed the same steps which I have done before. I have .net framework 3.5. Not sure what I have

  • Drag and Drop on Page Component

    Hi, I have an edit configuration which looks like this:     <?xml version="1.0" encoding="UTF-8"?>     <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"         jcr:prim

  • MM Storage location info REQ??

    Hi I need the field & the table name where the storage location of the receiving plant is stored. In the STO/PO the storage location for sending plant & receiveing plant is entered. Even for the GR for the Delivery No. the storage location is defined

  • How to create composit key ??

    Hello Friends! i need your help. I have to create composit key. I have 2 tables. Table 1 contains 9 colums and table 2 contains 3 colums. I am writing down just related colums of table1 Table1: SID (pk) , Bytes_convert_test , Operator , Value , offse