Make video stop video when leaving a frame = problem as not all frames have this video

I know how to make a video (instanced as showreel) stop when clicking on a button that that navigates to another section/frame, since otherwise I would still listen to that video while not visible. The problem is when I'm in another frame that doesn't have that video, when clicking on the menu to go to whichever other frame, it looks for that it to stop if it's playing and it and doesn't find it, and so there's an error.
How can solve this? Maybe I should put an order saying something like if there exists a video in that frame instanced as sowreel, stop it, otherwise don't do anything as there is nothing to be stopped. Or assign the order to the frame (which is called motion), but I don't know how to do that, can someone help? The code I have is:
import fl.video.VideoEvent;
function onClick(evt:MouseEvent):void {
    if( showreel.playing ){
        showreel.stop();}
    gotoAndStop(evt.currentTarget.name);
motion.addEventListener(MouseEvent.CLICK, onClick);
web.addEventListener(MouseEvent.CLICK, onClick);
logo.addEventListener(MouseEvent.CLICK, onClick);
photo.addEventListener(MouseEvent.CLICK, onClick);

all assets, as far as possible, should be removed from the display list and readied for gc when no longer in use.  that includes flvplayback instances.
and yes, when you return to a frame or situation where you create an flvplayback instance, it will be created.  the removedfromstage event doesn't do anything except detect when something is removed from the stage:
flv.addEventListener(Event.REMOVED_FROM_STAGE,f);
function f(e:Event){
flv.stop();
that's it.
for a typical beginner to intermediate coder, flv will be on one frame of the main timeline.   adding those lines of code will ensure that when you move from a frame that contains flv (and that code), any video playing in flv will be stopped so you won't hear it when you navigate to another frame.

Similar Messages

  • Stop flv when leaving a frame

    i want to stop a video from playing,when leaving a frame
    i tried to use SoundMixer.stopAll(); but it only stops the sound,
    i think my video is still streaming in the background because im starting to notice performance problems when i go back and open the video again
    the website gets very slow.
    please help

    I am sorry, my answer may be too late.
    Anyway, I guess you have to stop streaming by calling close() method.
    Have a look at
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html#include ExamplesSummary
    Then you can call stream.close() to stop it.
    Or if you have a flvPlayBack component on stage then you have to call stop() on that.
    For an example, if flvPlayBack component on stage has been named as "myVideoObj" then you have to call myVideoObj.stop();
    Also may be you have to set
    myVideoObj.autoPlay = false;
    Good luck
    getnaleen

  • TS3700 I am facing this issues that music stops playing when the display goes...Please help me with this...:)

    I am facing this issues that music stops playing when the display goes...Please help me with this...:)

    Did you see the article linked at the top of this page?
    iPod nano (6th generation): Music stops when display turns off
    B-rock

  • Safari (3.0.4) on Mac OS 10.4.11 has started quitting when viewing news and weather sites - not all sites, not the same sites every time.

    Safari (3.0.4) on Mac OS 10.4.11 has started quitting when viewing news and weather sites - not all sites, not the same sites every day. Help?

    Hi Gary...
    I see you are running v10.4.11 and you have updated Safari but make certain all the system software is up to date by clicking your Apple menu / Software Update.
    If everything is up to date, try resetting Safari from the menu bar.
    Select the top 7 buttons, click Reset.
    Restart your Mac. Launch Safari. Try several of the sites you mentioned.
    has started quitting
    If resetting didn't help, post a crash report.
    If Safari has just crashed, press the Report button on the CrashReporter dialog box to view the crash  information.
    Copy/paste the entire contents of the Crash Reporter window into your reply. If the crash report dialog does not appear or the crash is hard to reproduce, crash logs can be retrieved from the ~/Library/Logs/CrashReporter> folder.

  • I can see all of the thumbnails in my library but when i click on photo it becomes an ! not all photos do this but wondering if there is a fix

    i can see all of the thumbnails in my library but when i click on photo it becomes an ! not all photos do this but wondering if there is a fix

    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    What version of iPhoto do you have? Assuming 09 or later...
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Is it possible to make a normal PDF from a Printer PDF. It's all I have left lost the rest so it's important

    can anybody help?

    Hi Sara,
    No I made a PDF for printing and that's all I have left. But I'd like to make an normal PDF
    Culinaire groet,
    Frans van Meeuwen
    Hoofdredacteur
    [private information removed]
    Deze informatie ontvang je aangezien je reeds contact had met Passion HI magazine, of met een van zijn medewerkers,
    of via deelname aan één of andere wedstrijd die in samenwerking was met Passion Hi magazine.
    Wens je deze informatie niet meer te ontvangen stuur dan een e-mail met de vermelding “uitschrijven”  en we schrappen jouw adres uit onze mailinglijst!
    Het is ten strengste verboden bijgevoegde documenten als PDF's en foto's verder te gebruiken of door te mailen zonder schriftelijke toestemming van Passion HI magazine.
    Op 27 okt. 2014, om 21:24 heeft Sara.Forsberg het volgende geschreven:
    Is it possible to make a normal PDF from a Printer PDF. It's all I have left lost the rest so it's important
    created by Sara.Forsberg in Adobe Acrobat.com Services - View the full discussion
    Hi Frans van Meeuwen,
    Do I understand correctly that you have a printed PDF and want to get it back on your computer as a PDF file? If so, you could scan that document, save it as an image file, then use Acrobat or Adobe PDF Pack to convert the scanned file to PDF.  Some scanning software saves directly to PDF, and if you don't have a scanner, I'm sure you could have it done at a local copy shop.
    I hope that helps.
    Best,
    Sara
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6872502#6872502
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Adobe Acrobat.com Services by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • My podcast keep cutting off every 5 mins when I'm listening to it. Anyone else have this issue or a solution?

    My podcast keep cutting off every 5 mins when I'm listening to it. Anyone else have this issue or a solution?

    try this link:
    https://www.google.com/calendar/iphoneselect
    it worked for me, but i tried to redo it and now it's not working.
    i have friends who have iphone 4 with the ios5 and their additional google calendars are appearing.
    you need to turn off and turn your phone on again or wait overnight for the calendars to appear after using the link.
    good luck!

  • Adobe Reader plugin :This sentence "le fichier ne commence pas par '%PDF-'" appears when I try to open some (not all) PDF files within Firefox (does not happen when I download the file)

    This sentence (in french version) "le fichier ne commence pas par '%PDF-'" appears when I try to open some (not all, mainly bigger than 1Mo) PDF files within Firefox (does not happen when I download the file)

    You mention Thunderbird, has the PDF file been emailed to you? If it has this support page from Adobe may help - http://www.adobe.com/fr/support/toptech/acrobat/319294/

  • If I purchase Iphone 4s from apple store, Can I claim the stuff at "istudio" in my country when it has any problem? Or do I have to buy for the warranty as well?

    If I purchase Iphone 4s from apple store, Can I claim the stuff at "istudio" in my country when it has any problem? Or do I have to buy for the warranty as well? I am deciding between ordering from apple store and buying from the representative.

    Warranty is ONLY valid in the country where the device was originally sold by Apple.
    The ONLY exception is for devices sold in the EU, as warranty and service can be obtained in any EU country.
    The warranty on the iPhone is not International.

  • When log In names are saved and all you have to do is click in the space to get a list of previous log in's. How do you get rid of those previous log in's?

    # Question
    When log In names are saved and all you have to do is click in the space to get a list of previous log in's. How do you get rid of those previous log in's?

    * http://kb.mozillazine.org/Deleting_autocomplete_entries
    Remove saved Password(s): Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"

  • When I sync with my iPad2, not all playlists come from my computer to the ipad - why?

    When I sync with my iPad2, not all playlists come from my computer to the ipad - why?

    Try deleting the photo cache from your computer and then re-try the photo sync and see if they then copy over correctly - the location of the cache, and how to delete it, is on this page http://support.apple.com/kb/TS1314

  • Hi i was wondering how do i get the iphone 5s comforting to know that when the battery gvshym problem or not the issue . i can see the serial number or something like that czech ?

    hi i was wondering how do i get the iphone 5s comforting to know that when the battery gvshym problem or not the issue . i can see the serial number or something like that czech ?

    Try this:
    Go into Power Manager, choose the Logging profile.
    Go into Windows' Power Options, choose a different profile, then switch back to the Logging profile.
    See if this clears any contradiction between the two.
    W520: i7-2720QM, Q2000M at 1080/688/1376, 21GB RAM, 500GB + 750GB HDD, FHD screen
    X61T: L7500, 3GB RAM, 500GB HDD, XGA screen, Ultrabase
    Y3P: 5Y70, 8GB RAM, 256GB SSD, QHD+ screen

  • My iphone 4 stopped recognizing when it is plugged in to charge. I have to let it completely die and do a soft reset for it to charge and start back up. Any suggestions on how to fix this?

    My iPhone 4 stopped recognizing when it is plugged in to charge. It has to completely die and a soft reset has to be done to it before it will charge and start back up running. A tech at a store said it was just a short in the phone and nothing could be done to fix it, but I'm sure there has to be other options. Any suggestions?

    To rule out a software issue or damaged data inside the backup, set it up as new device without using the latest backup afterwards.
    If the phone is back to normal after that, restore from the backup again.
    How to back up your data and set up as a new device

  • Why does 1 speaker crack when i click on different items (not all) after hp/windows updates?

    After installing several updates for Windows 7 & HP g72010nr at the same time, 2 problems have occured. 1 speaker cracks real loud when I click on different items (not everything) AND when running DVDs there are ripples all throught the movies. It's been about a month or more & I don't remember which updates they were since this is a new computer, I've had so many of them. Any quick fixes? Thanks in advance.

    Cool! If you dont have it already you can download Microsoft Security Essentials, which I use on my personal computer. There are TONS of virus scanners out there but I find this one to work well for me. Here is where you can get it if your interested: http://goo.gl/XF4L1
    Merry Christmas & Happy Holidays!
    Sean
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • When I upload a cvs file not all the column display in the Data / Table Mapping screen

    1. I have created application using Apex Data Loading wizard. There when I am trying to load data from .csv file, but not all the columns display in the "Data / Table Mapping" screen. But if I go through AQL --> Utility --> Data Workshop, there all column display in "Data / Table Mapping" page. I want to get same thing in application I created. How will get all columns display in the screen?
    2. Is there any way to select target table dynamically during runtime. So that in appication we can select different target tables with different source file to load data.

    Your user info says iPad. This is the OS X Numbers forum. Assuming you are using OS X… Be sure the file is named with a .csv suffix.
    (I don't have an iPad, so I don't know the iOS answer.)

Maybe you are looking for

  • Dynamic images in PDF (Adobe interactive form)

    Hi All,         I have stored image in database using BLOB. I retrieve the image using      WDWebResourceType.getWebResourceTypeForFileExtension(extn);//get Type      IWDResource res = WDResourceFactory.createCachedResource(CSVFile, Filename, type1,t

  • DTP  filter routine is not working

    Dear gurus I am working with BI 7  and I have created following filter'routine in the DTP. But the routine is not filtering. The statement :  read table l_t_range with key                            fieldname = 'CLEAR_DATE'. is not working. sy-tabix

  • Oracle 8i and stored procedures

    Hi I was hoping someone could point me to the right direction here. I have been using SQL server before and often use stored procedures. I understand that if you want to use stored procedures you will use the CallableStatement object and the prepareC

  • Java class in oracle apps forms

    java class in oracle apps forms We developed a java class and its running perfectly on local machine (Over the web through java applet ) But when we deployed it in apps and run with the client machine its not running .so please suggest where we put o

  • A thought on Style for the sake of Style, and a question: Where to wire constants?

    Lately, I've been trying to hone in on aspects of Style that effect my program's performance, and ignoring stylistic niceties in the sake of meeting deadlines. For example, Local Variables: if they work and don't cause race conditions, what the hey?