ActionScript 3.0 :: Timer Lagging When Browser Window Loses Focus?
Sep 12, 2009
I have this SWF that is pulling videos from YouTube through their API. Everything is working nicely until I go to another browser tab or cause the window the SWF is in to lose focus otherwise (largely by using any program aside from the browser). When I return to the tab/window that the browser is playing in, if I have been away for anything over like 20 seconds, the time text that indicates where the play head is plays catchup jumping over 3-5 seconds at a time. While the video is not making these jumps, what is happening is that any buttons for controlling the video become unresponsive until the time text actually has caught up with the current position in the video play head. Thereafter all functioning for my other buttons (play/pause, full screen toggle, and sharing) returns to normal. I am using a Timer that calls every millisecond.
View 1 Replies
Similar Posts:
Jun 8, 2010
Creating a flash project where I need to hit TAB in order for the playhead to go forward a frame. Then I need the user to hit a letter (for example hit 'a') to move forward again. Hitting the above keys is working,
As soon as the user hits TAB, flash seems to lose focus to the browser, and the user has to click on the swf on the screen before they can proceed.
View 0 Replies
Mar 21, 2011
I am unable to replicate this issue in Flash - only in a browser window. It appears that if I lose focus of that window for a period of time or scroll down the page where the embedded flash isn't visible, when I scroll back up or return to the window, the event timers appear to play catch-up.The timed "removeChild" commands do not run and leave remnants on the stage. I do not get any errors however, and everything else seems to continue running as normal.
ActionScript Code:
// XML File:
<?xml version="1.0" encoding="utf-8"?>
[code]....
View 0 Replies
Jul 13, 2009
Does anyone know how to do this in AS3?
View 3 Replies
Jun 25, 2009
Is there any reliable way to give the stage focus when you first open it in a browser window WITHOUT first clicking on the stage? By reliable, I mean something that works across different browsers and on both PCs and Macs.I've seen numerous threads on this subject, and I've read the Adobe tech note, and it seems there is no reliable way.How in the world can Adobe ask people to use Flash and not provide a reliable way to give the stage focus on startup.
View 1 Replies
Sep 7, 2011
I have a web page that uses javascript counters to count user "active" time, meaning the time a user spends viewing this page (and not some other page). I do this by starting/stopping them using the [URL].. However, when the user clicks on a plugin inside the same page (flash, java, etc), the window loses focus and window.onblur is fired. Is there a way to tell that the user is still on my page?
View 1 Replies
Sep 12, 2011
I have create a poker game user have 30 seconds time to play his turn, but the error is when user open another tab of his browser then flash countdown stopped until user dosent click on game tab. I tried, Timer event, setInterval and MovieClip enterframe also, but the main problem is when user focus the other browser window then flash all functions goes stopped until dosen't come back...
View 1 Replies
Sep 15, 2009
i have this problem. ive made this simple animated menu for a webpage, buttons do stuff on ROLL_OVER, and everything is great, but when menu is scrolled of screen and then goes back it loses focus and ROLL_OVER doesnt work until i click anywhere on my menu gotta finish this quick or they might want their money back
View 3 Replies
Sep 16, 2010
I have done an ovveride of the standard TextInput component In this component I have :
addEventListener( FocusEvent.FOCUS_OUT, handleFocusOut ); My method is trigerred when the field loose focus for another field (nice)Problem : It is trigerred alose when the whole flex application lose focus (when my field has the current focus inside my form)
View 2 Replies
Jan 15, 2011
My Sprite class keeps losing focus when I click with the mouse - specifically after the MOUSE_DOWN event (before the click is complete).
I have set mouseEnabled to false on the children, no change. I added a listener for FOCUS_OUT and noticed that the FocusEvent.relatedObject property is NULL, which is confusing me - doesn't that mean there is no new focus target, the focus is just getting lost?
The exact sequence of events I get, by tracing them, as I click:
[FocusEvent type="focusOut" bubbles=true cancelable=false eventPhase=2 relatedObject=null shiftKey=false keyCode=0]
[MouseEvent type="mouseDown" bubbles=true cancelable=false eventPhase=2 localX=355
[Code]....
View 2 Replies
Oct 29, 2011
I have a custom TextInput that listens for the FocusEvent.FOCUS_IN and FocusEvent.FOCUS_OUT events:
textDisplay.addEventListener(FocusEvent.FOCUS_IN, onFocusInHandler);
textDisplay.addEventListener(FocusEvent.FOCUS_OUT, onFocusOutHandler);
My onFocusInHandler function basically removes a "promptview" that tells the user to type in a value, with the onFocusOutHandler doing the opposite.
For example, if the TextInput text was backspaced to a blank value and the user clicks out of the TextInput box, it would show a "Please enter a value" light-gray prompt in the TextInput.
This works fine until the user clicks our custom "Clear" button. The clear button sets the text to "", and I can tell the FocusEvent.FOCUS_OUT is received because the prompt text is set to visible (its not being set anywhere else). The problem is, the cursor remains in the box as if it still has focus, so if the user immediately starts typing, both the prompt text "Please enter a value" and the user-entered text appears over the gray text, which looks pretty ugly and unreadable.
Why does the TextInput receive the FocusEvent.FOCUS_OUT event if it's not actually losing focus?
View 1 Replies
Jul 14, 2009
I'm using Flash MX, but these movies might have been saved for Flash 4 (what I used to use). I'm using IE and I have tested on other browsers and it seams to have the same problem. I have two small flash movies playing as part of my site design but when I scroll, this clearly lag creating a 'white box' where the movies should be until they move. I'm pretty sure the lag is with them two movie clips. My site is at [URL] (it's on the main site that I have the lag). They are Flash 4 Swfs.
View 2 Replies
Aug 8, 2010
I have a game where you can move a character around on a screen, very simple. My problem is, I have to click on the swf object in my browser before it starts to recognize my input keys. If there a way to set set to my swf object either in html or the swf itself /w as3?
This is the browser code I keep finding on googing:
Actionscript Code:
<body onLoad="window.document.mymovie.focus();"> <object width="760" height="820"> <param name="mymovie" value="test.swf"> <embed src="test.swf" width="760" height="820"> </embed> </object> </body>
View 1 Replies
Oct 30, 2009
i have a flash site that links to PDF's with the navigateToURL function which works etc But now i would like Link to rather open up a download window instead of just a new browser window?
View 3 Replies
Apr 14, 2005
I have a standalone Flash projector running off CD. Currently, I use
getURL("http:url....);
to open the page on default browser. Only problem is the browser window is opening at the size it was last used. I like to see it opens full screen.
View 2 Replies
Oct 27, 2010
The title essentially is the question, how do I open the .swf without the browser's control bar junk? and maximize the window?
View 2 Replies
Oct 4, 2009
I have the swf embedded in a html page and want to know if it is possible to set the focus so that it is within the swf and not the html (browser) when the page loads. You have to click on the swf to make it active, I do want this.
View 2 Replies
Feb 7, 2010
is there a class or general method used to know if the browser has focus of the swf or not?
View 3 Replies
Mar 30, 2009
i've made a flash movie in res 600 * 300, now i want to keep this res don't want the user to be able to expand the browser window or change the res or anything how do i do this?
View 9 Replies
May 24, 2010
Trying to detect a browser close event and send some data to the database when the user closes the browser window...but can't seem to get it to work.[code]
View 6 Replies
Nov 9, 2009
I have looked around for this and haven't found a way that clearly explains how to do this. More often than not the button will close the browser window in one but not another browser.
Is the a simple way of closing a browser window in all types of browser ( Or mainly Firefox, IE and safari on both Mac and PC ) with actionscript?
View 0 Replies
Nov 9, 2009
often than not the button will close the browser window in one but not another browser.Is the a simple way of closing a browser window in all types of browser( Or mainly Firefox, IE and safari on both Mac and PC ) with actionscript?
View 5 Replies
Sep 7, 2010
I'm struggling to get around an error that is constantly thrown in my application when I press the tab key.
I have a modal dialog box that contains a form with 3 form items. Whenever I press the tab button flex throws an error saying
"ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller."
I've tried setting up a focus manager in the initilize handler of my title window to no avail
private function init(e:FlexEvent):void
{
focus=new FocusManager(myform);
focus.setFocus(firsttextfield);
[Code]....
View 2 Replies
May 28, 2009
I have made a javascript/flash system to play sound effects on an AJAX-based game I have made. For some reason, on some systems (it appears to be just Firefox 3 on Windows XP), users can only hear the sound effects play while the window is in focus. If they minimize the window or are looking at a different window the sound effects don't play.
View 8 Replies
Mar 20, 2009
I have a flash panorama that has hotspot links to pop-up windows that contain more information about the object. Right now if you are in fullscreen mode and click a hotspot you are automatically kicked out of fullscreen mode and the pop-up then opens. Is it possible to have the pop-up open and have focus while in the background the panorama is still in fullscreen mode?
View 2 Replies
May 16, 2011
I have created a container in Flash Professional CS5 for my projects CBT. I have been able to script many of the features we require using AS3, but there are a couple of things I am still trying to work out.I would like the swf presently playing in one tab to pause and go silent when another swf is opened in a new tab (the sound is inside this externally loaded swf which is loaded inside a movie clip from buttons nested a movie clip down). I have tried :
var originalFrameRate:uint = stage.frameRate;
var standbyFrameRate:uint = 0;
addEventListener(Event.ACTIVATE, onActivate)[code]....
This function is present when I publish the CBT with Captivate, so obviously there must be code available. You can set the Captivate button to open url in new window and pause movie.Is there something I can add to the html file that is similar to the �has Priority� for mobile devices or is there javascript that can be added to the flash itself?
View 0 Replies
Oct 10, 2011
I need to focus a the text input into the facebook login popup. I am usig a virtual keyboard to simulate a physical one, but when i click a key, the text input lose focus and the letter is not wrtitten into the field.I dont know how i could mantain the focus in the text input.
View 2 Replies
Aug 5, 2010
Has anyone noticed the following behavior building Flex programs using the mxmlc ANT task (running in the background): as the MXMLC task starts, it steals the window focus from whatever application is currently running, and then gives it back again! This is extremely disruptive.Is there a way to run the MXMLC task "headless" so it doesn't interact at all with the window system?I'm running on Mac OS X (10.5.8, if that matters), and Flash 4.0.1 (although the behavior existed on 3.x as well).
View 1 Replies
Jan 22, 2010
Can flash detect when the user switchs focus to another window?
If it can then is there any event that fires when it does?
View 2 Replies
May 19, 2011
I'm trying to code my flash file so that the html will pause all swfs AND audio when the tab is out of foucs. I found this code on[URL].._and_VBScr ipt_Injection_in_ActionScript_3 and it works,but not completely. It only pauses the movie clips that are in the Flash file and not any that are exteranlly loaded with audio included.
[Code]...
View 2 Replies