FLVPlayback stop/play

Hey, I have a little problem with a FLVPlayback component and the play(), stop() method. Here is the code for my class, videoPlayer is a component FLVPlayback instance on the stage. The table contains videos in the format [videos/s1.flv,videos/s2.flv,videos/s3.flv] when I call the function stopVideo() while the first video always plays it will stop and rewind to frame 1 of the video (works as expected) but then when I call the playVideo() method it does not play the video again. It works when I stop the FLVPlayback instance in its reading of the 2nd or 3rd video. I know that the READY event is not called in the 1st video because it was invoked at the beginning. What I am doing wrong?

public class Intro extends MovieClip {
                    private var intros:XML;
                    private var currentVideo:uint = 0;
                    private var _data:XML;
                    private var videos:Array;
  
                    public function Intro(data:XML) {
                              _data = data;
  
                              videoPlayer.addEventListener(VideoEvent.COMPLETE, completeHandler);
                              videoPlayer.addEventListener(VideoEvent.READY, videoReady);
                              videoPlayer.opaqueBackground = 0x000000;
                              videoPlayer.autoRewind = true;
                    }
  
                    function completeHandler(evt:Event):void {
                              trace("video complete");
                              currentVideo++;


                              if (currentVideo < videos.length) {
                                        videoPlayer.source = videos[currentVideo];
                              } else {
                                        currentVideo = 0;
                              }
                    }
  
                    public function playVideo():void {
                              trace(currentVideo);
                              if (currentVideo == 0) {
                                        trace(videos[currentVideo]);
                                        videoPlayer.play(videos[currentVideo]);
                              } else {
                                        videoPlayer.source = videos[currentVideo];
                              }
                    }
  
                    public function prepareVideos(introVideos:XML):void {
                              intros = introVideos;
                              var list:XMLList = intros.entry;
                              var entry:XML;
                              var len:int = list.length();
                              videos = new Array();
  
                              for (var i:int = 0; i < len; i++) {
                                        entry = list[i];
                                        videos.push(entry);
                              }
                              dispatchEvent(new Event(Event.COMPLETE));
                    }
  
                    public function stopVideo():void {
                              if (videoPlayer.playing) {
                                        trace("video stopped");
                                        videoPlayer.stop();
                                        currentVideo = 0;
                              }
                    }
  
                    private function resetVideo(e:VideoEvent):void {
                              videoPlayer.seek(0);
                    }
  
                    private function videoReady(e:VideoEvent):void {
                              trace("video ready");
                              videoPlayer.play();
                    }
          }

you want only to specify how the name in the method of video playback during playback first video.  After that (IE, after applying a stop()) just use the parameterless play() method.

Tags: Adobe Animate

Similar Questions

  • AS3: How an instance of flvplayback stop playing when you leave its frame in the timeline?

    I created a small theatre program and it is working very well, but I cannot for the life of me understand why it works without additional code.

    I have a timeline with frames 5 and last 4 executives have a different instance of an animation flash (flvplayback) in them: all of them charge a different movie as its source and I don't give instance names to one of them.

    To get to one of these frameworks, there are 4 buttons and the eventlistener to click a button calls a function that specifies which image to go to and stop at the.  Since each flvplayback has autoplay set to 'true', the movie starts to play when you enter its framework.  If I click a different button to get a different picture, this first film stops play and the video in the 2nd starts frame.  I have not any actionscript in saying the first movie to stop and I can't find anything in the AS3 reference that suggests that the flvplayback component could work this way.  Why didn't I tell an flvplayback instance programmatically to stop when I'm out of its frame in the timeline?

    Thank you

    Sean

    If you leave its framework there are more.  But from other postings I've seen, people most often ask why he always plays because they can hear the continuous sound even if they left the frame.  I think in your case what could have to do with you based on components in the adjacent blocks, such that you essentially load a new source in the player.  There is an anomaly MNI Flash where if you place instances of the same object in adjacent frames, the latter inherits the properties of the former, essentially becoming it.  Then you fall into this scenario where essentially the same player is told to change what he is playing.  You could try to stagger the instances with empty frames between and see whether you get similar results.

  • Videos YouTube has stopped playing on V 37.0

    Running Firefox on Windows 7-64 bit 37.0. All the updates update. Flash is 17,0,0,134 and removes from the Adobe site.

    This afternoon of YouTube videos stopped playing. In the center of the image are circling points. The video seems to have loaded, as I can move the time slider and see images at different times, I'm not, just gives the circling 'loading' points. YouTube works fine in IE. Foxfire, if I go to other sites, such as news and videos/commercials play very well.

    I have disabled all add-ons, game Shockwave & Flash "always enable" and always YouTube videos will not play. Seem to download, simply cannot play.

    Thanks in advance for any help.

    Please also consider an add on for a work around to change HTML5 by default, however this should be fixed in the version of 37.0.1 are you still see this issue?

  • iPod stopped playing in the middle of a song. The screen still shows the song. None of the buttons work. Cannot close the iPod is facing down. How can I fix it?

    my iPod, the generation classic 32 GB, stopped playing in the middle of a song. The screen is stuck on this song. None of the buttons work.  I can't stop the iPod.  How can I fix it?

    Hi, lesliefromhowell!

    Thank you for reaching out by Apple Support communities. After reading your post, I understand that your iPod Classic does not. I count on my iPod for music on the go and want to make sure that you can use your own without problem!

    Relying on the buttons have not helped get the iPod to start playing or to restart, please follow the steps outlined in the article below to reset your iPod.

    Learn how to reset your iPod

    You'll want to use the instructions under the "iPod, iPod (scroll wheel), iPod (touch wheel), and iPod (dock connector)" section. These instructions are the following:

    iPod, iPod (scroll wheel), iPod (touch wheel), and iPod (dock connector)

    To reset your iPod, follow these steps:

    1. Slide the Hold switch to the locked position and then come back!
    2. Hold down Menu and Play/Pause all buttons until you see the logo Apple/iPod (about 6-8 seconds). You may need to repeat this step.

    If you can always reset your iPod, follow these steps:

    1. Connect your iPod to a power adapter and plug the adapter into a power outlet.
      You can also connect your iPod to your computer. Make sure that the computer is on and that it is not set to go to sleep.
    2. Try resetting your iPod again.

    Good listening!

  • Since the update of music every time ITunes 12.4.1.6 stop playing

    I've just updated 12.4.1.6 ITunes and ITunes whenever stop playing my music, it is not longer possible to listen to a full song, it stops

    It sometimes stops playing after a few seconds or minutes of 1 to 4, when sometimes when I work in another application or even if I don't do anything else on the computer.

  • videos stopped playing

    cannot view photos from Webshots Pro shots weekly
    stop playing YouTube videos
    sytycd videos do not play
    they all play very well IE

    Hi dancehappy, see:

    11.3 Flash does not load video in Firefox

    11.3 Flash crashes

    Your best solution is to downgrade to Flash 10.3, until Adobe released an update to Flash.

    Thank you

  • Video has stopped playing and has not saved after alert imessage

    During video recording on my iPad, I received an alert from iMessage.  The video has stopped playing and did not save what has been already registered.

    Is this a normal behavior or y at - it a setting I can change to block all alerts being recorded?

    Thanks in advance.

    Hi sabfa,

    If you do not want to be interrupted when you save the video on your iPad, try to activate do not disturb.

    Use of do not disturb on your iPhone, iPad or iPod touch

    Turn on or off the do not disturb

    When do not disturb is activated, a Crescent Moon , or half-moon, an icon will appear in the status bar. There are two ways to turn on or off the do not disturb:

    • Tap Settings > do not disturb. Choose the manual option to activate the do not disturb sign now or set a schedule.
    • Swipe up from the bottom of the screen to open the Control Center. Tap on the Crescent Moon.

    Change your settings

    You can also choose if you want to be disturbed:

    • Allow calls to: allow calls from anyone, person, your Favorites or stored on your device or your iCloud account specific contact groups.
    • The calls repeated: If someone calls you twice within three minutes, the call will not be silent.
    • Silence: select silencing calls and notifications always or only when the device is locked.

    Take care

  • CD/DVD drive has stopped playing or only records

    I've only had this laptop a month and the player stopped play or record anything someone at - it a response for this

    Answer to? When you ask such a question to the best technician I think may not give you the right answer without check your machine and see what can be wrong with that.

    Sorry, but after reading this description of the problem in one sentence I would say just bring it to the service.

    If you want to have serious discussions here rent let us know which model of laptop you have.
    Did you test?
    Have you tried to clean the lens?

    You can use disk bootable? No matter what?

  • Podcasts App suddenly stops playing

    Since the last major release of Podcsasts I was struggeling with her. Fortunetely some of its bugs have been fixed. Unfortunately for the most annoying bugs have not. Maybe I'm wrong with my opinion, but I really think that the main purpose of the application of Podcasts is to read podcasts, right? So why does he completely suddenly stop playing podcasts? the only thing that can be done is then open the app manually and click the comparable play hidden button and continue playing. The whole OS would not react on something else if you do not do this. It makes no sense to me and as I got this question all the time. My 4S on children 5 years to my at the 6ers, I'm not very confident to get afix it all soon.

    Another thing that probably his thad SDO is the sort that just make no sense for me. Most of the podacsts I listen to are programs that don't have not not be relistened to. I don't listen to anyone that I have when I have the time. However, the sort makes me always listen first to the most recent and not to the groin. I could easily live with this design error that I'm the only one in the world who uses Podcasts in this way (but I doubt at the same time). What makes me mad at her, is that playing the last podcast of this list, which is from my point of view on the other I need to listen to, will not jump to the next podcast when that is finished but just stops playing the list as if there where no more podcasts. But it is a. lot.

    Especially the two named bugs make a pain using podcasts. To be honest, it feels like not on the app developers use the application for more than to play half of the first test podcast they use. In addition, this behavior was intrduced with the new Podcasts app. The old version which has been replaced by a new version of IOS have the means to play the oldest to newest. and he was reliable playing. Compered to the old, the new version will be as of the first prototypes. It would have been okay, if the application would have improved over time. Maybe he has. I can only see it. I consider bugs because these great so they need to be fixed first to improve acceptance and satisfaction.

    Are there plans to fix these bugs or any tips that would help me to bypass?

    @mgollmick, I have no solutions to your questions but I wanted to add on your frustration about the application of Podcasts.  I started regularly using the Podcast app 6 months ago, and it has always been glitch in a multitude of ways:

    1. when I select a podcast, it won't often begin play immediately, regardless of whether I'm listening to a podcast already downloaded or via wifi.  Sometimes it will take 30 seconds to 1 minute before the podcast begins to play.  At other times, he won't play at all, and I have to close the app and re - manually open it (sometimes several times) until I can play a podcast.  I noticed that I do not suffer the same problem during access to downloaded podcasts offline (for example, during a hike).  This leads to believe that it is a problem of wifi, but I never experience lag issues when you access a music video Youtube or iCloud on my iPhone.

    2. when the list of "Unplayed Épisodes", I'm often impossible to remove (or there is a significant shift to delete) of podcast episodes in which I'm not interested.  I drag an individual podcast episode or click the 'Edit' button to remove podcast episodes, but more often that otherwise, I am unable to do.  Once again, I have to close the application and reopen it manually a couple of times before that I can delete episodes.

    3. the application of Podcast will often suddenly crash within 30 seconds of play an episode.   Sometimes it will crash after playing for an hour, even if I do not have set the sleep timer.   I have to open the app manually and click the 'Play '.

    4. There is often a long latency when trying manually updated list of "Unplayed Episodes.  Why I immediately see new videos for subscribed Youtube channels so I manually update the Youtube app, but it takes a minute or more to see a current list of new episodes of the podcast through Apple app?

    5. the iOS app also does not sync with iTunes on my Macbook or iMac:

    (a) iTunes does not reflect my order of podcasts that appear in "My Podcasts" on iOS.  I have manually re-ordered podcasts on iOS so that I can quickly access my favorite podcasts, but this reorganization does not appear in iTunes even after that I have to sync my phone with my iMac.  In addition, the left column of iTunes (with photos of each subscribed podcast nail) does not list podcast subscriptions in order alphabetical or any other rational means of organization.  It takes time to find a specific podcast under "My Podcasts) to access the episodes.  Why no iCloud synchronize?

    (b) "Unplayed Épisodes" iTunes version does not reflect the most recent episodes that appear on the Podcast app on my phone.   iTunes is about 24 hours of delay in the updates, and when I try to update iTunes manually, it does not work.  Also, I get a message that iTunes stopped updating a podcast special because I have not listened episodes recently.  Why iTunes does not recognize that I regularly listen to this podcast especially through the iOS app? Why this information is not automatically synchronize iTunes via iCloud?

    I've always been a fan of Apple products, and I understand when there are software problems from time to time, but to have so many important issues that impact, use of an application is beyond frustrating.   I understand now better Walt Mossberg recent Re / Code article criticizing Apple for not fixing not important issues with their own applications.  Although his article does not mention issues with Podcasts app, its purpose is also applicable.

    A very frustrated iPhone user.

    iPhone 6, iOS 9.2.1

  • Apple music stops after playing a song! I use windows 10 and the new itunes. He stops playing after one, sometimes two song... radio too... Please help. I installed and all new authorized...

    Apple music stops after playing a song!

    I use windows 10 and the latest itunes on my laptop. He stops playing after one, sometimes two songs... radio too... Please help.

    I installed and all new authorized...

    Thank you...

    Markus

    same thing here for all my Mac or PC windows... they are "working" 8 months later... unreal

  • My laptop HP Pavilion g7 stopped playing videos online

    After installing Microsoft updates, my HP Pavilion Notebook PC (Windows 7 Professional, 64-bit) g7 stopped playing videos.

    If I try to play a video on YouTube, the following error message appears: an error has occurred. Please try again later.  If I try to play a video on another site, nothing happens.

    I tried a system restore and regained the ability to watch videos - until I installed updates.  (Try the system restore worked a couple of times, but not more).  Now, there is no system restore points which act to restore the ability to watch videos online.  (I can still watch videos that are saved on my hard drive).

    Any suggestions?  Thank you!

    Hi David,

    I bet you would be absolutely HORRIFIED by what I don't know such things.  (Thanks for the reminder.  I use IE as a 'Back-Up' in the future.

    In addition to my ignorance, I have another excuse for you: I've been wasting your time.

    It turns out that, once that you helped me to understand that the problem was with Firefox, I have learned that others have had the same problem.

    In the case where another computer challenged inquirer has this problem, here is the solution that worked for me:

    If RealPlayer is installed, try this first
    Disable Internet download registration & RealPlayer

    Launch RealPlayer
    Click on the RealPlayer icon in the upper left of the window and choose Preferences.
    Download & recording, choose the left panel
    Uncheck the box "Enable Web download & recording for these browsers installed"
    Click OK and close RealPlayer
    Restart Firefox

    This will remove the extension of the registration of the RealPlayer browser from the Firefox Add-ons Manager.
    Tip: As an alternative to the extension of the RealPlayer browser record, you can try the Easy YouTube Video Downloader or one of the other amazing Firefox Add-ons.

    Thank you for your time and help!  Bravo!  Problem solved!

    Bert

  • Media Player 9.0 has stopped playing DVDs

    Windows XP Media Player 9 has stopped playing all commercial DVDs with message about multimedia digital protected.

    Restore the system back a month when it played DVD and by removing all updates Media Player does not help, same message.

    Tips on how to restore playback of DVD?

    Thank you

    aquaries

    The WMP for DVD is correct. You need a DVD encoder (software)

    This gives you digital rights to read the DVD. ATI video cards has a free, NVIDIA

    fees for it, or go online for others...

  • Hello everyone my CD Rom has stopped playing DVDs but plays the audio CD and CD-ROM. I tried to uninstall it without result. The box pop up for media player does not appear when I insert any kind of CD.

    Hello everyone my CD Rom has stopped playing DVDs but plays the audio CD and CD-ROM. I tried to uninstall it without result. The box pop up for media player does not appear when I insert any kind of CD.

    Hello
    Try this:
    http://support.Microsoft.com/kb/306318
    b Eddie

  • Windows Media Player has stopped playing and ripping of CD

    My Windows Media Player 11 has stopped playing and ripping of CD. I insert the CD, you are prompted to rip, but sometimes even before the CD auto-éjecte without playing or tear. XP OPERATING SYSTEM. Do you want?

    The following links may be worth a visit:

    (982116) your CD or DVD drive is missing
    or is not recognized by Windows or other programs
    http://support.Microsoft.com/kb/982116
    (Windows XP / Windows Vista / Windows 7)

    Your CD or DVD drive cannot read or write media
    http://support.Microsoft.com/GP/cd_dvd_drive_problems

    It is possible that your optical drive needs some maintenance or replacement.

  • WMP11 stop playing about streaming movies a minute

    Hello

    My friend and I have a problem with WMP11 (Windows Media Player11). WMP stops playing streaming movies a minute with the use of the UC fall almost to ZERO. But he continues to receive data streaming, bandwidth which is 1 MB/s. I have confirmed with the Windows performance monitor.

    My PC has no such problems but PC my friend with Windows XP SP3 and IE8 WMP11. I tried to reproduce the problem. My virtual machine on Microsoft Virtual PC with Windows XP SP3 and IE8 WMP11 could not reproduce. Another virtual machine on VMware Player that has been converted from old machine managed to reproduce the problem. The problem of PC can play movies in streaming, but cannot play other.

    Stop security such as Windows or Symantec firewall software. acceralater changed settings in WMP. But nothing has changed.

    I downloaded and installed the codec pack, but nothing has changed.

    http://www.free-codecs.com/download/K_lite_codec_pack.htm

    Is there anyone who use WMP on vmware player 3.x to play streaming movies? What can I do?

    Thank you.

    ken1tokyo.

    Hello

    You can try to change the buffering settings and check if this helps solve the problem. To change the settings follow the steps below.

    (a) open Windows Media Player

    (b) go to the Tools menu and select Options

    (c) go to the performance tab

    (d) under network buffering select buffer and change the number and check if that helps.

    (e) also try to change the connection speed manually tab connection, on the same page.

    Now, check if that helps.

    Hope this information is useful.

    Amrita M

    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • Montserrat Police not print or export

    Hello I try to print a presentation using the font of Montserrat. It is able to display in Keynote, but will not print or export to another program. I thought export to PDF and then just print those. However, the pages appear just white. Unfortunatel

  • X 1 carbon Touch: expandable 3 G?

    Hello I have ThinkPad X 1 carbon Touch with Ericsson H5321 gw 3 module G. is it possible to improve it to the 4G module. I live in European Union (Finland). Comment to Moderator: Shared again post thread in the appropriate forum. The topic is edited

  • Tablet does not load

    My HP Slate 8 will not take a charge.  Load icon appears when I connect to a power source, but the unit does not start.  When I disconnect the power source, the empty battery icon appears briefly.

  • taskbar does not display the open programs

    Usually, when I reduce programs like Mozilla Firefox it shows me the icon in the taskbar on the bottom. However, recently, in doing so, it stopped and when I reduce my internet browser it seems to disappear. I really want to know how to get my taskba

  • Scanner not recognized by Mac os10.9

    The scanner on my OfficeJet 7500 a is not recognized. I can't scan in the printer, or application preferences. I get the message "cannot open the session. However, I can scan Web page printers using webscan. And I can scan to a memory card printer, b