Pay/pause during video play

i wrote this code for video play/pause through SPACE key
play/pause is fine. But not visible play_button when i press SPACE key.
how to write that ?
stage.addEventListener(KeyboardEvent.KEY_DOWN, pausePress);
function pausePress(e:KeyboardEvent):void{
if (e.keyCode == 32){
          ns.togglePause();

This is working but some issus again.
not working correctly & buttons visibility sometimes wrong here
function playClick(e:MouseEvent):void
          if (Playing)
                    ns.play(videoPath);
                    Playing = false;
          else
                    ns.resume();
          VideoControls.playBtn.visible = false;
          VideoControls.pauseBtn.visible = true;
          midPlay.visible = false;
function pauseClick(e:MouseEvent):void
          ns.pause();
          VideoControls.playBtn.visible = true;
          VideoControls.pauseBtn.visible = false;
          midPlay.visible = true;
stage.addEventListener(KeyboardEvent.KEY_DOWN, pausePress);
var toggle:Boolean;
function pausePress(e:KeyboardEvent):void
          if (e.keyCode == 32)
                    ns.togglePause();
if (! toggle)
                              midPlay.visible = true;
                              VideoControls.playBtn.visible = true;
                              VideoControls.pauseBtn.visible = false;
                    else
                              midPlay.visible = false;
                              VideoControls.playBtn.visible = false;
                              VideoControls.pauseBtn.visible = true;
                    toggle = ! toggle;
function midPlayClick(e:MouseEvent):void
          if (Playing)
                    ns.play(videoPath);
                    Playing = false;
          else
                    ns.resume();
          VideoControls.playBtn.visible = false;
          VideoControls.pauseBtn.visible = true;
          midPlay.visible = false;

Similar Messages

  • Why does my Flash Player keep freezing during video play back?

    I have the very lastest version for Windows 7 64bit OS and it keeps freezing during video play back.  The previous versions did not do this. I have to keep the cursor moving inside the video window to prevent the player freezing.  I have deslected HARDWARE ACCELERATION and it does not help.  Why is this happening and how do I correct this situation?

    Right click ANY Flash content and choose "Setings".
    Click the folder icon (center tab) and increase the storage to at least 10Mb.

  • Front Row pauses during DVD play

    I've played at least 5 (3 of which were brand new) different DVD's in Front Row that randomly pause during play. After a few seconds the movie continues to play. I took the computer into the store to have the optical drive replaced, but it keeps happening. I tried just using DVD player and the same thing happens. Since the drive has been replaced, now I get "skipping over damaged area" when it pauses (only in DVD player). These are BRAND NEW dvds, there's no way they can be damaged already. Any ideas, suggestions, anything???

    That's interesting. Since it doesn't seem to be a hardware problem, you might use the Accounts System Preferences to create a brand new user. Log out and log in as the new user. Does the DVD Player application give you the same trouble when logged in as the new user? If not, then a preference or setting your original user has must be interfering. Or some kind of preference file corruption. If the new user does have the same trouble, it might be time to run the Disk Utility and make sure your permissions are repaired and the disk is repaired. If that still doesn't help, it may be time to do an "archive and install" of Mac OS X to get a good copy of the DVD Player application back...
    -Doug

  • Sound stop playing during video playing on ipad 1 with ios 5.1.1

    after updating my ipad 1 to ios 5.11 the sound on my ipad sometimes stops suddenly. it happens during video playback, music listening or just text typing on keyboard.
    i ve tried all the advices seen on communities and no one worked for me (restore the system, change the lock screen button configuration, clean the headphone input, test with apple headphones...)
    please help me to find a solution and thank you for your help.
    another information : when sound stop playing, sometimes when i lock the ipad, a strange noise comes from the speakers like a larsen.

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased.
     Cheers, Tom

  • How to add a background music pause during video

    If I have my video imported, and have added a song for the background music, how do I add a pause to the audio but keep the movie going. There is two pieces of audio, the song and the video audio. I want to pause the background music so that the video audio plays (someone is talking) and then the music comes back in after the talking is done.
    Thanks a ton!

    Have you looked at Document -> Add watermarks & background... ?
    If you want to do it automatically, it's possible to set this up using the batch processing command, same thing, the command is "Add watermarks & background".
    It's probably possible using JavaScript as well, but, there's really no need if the "add watermarks and background" works for you.

  • Pause during video

    How do I pause between shots to have one continuous video?  How do I connect separate videos to make one longer video?
    Solved!
    Go to Solution.

    Thank you for your post and welcome to the forums.
    Please include a Sony camera model and Sony software and any other information pertaining to your question so it can be answered correctly.

  • Apple TV loosing Audio during Video play avery 30 minutes

    My Apple TV looses audio about every 30 minutes only during movies. solution for me, stop play, go back, restart movie where I left off and it works again for 30 minutes. I have the latest software. Thanks for any suggestions that could solve this problem.

    Hi wernerbeermann,
    If you are having issues with the audio playback of your Apple TV I would suggest going through the steps in this article to troubleshoot -
    Apple TV (2nd and 3rd generation): Troubleshooting audio issues
    http://support.apple.com/kb/TS5150
    Thanks for using Apple Support Communities.
    Best,
    Brett L

  • No audio during video play

    So, my little sister got her iPod, and when she listens to music the audio is completely fine, but when she plays videos on it, there is absolutely no audio. Does anybody know why this is? More importantly, how do I fix it?
    Thank you very much!

    Quicktime or Quicktime Pro (which iTunes uses) don't convert "muxed" ( muxed means multiplexed where the audio and video are stored on the same track) video files properly. It only plays the video and not the audio.
    See:iPod plays video but not audio.
    You need a 3rd party converter to convert the file with both audio and video.
    See this for help: Guide to converting video for iPod (Mac/Windows).

  • How do I lower sound file volume during video play?

    I have a Flash CS4 project with sound that starts to play in the first scene, set to event/loop so that it plays all through the entire time.
    But I have a piece of video with audio in another scene and I would like to have the sound file playing at a lower volume while the video is playing, then get it to return to normal volume when the video is over.
    I have no actionscript at this point. Just timeline animations, etc.
    Anyone  have an idea how I could accomplish this?
    Thanks!

    Thank you for this, but unfortunately, I don't think this quite does what I am aiming for.
    1) Now the file is in AS3.
    2) I have one audio file making background music throughout the entire file.
    3) The video comes in at a later scene.
    4) I want to lower the volume of the background music file while the video is playing, then get it to normal volume after the video.
    Thanks for your help.

  • Turning off ipod during video play

    I always experience problems when playing a movie on my 60g Ipod video. I can't turn it off and in fact any use of the centre wheel is extremely slow or sometimes non-responsive....any ideas?

    I have noticed this sometimes when playing a video on mine. I just think that it is because a video is a very big file and requires alot of iPod resources to work. I just be persistent with mine and it takes a couple of times to try and turn it off before it will. I have the Sleep turned on on my main iPod menu and sometimes I have to go all the way back to that menu and select the sleep to turn it off.

  • Sound reduction halfway during video play

    Almost every time I play a video on my iphone, the sound automatically gets reduced a few seconds after the video starts. The sound is reduced back to the minimum volume.
    Is there something wrong with the phone?

    Sorry i'm using an iPhone 5s with the latest iOS 8.1.3. This also happened before this update.

  • Intermittent pauses during video chat

    Hi, so I've been having this problem for a number of months now.
    Whenever i video chat with my wife, the video stream pauses every 15 seconds or so for about 5 seconds. It's not totally consistent, but that's about the timing of it. The funny thing is, I appear fluid and non-pausing on her end, so it's only her side of the stream that pauses on my side.
    We are both on up-to-date versions of tiger, using the same versions of ichat.
    I have a Macbook Pro 2.16ghz core duo.
    She has a ibook g4 1.25 Ghz (I think).
    Anyone had this problem before? I can't figure out if it's a problem on my end or hers. I'm thinking it's hers, but it's kind of hard to say. The video chat on her end is fluid, which makes me think it's something with my system...
    help?

    Hi David,
    Also open the Activity Monitor (Applications/Utilities) and see if you can see any spikes in CPU usage (set the top drop down to All Processes)
    12:09 PM Saturday; January 20, 2007

  • Crashing during video play with iTunes open.

    Within the past week I've noticed multiple crash/freezes.  This has cost me dearly as I went two days without a backup on my iPhone and lost personal data.  Is anyone else having similar problems?  Is there something I'm missing?  Here is the situation:
    I have a 15" Macbook Pro 2.66Ghz Intel Core, 4G 1067 Mhz DDR3.  I've had it for over a year with no hiccups. 
    At least three times in the past week and a half I have had the screen black out and audio skip/repeat with no way of recovering other than a hard boot.  Each instance I've had iTunes open in the background; sometimes playing music, sometimes not.  I've also had Firefox open to Youtube or running a video via Vimeo.  When I use expose' to show all windows, it will crash/freeze.  I could use expose 20/20 times with no problem and then all of a sudden it crashes when I use it the 21st time.  All software on all apps is up to date.  I have two external drives connected.  This has only recently happened within the past week or two.  Any ideas?

    The OS at the bottom is incorrect.  I'm running 10.6.8.   I've tried to duplicate the problem since your last post and haven't noticed anything with activity monitor.  Just backed up everything.......
    On a side note, the itunes library xml was apparently corrupted.  I'm a bit confused.  It attempted to read/reimport my library information and was able to recall/recognize previous playlists and my entire library including videos/podcasts.  But I have NO recovery of iphone backups.  Why?  I tried to restore my iPhone and it defaulted to factory settings without giving the option of choosing a backup, like it thought it was the first time iTunes saw the phone.  How do I go about finding the backups?  Are they gone with the corrupted library file.  I've never had so much trouble with a mac before.....

  • Buffer Problems during video playing

    While I play videos from youtube, that little circle comes up, lasts a few seconds and then video starts to play. It does this continually and I have no idea how to fix it. I have a MBP, 2gb SDRAM; and intel dual. I  have played on different pixal rates and that doesn't seem to make a different.
    any suggests. Thanks.

    Go to System Preferences > Sound > Input tab and move the slider to the right so the Blue bars move to at least 1/2 way when you talk (3/4 is better)
    9:00 PM Thursday; August 21, 2008

  • Samsung TV-HDMI Cable Crackling noise during video play

    I have a Samsung Plasma 50inch. Just connected the HDMI cable and audio/video works great except when they're working at the same time. If I watch any movies/videos, there is a crackling noise coming from the speakers. (If I mute the TV, the crackling noise disappears.) Any suggestions on what I should do? New cable? TV issue? I'm currently using a Belkin HDMI cable.
    Thanks!

    lsam wrote:
    I have a Samsung Plasma 50inch. Just connected the HDMI cable and audio/video works great except when they're working at the same time. If I watch any movies/videos, there is a crackling noise coming from the speakers. (If I mute the TV, the crackling noise disappears.) Any suggestions on what I should do? New cable? TV issue? I'm currently using a Belkin HDMI cable.
    Thanks!
    It could be a problem with the cable box. Connect your cable directly to the TV and see if you still have this problem, if you do call Samsung, if it goes away call your cable company.

Maybe you are looking for

  • Mastering templates logic 9 how to use, how to do mastering

    I somehow got my Logic Pro 9 in a state where there were inserts in masters channel slider and you could try preset masterings. I cannot find that now. I found templates to start with e.g. stereo mastering but have no idea how i get my arrangement th

  • Why do I receive this warning when working with an ArrayList?

    The warning I receive... Note: C:\Documents and Settings\Owner\.netbeans\4.1\Cis320\Lab6\src\scanPorts.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. The code it is reffering to...             //fill the

  • Can we go back to firefox 3.16.10?

    Are you nice people going to be providing us users with a mass fix to windows 7 64 bit machines? If not we need to know so that we can get something better or even worse than firefox 4. Please let us know as firefox keeps not letting us post to faceb

  • My first App now on sale on appStore! Check it out!

    Hi all, very glad to announce that my first app has been approved and is now on sale, please have a look: http://itunes.apple.com/it/app/chordguesser/id407799026?mt=8 bye

  • Exporting MPEG 2

    is there a reason that when I export my sequence in MPEG2(marked from in and out points), it doesn't export as a single file? There is a m2v file and an aif file. Is there a way to export them together? thanks, -Brian