Javascript to pause/play project

So I created an HTML5 project with CP8 and have a button on top to pause play the movie connected to an advanced conditional action to pause and play. Here are the screen shots:
This action works fine until a hyperlink or a button with external link is opened. After that the pause button needs to be held for 2 seconds and then released to actually pause the slide while the play function works instantly. This is being packaged into an App for review by the Apple store and I know they are going to have a field day with it.
So the question is is there some javascript code that I can use to accomplish the same function
Example On Click-> Execute JS
Script:
function playPause() {
    var mediaPlayer = document.getElementById('cp.movie');
    if (mediaPlayer.paused) {
        mediaPlayer.play();
    } else {
        mediaPlayer.pause();

Never mind I changed things around and now everything works.
Conditional actions crash when opening a link so avoid using them.

Similar Messages

  • Pause & Play Animation When i'm using movie clips- filters

    Pause & Play Animation When i am using movie clips-
    filters
    Graphic and movieclips are using for my animation
    When i Press the pause the movieclip animation not stopped.
    Any way to apply the filters on graphic
    I want to apply the filters for particular graphics or movie
    clips. with navigational button working.
    Please help me.
    Thanks
    S.Satheesh Kumar

    Audio on the timeline, especially stream, tends to play very reliably. Is this project under any NDA or can you provide a FLA to examine? Let me know if you want to private message it and I'll shoot you a message.
    What version of Flash Player are you targeting and is this AS2 or AS3?

  • Do Not Continue Playing Project ?

    I created a demo in Captivate 2 and have added multiple buttons throughout the project to link files. My problem is that although I've deselected 'Continue Playing Project' the project does continue with every single button. I want the project to pause while other windows are open or until the viewer unpauses. Any idea what I am doing wrong?
    Thanks

    Hi there
    Does this happen on ALL PCs where you play the project or just a few? If just a few, check the Flash Player version. Perhaps it needs to be upgraded.
    If it happens on ALL PCs, it's possible that one, two or the complete project is corrupt.
    If I were in your shoes, I might test by creating a simple 3 slide project with Buttons. Just to ensure it works. If you see the same behavior, the PC or Captivate is suspect. If it works, the project is suspect.
    Where is the project when you are editing it? On your C drive or on a network drive? If on a network drive, close it and move it to your C drive. At least while editing. Editing projects while they are stored on a network drive is the cause for lots of issues. It's fine to keep a backup copy on a network drive. You just don't want to open one up and edit it while it's there.
    Hopefully something here was helpful... Rick
    Click here for Adobe Certified Captivate and RoboHelp HTML Training
    Click here for the SorcerStone Blog
    Click here for RoboHelp and Captivate eBooks

  • Can I pause my project when the user clicks?

    Hello all,
    I am working on a project using Cp4.
    My project plays automatically without user interaction.
    I need project to be paused when the user clicks on a clickbox at run time & it should play when the user again clicks the same clickbox.
    I can pause the project by adding a clickbox and applying the property "pause the project until user clicks.
    But it must be a user wish interaction whether to pause or play.
    Is that possible ? How could I make my work done ?
    Regards,
    Kartik.P

    Hello,
    I tried it out and it works all right. If you do not want a button, you can also replace this by a click box (that is invisible), perhaps covering up the whole slide and instruct the user just to click on the slide to pause or to 'un'-pause.
    As for the construction of the Advanced action (do have a couple of tutorials, but they are for CP5):
    Open the dialog box from Project Actions
    Be sure to be on the tab Advanced Actions and choose Create a new action from the dropdown list
    Name the action
    Double click on the first statement, it has to become red
    Use the spacebar to open a list, and choose Assignment
    From the first dropdownlist choose Variable rdcmndPause
    From the second list (after the =) choose Value
    Type in 1 for the value
    From the third list choose the minus sign
    From the fourth, choose again Variable and from the list choose rdcmndPause
    Save the action
    It is a bit clumsy, but the result should look like this:
    Lilybiri

  • Pausing a Project

    I am new to Captivate and am using Captivate 5. I'm doing pretty well so far but have found myself stuck. I've inserted a button which links to a URL. Is there a way to pause my project so the viewer can look at the link? When I play my project it all works great but when when I click on the button and the view the page the project keeps playing thus a viewer is going to miss pages if they spend too much time viewing the link. Am I missing something?
    I've tried a click box around the page but haven't been succesful in getting that to work properly in conjunction with a button on the page.
    Thanks!

    Hello and welcome to the forum,
    Open the small button next to the URL-field, if you choose the window New, you can deactivate the option 'Continue Playing the Project'. Here is a screenshot, but this option is here not deactivated. Same if you choose Parent or Top for Window. If you choose Current, it will be automatically deactivated since the URL will be opened in the same window.
    Lilybiri

  • Captivate 4 - Advanced Actions - Pause/Play buttons

    Hi - So I have created a 2 buttons - a pause and play - so my users can pause/play my captivate video (audio and actual slide). I have created my 2 variables for the buttons and I have created my advanced action. I'm assigning my pause to 'rdcmndPause', hide pause, show play. And I'm assigning play to 'rdcmndResume', hide play, show pause. It's not working. The pause/play buttons appear and disappear like they should - but my project isn't pausing or playing. Any thoughts?

    You can create and use Widgets for Adobe Captivate 4 in AS2 as well Mike.
    If you go to your Captivate Installation directory and find the "Gallery" folder and "Widgets" then you should be able to find some AS2 Widget Source files. Take a look at the "Flash Button" widget. This is a relatively simple widget and you can basically just use the code framework to make your own button widget.
    If your end users have low-end systems then it's probably safer to stay with AS2 and publish towards Flash Player 8.
    /Michael
    Visit my Captivate blog with tips & tricks, tutorials and Widgets.

  • ITunes missing pause/play/ / buttons

    For the past month (I believe sometime around the time I updated itunes to iTunes 11) I have been missing the section on my iTunes window that has the pause, play, >>, and << buttons and shows the status of the song (time wise).  I am also missing the red, yellow, and green buttons on the upper left hand side and I am unable to click and drag the window around at all.  I have googled this problem for hours and come up with nothing.  Hoping someone here can help because for a long time the only way to stop a song from playing once it started was the quit iTunes.  Now, just today I figured out that I can open the miniplayer on top of my iTunes window and that is better than having to close out of iTunes altogether, but I'd still like the features that are in the miniplayer to be available to me on my screen all the time like they always were in the past.

    Hello 3isenuf,
    Thanks for using Apple Support Communities.
    I'd like you to please reinstall iTunes by following the steps below.
    Download the latest installer
    Open Safari or another web browser.
    Go to the iTunes download webpage and click the Free Download button.
    Make sure that the Mac OS X version is selected on that page.
    Click the Download button to start the download.
    Once the file is downloaded, a new Finder window appears containing two items (below). If a Finder window doesn't appear, locate the iTunesX.dmg file (where X is the iTunes version number) on the desktop (or wherever your downloads go) and double-click it to display these items:
    A "Read Before You Install iTunes" file. This document contains the system requirements for the version of iTunes, and may contain other useful information about installing.
    An iTunes.mpkg file (this is the installer file itself)
    Install iTunes
    Quit iTunes if it is currently open.
    Double-click the iTunes.mpkg file. This opens the Installer application in Mac OS X.
    Follow the instructions in the installer screens. If all of the installation components appear unchecked and dimmed (unavailable, and therefore not installable), refer to Mac OS X iTunes installer components are disabled.
    After the installation has completed, quit the Installer and restart the computer. The new version of iTunes appears on your hard disk in your Applications folder.
    Opening iTunes
    It's possible that clicking the iTunes icon in your Dock or double-clicking an iTunes icon on your desktop could open an older version of iTunes. Open iTunes from the Applications folder to be sure you are opening the right version:
    Double-click your hard disk.
    Double-click the Applications folder.
    Double-click the iTunes icon.
    If you notice another copy of iTunes in the Dock after following these steps, here's a way to take care of that:
    Quit iTunes.
    Drag the iTunes icon out of the Dock.
    Drag the iTunes icon from the Applications folder to the Dock.
    Troubleshooting iTunes installation on Mac OS X
    http://support.apple.com/kb/HT2311
    Take care,
    Alex H.

  • IPhone does not work with IPOD Dock to select next song / pause - play

    After using the iPhone at the gym, the IPhone quit working using the remote for the Docking station to navigate to next song nor pause / play. Suspect Iphone connector....
    Also the iMuffs Headset bluetooth adapter that plugged into the iphone connector quit working. Tested iMuffs bluetooth connector on another iPhone and is still functioning.
    any ideas?? clean connector?? short?? service??
    Note, the iPhone still syncs with iMac via docking port (USB). So the connector is not totally bad.
    Message was edited by: java_boy
    Message was edited by: java_boy
    Message was edited by: java_boy

    Have you tried a reset...and if that doesn't work ..a restore? Back up your phone before you restore.

  • Photos slideshow pause/play button not displaying in 3.0

    I've been running 3.0 on my first generation Touch for several months. Throughout, I've noticed that the Photos slideshow lower-center pause/play button no longer displays once I've paused a slideshow. While the left/right arrows show and I am able to advance photos one at a time, I am unable to re-engage the slideshow.
    In software versions 1 and 2, one could freely pause and play a running slideshow. Now, when I pause the slideshow, I'm forced to bail out of the slideshow and start a new one.
    A longtime Touch owner, I'm not certain if my problem is a 3.0 software glitch or things have changed. Has anyone else encountered the issue?

    Hi,
    look here: http://discussions.apple.com/message.jspa?messageID=9843694#9843694
    I hope Apple will fix this and some other Bugs in their 3.0.1 Update which will hopefully appears in a few days.

  • Javascript doesn't play() embedded sound

    This is a question about the PDF specification regarding how to use the javascript API
    to play a sound object.
    Specifically, why in my basic example is the javascript able to see the sound,
    but can't play() it?
    I have a test PDF illustrating my problem at
    http://www.affexion.net/test/PDF/test-scriptsound.pdf
    This is a stripped down example.
    The sound is referenced from a simple annotation
    on the left. Double-clicking it plays the sound as expected.
    On the right is a button which when activated is supposed to
    execute a javascript.
    << /S /JavaScript /JS ( console.show(); try {this.sounds[0].play(); } catch(e) { console.println(e.toString()); } console.println(this.sounds[0].name); ) >>
    I see the console open up, and I see it print the name of the sound "mySound",
    but I don't get the sound played.
    Do I need to do something in my javascript before I call this.sounds[0].play?
    Is there some other mistake in the way I have the sound object embedded and referenced?
    Thanks very much for any help.

    In followup, I have been able to accomplish what I wanted:
    use an embedded javascript to play an embedded sound
    For future readers, my example is (temporarily) at:
    http://www.affexion.net/test/PDF/sound-by-script.pddf
    How I did it:
    interaction of 2 components, the script and the (named) sound
    The script object looks like:
    << /S /JavaScript
    /JS ( console.show\(\); var s=this.getSound\("mySound"\); s.play\(\); )
    >>
    The named sound "mySound"
    The catalog needs an entry pointing to a name dictionary, like:
    1 0 obj << /Type /Catalog /Names XX 0 R >> endobj
    The name dictionary has an entry /Sound like
    XX 0 obj << /Sound XY 0 R >> endobj
    Then the actual name mapping:
    XY 0 obj << /Names [ (0xFEFFmySound) XZ 0 R ] >> endobj
    With the sound object at:
    XZ 0 obj << /Type /Sound /Length NNNNN >> stream...endstream endobj
    Key point: the string object (0xFEFFmySound) needs to be unicode-16 encoded
    with the first 2 bytes being FEFF.
    That was a real pitfall for me.
    Now that whole setup actually works.
    Sadly, though - I looked all through the PDF specification and
    in section 7.7.4 Name Dictionary, I don't see any Sound key.
    If anyone could explain how that sequence of Name dictionary to
    sound name is described in the specification, I'd appreciate it.

  • Pause/Play button on toolbar

    When running a captivate slide show, and using the pause/play
    button on the customisable toolbar, we have noticed that when
    clicked this button does not pause any audio that may be currently
    running on the slide, therefore making the facility partly
    nonsensical. Is this a feature of Captivate 3.0, or is it just me
    not embedding the sound in the correct place????
    Please help.

    Hi Kate,
    My instincts tell me that you are experiencing a change in
    focus, but I'll tell you what I mean, and you can decide if that
    may be the problem. Assuming you are publishing to SWF/HTM output
    ... when your movie starts, what is actually happening is, you are
    opening a HTML document, and the movie (the SWF document) is
    "called" (commanded to open) by that (HTM) document. Therefore,
    when it is first begun, the computer's "focus" is on the HTM, not
    the SWF contained in it.
    Keeping that in mind, the first time you click (an object in
    the movie itself), the Windows operating system must change the
    focus
    from the HTM document
    to the SWF movie, which accounts for the first "click". The
    second time you click, the SWF document makes the correct
    assumption that the "click" is meant to be interpreted as a command
    intended for the object in the SWF movie.
    This behavior may vary, depending on the browser being used,
    and perhaps even the operating system (I'm guessing here, because I
    don't know how Windows Vista might treat the action of clicking in
    a browser window as opposed to the way Windows XP handles the same
    command-action).
    Another possible cause might be the mouse itself, or its
    software. You can check this easily enough, by seeing if the
    failure to function always occurs on the same machine, and if it
    changes when you install a different pointing device. I know from
    personal experience that sometimes I have to click really firmly,
    and sometimes not. I use a battery powered optical mouse, and its
    behavior is subject to change as the batteries get older.
    I don't know if there is any help in my comments ... I
    certainly hope so. Let us know, because sometimes when one member
    "hits a wall" in offering solutions, another member "sees a light"
    and a difficut problem ends up having a simple solution.
    All the best,
    Larry

  • Global HotKey for Pause/Play,Next Song, etc.

    It would be nice to have an Global Hotkey so you can pause/play your music while browsing and not switching between screens. Or when you are gaming and you want another song but you don't want to alt tab and stay idle, a (customizable?)  Global Hotkey(i.g. ctrl+shift+right) would be such an great improvement in the usefulness of Spotify.

    Well, there is a simple solution to your inquiry if you use Mac OSX Lion. I suppose that you, just like me, don't want to cram your toolbar with extra icons and I also suppose that you use an external keyboard that lacks the playpause/next/previous buttons.
    Here's your 5-min solution :)
    Open up the Automator Application (Applications/Automator.app) 
    Create a new document (⌘N) and choose the "Service" type for your document.
    On the "Service receives selected" item in the top side of the window select "no input" from the dropdown.
    Search for "Run Applescript" from the searchbar on the left side of the window.
    Drag the "Run Applescript" item in the main window area.
    Delete the (* Your script goes here *) line and paste this instead:
    tell application "Spotify" to playpause
    Save your script (File > Save or ⌘S) and give it a meaningful name like Spotify PlayPause :D
    Go to System Preferences > Keyboard > Shortcuts and select Services from the left column.
    Scroll down to the General Section and find your Spotify PlayPause item.
    Click the add shortcut button and press the combination of keys that will be your shortcut. (eg. I gave it the ⌃⌘P shortcut).
    Test that it's working by clicking on System Preferences (next to the Apple Logo on top of your screen) > Services > Spotify Play Pause. (Actually this step is necessary for the shortcut to be registered to your system).
    You're done! Your shortcut is now available to you, in whichever program you have open.
    PS. In order to create a next or previous track shortcut, you should follow the above procedure, but on step 6 you input
    tell application "Spotify" to next track
    tell application "Spotify" to previous track
    respectively.
    If you have any questions feel free to ask :)

  • What to do?  Premiere Pro CS5.5 has quit responding and won't play project.  Windows no recognize

    What to do when CS5.5 Premiere Pro does not respond.  Will not play project.  Seems to mess up even going to help.

    John,
    Great links on how to ask for help.  Thank you.    I recently installed a PNY quadro 2000 video card.  Have 24 gigs of ram, Areca Raid Card with Raid 5 with four hard drives in Raid 5, i7 920 cpu not overclocked.  Velociraptor C drive.  Everything seemed to be working fine until I returned to this video today and was to burn another copy on encore.  It did not function right and did not burn.  Went to see what was wrong and the whole thing seems to be acting strange.  I ran two virus checkers and nothing was reported.
    Any suggestions would be appreciated.    Thank you.
    Jeff

  • Toggle pause & play a video in a slide

    Does captivate has function to toggle pause & play a video in a slide using keyboard shortcut?

    If using Slide Video, the Spacebar or F3 key may work.

  • 'Music' displays but won't play. Settings appear correct and iPhone is selected for output.  Startup screen intermittently displays with the lower pause/play volume bar for no clear reason..... developed at the same time as play failure.  Ideas????

    'Music' displays but won't play. Settings appear correct and iPhone (3G)  is selected for output.  Startup screen intermittently displays with the lower pause/play volume bar for no clear reason..... developed at the same time as play failure.  Ideas????

    Thank you for the replies.
    Appearane of 'Music' functions (I>>   > II   <<I,   plus volume slider)  on the lock/log in screen (when first turning on the iPhone) thus far seems without pattern, i.e. regardless of which if any applications are up in the background, and indeed even when all have been quit.
    All visual aspects of 'Music' appear normal after launch including the title scroll across the top in vertical mode. However, while pressing play (>) converts the play (>) icon to pause (II), selected song does not play and the elapsed time bar (upper end between the track count and the repeat/shuffle icons) remains stationary at 0:00 or at any point to which it is dragged.  When using home sharing this same problem persists regardless of what output is selected.
    Hope that may prompt a thought somewhere.

Maybe you are looking for

  • Problem with sending and archiving pdf document

    Hello experts, I have created the following SAP PI scenario: First a pdf document will come from our partner to a specified directory. The ftp adapter sender get this file and also set the filename in the adapter specific messages. Then a udf mapping

  • Duplicate text in an email

    Just upgraded from Curve 8520 to Curve 9360, and I'm a little disappointed at the moment. Firstly, the battery doesn't last half as long, and secondly, its sending duplicate text in an email. eg, is I send an email saying : Hi, how are you?. What it

  • Is it possible to monitor State change of a .CSV file using powershell scripting ?

    Hi All, I just would like to know Is it possible to monitor State change of a .CSV file using powershell scripting ? We have SCOM tool which has that capability but there are some drawbacks in that for which we are not able to utilise that. So i woul

  • Drag and drop very long password from host MacBook to guest iPod Touch?

    Hi, iPod Touch 64GB Software version 3.1.2. MacBook as in signature. When I built my home wireless network, I chose a very long and complex password (63 characters) to protect the access to my network. Once the passphrase was randomly chosen, it was

  • Addin value of one into othar field n display it

    Hai Experts, ihave problem try help me plz, my problem is: i have some fields like A,B,C,D,E.in my ddic table and i designrd a screen with same fields so here i want have values on asex: think E = order value C = gallons and when each i enter a value