Pausing Flash movie on focus lost

Is there any way thru ActionScript to detect the loss of
focus at the Flash movie level, eg. browser minimize or selection
of another window, I would like to auto-pause my game at this
point. I managed to create a reasonably effective solution using
event handlers within the EMBED and OBJECT tags in the HTML but I
would rather have my Flash movie do the work, onBlur and onFocus
don't behave particularly well across different browsers anyway.
Thanks,
Ronny.

quick answer - no!
Might be possable from the right click menu, but your down to
the mercy of the way the movie is structured internally.

Similar Messages

  • How do i make an image pause in a flash movie clip

    Please can someone help me. I am trying to find out how to pause or stop an image in a basic flash movie clip,  after it has entered from one side and before it exits the other side.
    I have been trying to work it out myself for three days but no joy. I am practicing  for a test with a training agency which gave me a disk to use but nowhere in it does it say how this is done. I am also having a lot of difficulty making stop start buttons work with this movie clip. I am using a trial cs5.5 version of Flash which expires in 7 days so i need to know this soon. I am up to speed on most of the features, its just this one thing that has me stumped. A lot of the tutorials or examples  i have found on the net are very long winded and hard to follow exactly. Could someone let me know, step by step the sequence i should follow after i have created an object  and made it go from one side of the stage to the other.

    Hi
    Thank you for getting back to me. Yes i am using a timeline tween. I have an image on my stage which moves in from one side and out the other side. I am trying to stop or pause the image. The effect i will be asked to reproduce in my exam will be something very much like the banner on the website http://www,iactweb.com. If you go to this website you will see images arrive on the banner and pause before exiting the other side. I am fairly up to speed on all the aspects of getting this effect but i have forgotten what i learned during the course on how stop or pause the images. I am using the trial cs5.5 version of flash . Thanks again for getting back to me.

  • Flash movies "paused at start"

    I'm a total newbie to flash, so go easy...:)
    I've a flash movie created from a wmv I have, which I want to
    play on a website. I've worked out by dragging the flv into Flash
    it gives me the options to create the skins for the player etc,
    which is all fine. I can even publish it and get it to work -
    http://swanningabout.co.uk/flashMovie/movie.html
    However, in my "publish settings" options I've ticked "paused
    at start". However, as you can see in the above link the movie
    plays right away. Looking at the source, the "play" parameter is
    flash so I can't see what the problem would be?
    Am I missing something?
    Many thanks in advance,
    Ed Ludlow

    Hi Ed
    That function is not used for other things then the basic
    timeline control.
    Therefore what you need is following:
    Select your FLVPlayback component and move over to the
    properties panel, and set the AutoStart parameter to false.
    That's it.
    Cheers

  • How does one detect flash movie (embed object) focus?

    If I use javascript to shift focus to the embedded flash
    movie object, for example with the following line of code:
    document.getElementById("myMovie").focus();
    Is there any location within actionscript that I can add an
    event listener to detect this shift in focus to the flash movie? I
    have tried attaching a "focusIn" event handler to the application
    container, to the the stage, and the systemManager, but none of
    them appear to work.
    Essentially I need to know what object within the application
    is receiving focus when I make this javascript call.

    Here's a tutorial for adding a referenced movie along with  instructions: #18 - Adding Movie/Video File to iWeb Page via Export for Web in Quicktime Player. 
    OT

  • Slow Flash movies in Safari and Firefox

    This issue started right after the software update of Safari 3.2.1 (from 3.2). I'm totally lost, because it does not make any sense to me. The performance on Flash websites with either Safari or Firefox, is extremely slow and stuttering. Fade-ins and outs are no longer smooth, I can even HEAR their "calculating".
    What confuses me most is the fact that watching my self-created Flash movies as swf files is perfectly fast and smooth. As soon as they are being viewed in a browser, local on the computer or on a web server, they are slow.
    Here's what I already did, and it got somewhat better, but not back to how it was before the software update:
    - reset safari, empty cache.
    - uninstalled and reinstalled the latest Adobe Flash Player plug in.
    - repair disk permissions
    - add DNS codes
    - I even upgraded the RAM's to the PB's max of 2GB
    Anybody got any ideas? I was thinking it might be the video card. But why would the Flash movie show smooth as an swf file but not in a browser?? And why was everything OK before the update?
    I read that the video card is part of the logic board. Is it possible to exchange that at all?? This is what's installed: ATI Mobility Radeon 9700, VRAM 64 MB.
    Thanks in advance for any inputs!!

    I figured out the problem/cure. I had help, though not from this website... However, I thought I'm going to post the solution here, in case someone else is experiencing the same problem! It turned out that it was not the update to the latest Safari (3.2.1), but the latest Adobe Flash player version (10) that caused the bug. Apparently older Mac's (I'm using the 1.5 GHz PowerBook G4 aluminum) cannot handle the latest technology of Flash player 10.
    I uninstalled the plugins, using Adobe's Flash player uninstaller, downloaded the Flash player 9 folder here: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14266&sliceId=2 and installed version 9.0.151.0. Repair disk permissions. That's it. Everything is back to normal!!
    If this was helpful to anybody, I'll be happy to hear from you!

  • Flash movies stop after a random amount of time,

    The problem that I am having is that flash movie files (Every website) play for a moment or two and then stop with the little “loading” symbol turning endlessly in the center of the screen. Flash movies used to work with no problem but over the span of the last few months it went from not working well to not working at all. In a perhaps related problem sometimes downloads will stop after a certain length of time and also seem to “hang” at a random spot. If I pause the reload and then restart it the program or whatever will usually finish downloading. This doesn’t happen often but does happen. The flash movie thing, though, happens every time – no matter what browser I have tried. (Firefox, IE, IE with no add-ons, and Chrome anyway.)
    I have tried solutions that I have found all across the internet, including the Adobe and Microsoft forums, to no avail. I have unloaded flash with the Adobe uninstaller and reloaded flash. I have tried various flash releases – with and without a firewall on. I have made sure that I am using the 32 bit version of IE and even tried running everything in “administrator mode.” I’ve upgraded every driver that I can upgrade. I’ve used a registry checker as a last resort. I even used the Dell partition to return my computer back to the condition that it was in when I bought it and that didn’t change anything either.
    Everything I have tried has made zero difference. In the hopes that someone will have another idea for me to try I am putting all the stats for my computer that I can think of below.
    Qwest internet running at 20mbps
    Flash 10.1.102.64
    Shockwave 11.5.9.615
    Microsoft Security Essentials
    Tried both IE 9, IE with no add-ons, and now have IE 8 from when I restored from the partition image
    OS Name             Microsoft Windows 7 Home Premium
    Version                6.1.7600 Build 7600
    System Manufacturer    Dell Inc.
    System Model   Inspiron 560
    System Type      x64-based PC
    Processor            Intel(R) Core(TM)2 Duo CPU     E7500  @ 2.93GHz, 2936 Mhz, 2 Core(s), 2 Logical Processor(s)
    Graphics - Intel(R) G45/G43 Express Chipset
    Sound - Realtek High Definition Audio
    BIOS Version/Date          Dell Inc. A00, 10/6/2009
    SMBIOS Version               2.6
    Hardware Abstraction Layer        Version = "6.1.7600.16385"
    Installed Physical Memory (RAM)             8.00 GB
    Total Physical Memory  7.96 GB
    Available Physical Memory          6.94 GB
    Total Virtual Memory     15.9 GB
    Available Virtual Memory             14.4 GB
    Page File Space 7.96 GB

    Thank you for answering eidnolb -
    Answering your questions...
    Have you had a Virus and if so what Anti-Virus program removed it?
    No virus that I am aware of
    Since you have a Dell, McAfee came pre-installed? Did you remove it prior to Installing MSE? If so, did you use the McAfee Removal Tool or just remove it from Control Panel/Programs & Features?
    My computer did come  with McAfee which isn't on my computer now. I used a program called "Decrapifier" that removes unwanted preloaded software that comes with PCs.
    Is McAfee still Installed?
    No
    Do you have any Anti-Virus/Spyware programs other than MSE?
    No - I have just used MSE until now. I thought about using AVAST but was't sure what running 2 virus/spyware programs would be like.
    Since MSE doesn't have a Firewall, do you use any Firewall other than Windows? If so, which?
    I use Windows Firewall. I have tried both adding Youtube as an allowed program and switching the firewall off enirely with no luck.
    Do you use a Router? Is it Wireless?
    I do have a Lynksys router that is a little older but I've also tried hooking the modem directly to the computer.
    Is Qwest wireless?
    I use the wired ports and not the wireless for my connection.
    Other than IE8, what browsers and versions are Installed now?
    I only have IE8 now. I never reinstalled the other browsers after using the Dell partition. I prefer Firefox so having to use IE is frustrating.
    I've also used "RegestryBooster" to make sure that my regestry looked okay.
    Thanks again for taking the time to answer. I think you are right about me doing too much - LOL

  • Need help with FLV type SWF playback in flash movie

    Hi,
    I have three external SWF files from a client without FLA
    sources. The SWFs were done 3 years ago by someone else so there is
    no way to modify the existing SWF files. These contain no
    interactivity but may involve nested clips on the main timeline.
    They are AS1 or AS2 files so they need to be done with AS2
    scripting to keep it simple.
    I need to call these SWF files inside another flash movie and
    play them in a player window as if they were video files with
    play/pause, seekbar and volume controls. The needed functionality
    is similar to FLV players. My controls will use custom graphic
    buttons and sliders mimicking the look of CNN video player window.
    Does anyone know a good tutorial on how to script these
    controls for SWF?
    Most likely I think I will load it in a clip and I am
    thinking that I will need to get the duration of the loaded swf in
    order to set up the seekbar.
    Thanks in advance,
    Attila

    I think your professor, or somebody, gave you directions with ActionScript 2 programming. In AS2, what oyu have here would have worked just fine. But, in AS3, you need to use a fairly different approach. Your buttons, and their instance name, can remain the same. But now, in AS3, you have to add event listeners in the following manner:
    yourButtonName.addEventListener(MouseEvent.CLICK, yourListenerFunction);
    In your case, you can do one of two things - A) assign a unique listener function to each button, or B) assign the same listsner to both functions:
    A)
    start_btn.addEventListener(MouseEvent.CLICK, startPolygon);
    stop_btn.addEventListener(MouseEvent.CLICK, stopPolygon);
    function startPolygon(e:MouseEvent):void{
        polygon.play();
    function stopPolygon(e:MouseEvent):void{
        polygon.stop();
    B)
    start_btn.addEventListener(MouseEvent.CLICK, controlPolygon);
    stop_btn.addEventListener(MouseEvent.CLICK, controlPolygon);
    function controlPolygon(e:MouseEvent):void{
       if (e.target.name == "start_btn") {//Test for the name of the object that dispatched the CLICK event
          polygon.play();
       } else if (e.target.name == "stop_btn") {
          polygon.stop();
    When I'm using several buttons that do the same/nearly similar things, I favor approach B over A, as it keeps me to jsut one single function to deal with.

  • Can´t see my flash movie

    I´m working with authorware 7.02 and try to import a
    flash movie. This is published as flash 6 (actionscript 1) and
    contains a video (mpeg4) and control buttons for it (play, pause,
    change of speed,...). I tryed to import it with the flash asset
    xtra but I dind´t see anything then. Then I tryed the activex
    shockwave flash object but it just showed me a white square.
    I hope somebody can help me!!!
    marion
    (vienna)

    What version of Flash did you publish it to, and are you
    using ActiveX or
    the Flash Xtra to display it?
    -Amy
    "GregWorth" <[email protected]> wrote in
    message
    news:ecv1jq$hlo$[email protected]..
    >I am having the same issue. I have created a SWF movie
    with buttons and
    >navigation that work fine by itself and when I import it,
    the buttons dont
    >work or disappear?

  • Playing Flash Movie .swf files in iWeb

    This is my second post. The first was about generally not being able to publish my website in iWeb in Argentina. Discovered it was due to the 12 kilobytes a second upload speed!
    This query is about trying to get a flash movie with .swf extension to play on my homepage in iWeb
    www.edgold.co.uk
    Ive made a flash movie on my girlfriends PC. Why? Because she has Flash installed.
    Ive transferred it to my Mac and it plays with a programme I downloaded called SWF & FLV Player - no problem there. For the love of trying I cant get it to play.
    Ive gone to 'Insert' in iWeb, clicked on Choose and selected the swf file. Ive put it in position on my homepage and published it. Then Ive opened the HTML page thats found in iDisk using TextEdit so that I can change the html to get the flash plug in to play it.
    I found all the details on website by 'Vertical Moon'
    http://www.verticalmoon.com/tutorials/general/iweb/iweb.htm
    Ive followed every step to the letter but where they seem to slip up is that the swf file isnt played by QuickTime. QuickTime on my Mac doesnt want to know! If it was played by QT then I'd have a chance to change the html from 'writeMovie1()' to writeflash1() but there is no sign of that code in the html file let alone having to change it in JavaScript.
    At the end of the day Ive got an swf file (Flash) that I want to stiuck on the front page of my website to play over and over. Ive spent over 18 hours on this non-stop and its time I called it a day.
    Please can someone tell me how to get iWeb to make friends with it!
    Ive looked at lost of other sites about free Video code generating but none of them work!
    Cheers
    Ed
    (Im in Patagonia - documentary photographer...sorting a good site helps me secure sponsorship and future exhibition venues. Your help is appreciated!

    Alancito
    Thanks for replying and the great info on getting a QuickTime to play automatically.
    Please can you continue to help as Im having no luck.
    I will write below briefly whats happening.
    I made a QuickTime in iPhoto as was suggested. I dropped it into iWebs 'Media' button under the 'Movies' tab, in a folder. I then dropped the QT file onto my web home page. It shows with a control bar at the bottom of its window for playing it.
    I published it OK. The live website shows the QuickTime movie BUT you have to click play to start it. So I then I opened the html file in iDisk in TextEdit.
    I tried and tried to find the html code for the QT Movie. I read and re-read the whole html file from top to bottom and found no sign of the QT Movie. Then I went to 'Edit' and 'Find' in TextEdit and typed Movie. It came up with a bit of code which says writeMovie1();
    I guess that this means it is talking about THE movie in question but there is no more code to
    do with 'true' or 'false'. If it said false Id change to true but writeMovie1(); just looks like this:
    <script type="text/javascript"><!--
    writeMovie1();
    --></script>
    stuck almost at the bottom of the html file page.
    Please help...remember Im using iWeb 06
    Thanks...I hope Im close to solving this now. All I want is to play the QT automatically.
    Ed

  • Flash movie not play on FireFox

    I built couple flash movies ( using flash 8) on the website : http://www.hoaxinh.com
    For some reason, they do not automatically play in new Firefox.  The movie only play when use click on "play" button.
    Should I have to convert these movie using higher verson of flash? could you please help?
    Thanks

    what's not playing at your link?
    double check its publish settings so you do NOT have "paused at start" checked.

  • Can I prevent the rapid flashing which occurs when testing a Flash movie which has a syntax error?

    I teach games development using Flash Professional CS6, and one of my students has photosensitive epilepsy. He is finding that the 'strobing' effect which occurs when he executes Test Movie on a movie with errors in its script is triggering headaches which can be a precursor to a fit. Obviously this is making it very difficult for him to complete his lab and assignment work. Is there any way of preventing a Flash movie from running if it contains a syntax error?
    I have created a workaround by adding a bunch of extra frames to the start of the movie which will display a "SYNTAX ERROR" message if the script doesn't run - this gives my student a few seconds margin to quite the movie before the strobing begins. I have a single frame at the start with a goto statement which jumps over those error frames if the code doesn't have any syntax errors.
    This seems to be working ok, but it's an ugly solution - does anyone know of a better way to deal with this?
    Thanks.

    1.In Preferences you can check "open test-movie in tabs".
    2. Having done that you could write a jsfl-script which switches the focus (immeadiately after you test the movie) to another tab in the same register card, thus, forcing the possible "corrupt" testmovie in the background. If are no compiler errors , the testmovie can be made available by simply switching to the test-movie tab, if there are compiler errors, you can close it without having to look at it.
    Another option would be to setup FlashDevelop as compiler trigger of Flash.
    You have to change these basic properties in your project:
    FlashDevelop will only launch the test movie if it compiles flawless, inside Flash.
    FlashDevelop will act as a "bouncer" to Flash.

  • Flash Movie Clip Help

    I've been trying to recreate the flash movie they have on
    http://www.comcast.net/news/
    its in the middle of the page.
    I have everything except I cannot get that black fadein to
    go as smooth and fast. I've tried making more frames
    and less frames, but it doesn't seem to make open as smooth.
    Is there a way to code a different fps for just the fade in?
    or
    Does anyone have any ideas?
    Thanks in advance

    Your attachment appears to be lost in the queue... not abnormal for the new and improved forums.
    Anyways, for what I think you are trying to do you should look into using the Tween class.  If you Google "AS2 Tween" the first result you get  (a Kirupa article) may be enough to get you started--I didn't look beyond that one.  In your case you would probably be tweening the _y property of the page movieclip.  When it comes to changing pages, you might also want to incorporate a listener so that you can first tween out the current page before you tween in the new page.  You can have multiple tweens working at the same time for the same object, so you might want to add an _alpha tween into the mix as well.

  • Urgent: How to export a Director cast member - in this case it's a flash movie?

    Hi there,
    I've got a problem - of course, that's why I'm here.
    My problem is that in my Director (version 11.5) movie a flash movie is member of the cast list (sorry, I only know the German terms and hope totranslate correctly!). In it's properties there's no source-URL. So it must be "in" the Director film somehow.
    Unfortunately the original file went lost. Now I need to have this flash movie as a flash movie, not as a member/ cast. Is there any possibility to get the movie out of Director als a file?
    Thanks so much for your help!
    Kind regards
    Jana

    Hi Sean,
    thanks for that hint! I downloaded and extracted the Xtra into the Director Xtra folder. Then I tried to use the function "exportSWF", but it told me the handler is undefined.
    Unfortunately I'm a real Lingo beginner and don't know anything about Xtra usage.
    I used the following code: 
    m = member("Player")
    exportSWF( m, "/output.swf", TRUE )
    I'm sure that line 1 gives me the flash movie as a member, because it is used like that in the code already.
    I thought with the Xtra I can simply use the exportSWF-funcion. What else is to do to use it??
    Thanks in advance!
    Jana

  • Making a flash movie delay before starting for the first time

    Flash noob here. I've currently got a little bit of
    actionscript in my flash movie which makes it loop a couple times,
    and then pause, before looping over again, and then pausing again,
    and wash-rinse-repeat, which is fine.
    But now what I also need is to add a small bit of code
    (preferably on the first frame) which allows me to set a delay
    time, that the movie will just appear to be paused, but it should
    ONLY do this the first time. Every other time, the movie should
    loop like it does normally.
    The reason is because I've got about 3 movies on my page,
    when one stops moving, I want a 2nd one to start, then when that
    one stops, the 3nd will start, and when the third one stops, the
    1irst one will start again, etc. so I have to time it just
    right.

    If it might help, here's the code I have so far. The movie
    has 17 frames. But that shouldn't matter, I was going to just go by
    the loop count, and try to even them up that way.
    frame 1
    function pause(){
    play();
    clearInterval(timer);
    loopCount=0;
    frame 16
    if (!loopCount) {
    var loopCount:Number = 0;
    loopCount++;
    if (loopCount < 5) {
    this.gotoAndPlay(1);
    } else {
    this.gotoAndPlay(17);
    frame 17
    stop(); // 60000 = 1 minute
    timer = setInterval(pause, 10000);

  • Three dimensional array causing repeating pause in movie

    I'm creating what is essentially a 3 dimensional array. It's
    an array of objects, and each of those objects (a map) contains a
    few properties, one of which is a two dimensional array of tile
    objects. The strange thing is that the act of pusing each of these
    map objects on the array causes my movie to run with a periodic
    (about once a second) pause. The more map objects are pushed onto
    the array, the longer the pause. In between the pause, the movie
    runs at what seems like normal speed.
    Does this sound normal? I can see the movie slowing down
    while building the 3 dimensional array, but once the array is built
    (and i've verified that it builds corrently- no endless loops or
    anything), even if I do absolutely NOTHING wtih it I still get the
    pause for as long as my movie runs...
    that's the part that really seems strange to me- the
    repeating pause is directly related to my pushing of the map
    objects onto an array... Even if I build all the map objects and
    don't push them onto an array, the movie plays fine...
    Any ideas or help would be appreciated. For anyone who is
    interested, the associated actionscript is attached. Thanks!

    anyone? I don't need a direct solution... if anything the
    biggest problem I'd like to understand is that if all my objects
    are already created (i.e. already stored in memory), and my array
    is already created- how can simply pushing the objects onto the
    array cause a recurring pause/performance hit- even if I don't use
    the objects (including the array) at all (? All the memory is
    allocated already- all i'm doing is pushing a reference to the
    object onto the array, right? If anything I would think there could
    be a performance hit WHILE pushing objects onto the array, but what
    the heck is creating the pause/performance issue the rest of the
    time?
    I would really appreciate any help, I don't know any flash
    experts in person, and I've been racking my brain on this
    one!

Maybe you are looking for