AS2: Local Connection - Pause and Play Videos

I have two exe's, they are a mock-up of a control system....one is the controler that sends commands through LocalConnection to the other which simply plays video of what would be happening when certain buttons are pushed on the controler. I got it working with this code (with help I got here):
sending_lc = new LocalConnection();
pmvopen1.onRelease = function() {
this._parent.gotoAndStop(3);
trace(this+" clicked");
sending_lc.send("my_lc_as2", "gotoF", 2);
pwvopen1.onRelease = function() {
this._parent.gotoAndStop(6);
trace(this+" clicked");
sending_lc.send("my_lc_as2", "gotoF", 4);
chokeclose4.onRelease = function() {
this._parent.gotoAndStop(25);
trace(this+" clicked");
sending_lc.send("my_lc_as2", "gotoF", 15);
forward1.onRelease = function() {
this._parent.gotoAndStop(3);
trace(this+" clicked");
sending_lc.send("my_lc_as2", "gotoF", 2);
reverse1.onRelease = function() {
this._parent.gotoAndStop(1);
trace(this+" clicked");
sending_lc.send("my_lc_as2", "gotoF", 0);
reset.onRelease = function() {
this._parent.gotoAndStop(1);
trace(this+" clicked");
sending_lc.send("my_lc_as2", "gotoF", 0);
pause1.onRelease = function() {
this._parent.pmvOpen.pause; (parent needs to pause flv movie pmvOpen as well as 2 object movies)
trace(this+" clicked");
sending_lc.send("my_lc_as2", "gotoF", 1); (this need to send a command to pause one flv movie)
What I need to do is add a function to the above code that will pause all flv movies in both the sender and reciever (one flv movie each) and pause all object movies on the sender when the pause1 button is pressed.
The parent needs to pause 1 flv movie and 2 object movies and I need to SEND a command to the other exe to pause one flv movie.
I started the code but, of course, it doesnt work...the button is active as I get a trace...My attempt to start this is in red at the end of the code above. 'pmvOpen' is the name of the flv movie on the parent and I don't know HOW to begin pausing the other movie called 'pmvOpen1' through LocalConnection or to pause the 2 object movies called 'Chart1' and 'Chart2' on the sender.
on(press)
chart1.stop();
on(press)
chart2.stop();
on(press)
pmvOpen.pause();
^^ this is how I had it doing the pause before the requirement to have a second screen. This was simply attached to the pause button...I still need to pause all of the above but also I need to pause a movie through local connection at the same time.
This is my last step before I finish and if I can get help on the pause I think I can do the play button without any additional help. Just not sure where to start with this.
Thanks

I forgot about the recieving end code.
so my controler end code would look like this:
pause1.onRelease = function() {
this._parent.pmvOpen.pause();
this._parent.chart1.stop();
this._parent.chart2.stop();
  trace(this+" clicked");
sending_lc.send("my_lc_as2", "pauseF");
My recieving code as it is right now is:
receiving_lc = new LocalConnection();
receiving_lc.gotoF = function(n:Number){
trace("received "+n);
    gotoAndPlay(n);
receiving_lc.connect("my_lc_as2");
This is recieving for my frame forwarding. So I would need to put a new function in this that calls out the video. To call out the video to be controled would it look something like:
receiving_lc = new LocalConnection();
receiving_lc.gotoF = function(n:Number){
trace("received "+n);
    gotoAndPlay(n);
receiving_lc.pauseF = function(pause){
     pmvOpenl.pause(n);
receiving_lc.connect("my_lc_as2");
This seems to work...I will try to do it with another video on another frame and see what happens. Thanks a bunch man. If this works down the line I think I might have this.

Similar Messages

  • Pause and Play Toggling Button

    I have created a Pause and Play button that toggles between states.  It controls a Timeline with synced Sound.  When I use it the sound and animation go out of sync.  Can anyone help me with this or perhaps have better code I could swap out to make this work?
    Below is what I am currently using:
    On the first frame of an Action Script layer put this AS:
    playBtn.onRelease = function() {
    ns.pause(false);
    playBtn._visible = false;
    pauseBtn._visible = true;
    pauseBtn.onRelease = function() {
    ns.pause(true);
    playBtn._visible = true;
    pauseBtn._visible = false;
    Lable a Pause button Graphic "pauseBtn"
    put this AS on the button:
    on (release) {
                gotoAndPlay(_currentframe+1);
    Lable a Play button Graphic "playBtn"
    put this AS on the button:
    on (release) {
                stop();
    Put the Pause and Play buttons directly over each other on 2 layers for the duration of the timeline.
    Pause Button on top. (unless you have a STOP on the first line then maybe the Play button will start it (I didn't Try this)

    you have, what appears to be, conflicting code.  and you appear to be using a netstream instance.  so:
    1.  remove all code attached to objects.  copy and paste the only code you have affecting your pause/play button.
    2.  what is ns?

  • HT204291 When using my iPad and playing videos, I only hear the sound. Why will it not show the video?

    When using my iPad and playing videos, I only hear the sound. Why will it not show the video?  My iPad 2 and iPhone 5 work no issues.

    Hi sheilafrommannford,
    Welcome to the Support Communities!
    The articles below may be able to help you with this issue.
    Click on the links to see more details and screenshots.
    Using AirPlay
    http://support.apple.com/kb/HT4437
    Troubleshooting AirPlay and AirPlay Mirroring
    http://support.apple.com/kb/TS4215
    Cheers,
    Judy

  • I have backed up my iPad  using iTunes to windows 8 Lenora laptop but I could not find my files and play video files  in my laptop.

    I have backed up my iPad  using iTunes to windows 8 Lenora laptop but I could not find my files and play video files  in my laptop

    You cannot access files in the backup on your computer.
    Do you mean that you synced with iTunes and transferred your purchased videos and app documents? If that is what you mean, what videos are you talking about? If they are videos that you took with the iPad, they do not sync to iTunes. What files?
    What exactly are you trying to do? Details please.

  • TS1718 Is anyone else experiencing trouble playing video in itunes?  Video intermittenly pause and plays without audio?  Video used to play fine this problem only started since the last version of itunes, version 7.  Just updated to v. 11 still having sam

    Is anyone else experiencing trouble playing video in itunes?  Video intermittenly pauses and also plays with not audio.  Video used to play fine.  This problem only started since I upgraded to version 7.  I have not used itunes since then because I couldn't watch anything without experiencing these problems.  I was waiting for the next version to come out and hoped it would fix the problems I was having, but no such luck.  I just upgraded to the latest version, version 11 and I'm still having the same problems.  Anyone else having these same issues and if so, any solutions?

    Is anyone else experiencing trouble playing video in itunes?  Video intermittenly pauses and also plays with not audio.  Video used to play fine.  This problem only started since I upgraded to version 7.  I have not used itunes since then because I couldn't watch anything without experiencing these problems.  I was waiting for the next version to come out and hoped it would fix the problems I was having, but no such luck.  I just upgraded to the latest version, version 11 and I'm still having the same problems.  Anyone else having these same issues and if so, any solutions?

  • Pause and play timeline with embedded video

    I have created a banner that is currently being used at  www.bandg.co.uk
    I have been asked if it is possible to add a video to this banner.
    However, the problem I have is with the banner having mlutiple slides.
    What I am looking for is a way of having the timeline pause when the video is clicked on, then for the timeline to continue when the video is paused (basically making the video a start and stop command button).
    Thanks for your help.

    Can anyone help with this??:
    I have created a Keynote presentation for a trade show consisting of slides and some slides with embedded video. How can I set this to play without cutting the video short or stopping at the end of the video?

  • Buffering pauses and audio/video out of sync, single RTMP stream w/ simple embed

    Hello,
    I am running Flash Media Server on my dedicated CentOS host, and finally connected a single RTMP stream fine and am able to embed and play back the stream, but I am getting constant buffering pauses (approx every 5 secs) and audio/video out of sync by at least 5 seconds. My CPU with Flash Live Encoder is a powerhorse, never over 25% processor or ram usage while streaming, and my upload internet speed is averaging 6-8 mbps which should be more than adequate. I fear the issue is server side, however port 1935 is open and in use, not firewalled on CPU nor the host.
    Any suggestions would be great.

    Hello,
    Thanks for the reply, I am using embed code generated with Flash Media Playback, as follows:
    <object width="640" height="480"> <param name="movie" value="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf"></param><param name="flashvars" value="src=rtmpt%3A%2F%2F50.62.40.55%3A1935%2Flive%2Fchristmastime&poster=http%3A%2F%2Fsq uarestream.ca%2Fpics%2Fframe.jpg&autoPlay=true&streamType=live&optimizeInitialIndex=false" ></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="480" flashvars="src=rtmpt%3A%2F%2F50.62.40.55%3A1935%2Flive%2Fchristmastime&poster=http%3A%2F% 2Fsquarestream.ca%2Fpics%2Fframe.jpg&autoPlay=true&streamType=live&optimizeInitialIndex=fa lse"></embed></object>

  • Trouble importing and playing video in Lightroom 5

    I mainly use Lightroom for photos, but I do use it to organize my videos. Lightroom 5.3 on a Macbook Pro running OS 10.9.2.
    Videos from all of our iPhones import and play perfeclty.
    Video from the Nikon D90 will import sometimes, but will rarely play. You can scroll across the preview icon and see the video, but when you click on to play it, it will only play a few seconds of the video but will continue to play the audio.
    I have converted the .avi files to .m4v in order to play in iTunes and Apple TV.  I've tried importing the .m4v files to Lightroom as well but always get an error: "Connecting to dynamic link server failed."
    Not sure what is going on or what I may be doing wrong.  I've successfully imported the videos from the camera to Aperture. Not sure why I can't get Lightroom to work.
    Thanks for any help.

    Exact same problem as well. When I try to import CDs either in iTunes or Windows Media Player I have problems. iTunes will play a track or two, but usually the imports ring in around 755 minutes and change and are corrupt. Windows Media Player has similar issues.
    What's strange is that my drive works just fine for burning DVDs, installing software from disc, or watching DVD movies, so I'm a little in the dark. Any ideas?

  • AS2 open another scene and play a label inside a mc

    I'm looking for a piece of AS2 script that will open a different scene and play a label from inside a mc.
    So it should be something like...
    On release go to scene x and play x label from inside x mc.
    I can get to the scene via the button "on release gotoandplay scene 2 .
    Once in the scene I can get a button to gotoandplay themc.mc and the label.
    But what I really want to do is get the button on one page to go to the scene and play the label on the second scene.
    Any ideas?

    use:
    gotoAndPlay("scene2_frame1");
    this.onEnterFrame=someF;
    function someF(){
    yourmovieclip.gotoAndPlay("some label");
    delete this.onEnterFrame;

  • Why does my music keep pausing and playing on my macbook Pro every time i put my headphones in?

    Everytime i plug my headphones in my music starts playing and pausing, and i don't press the buttons on the headphones or the on mac.

    Your  topic states Macbook Pro yet your system profile confirms you have a Mac Pro which is a desktop computer.  Which one are you having issues with? 
    Which os version are you using? 
    Which app is playing your music? 

  • Computer shuts down when importing CDs and playing video

    When in iTunes, my computer completely shuts off a couple mintues in when trying to import a CD or play video. I have asked around and reinstalled and nothing seems to help. Any ideas! Very frustrating.

    I just started having the same problem. I was able to import songs from 5 cds with no problem, but when I tried a few more my mac started shutting down about halfway through the import of the song. It doesn't matter how many songs I choose to import, it happens on the first one everytime. Did you find a fix for this?

  • How to configure modem and connect internet and play mp3

    Hello friends
    I am using sun solaris 8 intel edition .
    I am using windowsXP,RedHat Linux and Sun Solaris 8 Intel Editon. I am using Internet on windows and linux platform but i cannot find any device configure tool in solaris 8 , So Please tell me how to configure modem and commands for connection internet and It is possible to play mp3 songs on solaris
    Thaking in Advance
    Piyush Patel
    PI Solution

    Look at the manual for pppd. Also take a look at OSS for sound card support (http://www.opensound.com) and xmms for your MP3 audio (http://www.xmms.org)

  • Problems with pausing and playing again

    Whenever I'm listening to a song by The Ramones, then i pause for a second and play it again it skips to the next song. It is only with songs by The Ramones though. If anyone can help please post.

    Ryan,
    Have you tried re-importing the songs from the Ramones? If not I wouldtry that first. Other than that I can only think of restoring the Shuffle. (Making sure that you have the latest version of the iPod shuffle software) Start the iPod updater program, (Without the iPod attatched) insert the iPod and click "Restore". This will wipe your shuffle clean of all music and put it at factory settings but is normaly one of the first thins one tries when troubleshooting.
    <hr>
    Hope this helps, let us know if either of those suggestions works
    -Sam

  • Pause and play

    I have had my iPod shuffle for less than a year. I plug it into my USB port of my mac. and get nothing. it does not update, and it does not charge. When it had battery life (it recently ran out of that), whenever I walked to school with it, or moved around with it on, it would continuously pause and I would have to press play again each time. it would not lose the place in the song, just pause. It did it often, some songs went "pause, play, pause, play" almost immediately. when I could update it, it still did this, and no mattter what songs were on it, it did. How do I fix this issue? is there a way? has anyone else had this problem?
    two-nine-nine

    Hi,
    Have you tried to Restore the iPod shuffle?
    http://docs.info.apple.com/article.html?artnum=300701
    Santo

  • Need HTTPService and play video in flex 4.6 Air Mobile App

    We are porting a flex 3.2 app to mobile app. The 3.2 app uses mx.rpc.http.HTTPService to send XML requests for data and launch video web pages. Will a flex 4.6 Air Mobile app be able to do the same? If so, what replaces mx.rpc.http.HTTPService? I read that mx components will not work in Flex mobile apps.

    HI,
    Its working fine.And the mxml components which are displayobject should not be used in the mobile application except the chart.
    So nothing wrong with using "mx.rpc.http.HTTPService",you can also use  <s:HTTPService/>
    Also there is a nice way to see which components should be used or which not for the mobile application.
    Simply mouse over on the component when you have used it.You can see a message on that if that is not optimized for the mobile application like for the combobox you can see this message:-
    "Adobe discourages using ComboBox when targeting profiles: mobileDevice."
    While this is not the case with <s:HTTPService/>.
    with Regards,
    Shardul

Maybe you are looking for

  • FireWire Import Not Working in iPhoto 6.0.4

    I am trying to import stills on an SD card in my Canon Optura 600 camcorder. I've done this before, but just now iPhoto isn't seeing my camcorder. I've just reset the FireWire port and the camcorder shows up in System Profile and iMovie sees it too.

  • I am getting and error message saying a duplicate file name was specified

    Help I am trying to sync new songs onto my Iphone and keep getting an error message telling me "the iphone can not be synched. a duplicate file name was specified" how can i fix this,

  • Problems after reformatting

    Had problems so Disk Utility said reformat. Saved entire disk to external drive then erased and re installed Mavericks 10.9.5 Now there is no icon for the HD on the desk top so I can't drag any files back from the external drive. Please help

  • Need help with barcode scanning

    Hi All, In my program, when a user scan a barcode, I need the code appear directly on my dynpro screen field and automatically move on to a new screen without the need of user to press Enter or execute. Can this be done? I don't even know how to code

  • Why does FlashPlayer not install in Mac OSX Snow Leopard?

    I've downloaded FlashPlayer for Mac OS, and the entire install process is completed successfully. But I do not have FlashPlayer capability, and I cannot find FlashPlayer on my hard drive. I've downloaded all of the recent updates for Mac OSX Snow Leo