ActionScript 2.0 :: Hitting TAB Loses Focus To The Browser?

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


Similar Posts:


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

ActionScript 3.0 :: Finding Out When A TextField Has Focus And When It Loses Focus?

Jul 13, 2009

Does anyone know how to do this in AS3?

View 3 Replies

ActionScript 3.0 :: Flash Loses Focus - How To Regain It

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

ActionScript 3.0 :: RemoveChild Problem When Window Loses Focus?

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

Flex :: FocusOut Event Trigerred When Apllication Loses Focus?

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

Flex :: Flash Sprite Loses Focus On MOUSE_DOWN Event

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

Flex :: Custom TextInput Component Loses Focus But Still Contains Cursor?

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

Actionscript 3 :: Flash - Keep Focus And Cursor In Flex's TextInput After Hitting Enter?

Jul 23, 2009

I am a Flex newbie and I am testing a little application that simulates a cart. (It is based on a nice sample by Farata Systems' Yakov Fain).Note: I am using the beta of Flash Builder 4 to code the application.Here you have a link to the screenshot:Screenshot(Sorry I can't insert the image of the screenshot right here since stackoverflow doesn't allow new users to use image tags.)The application is very simple. You type a product in the TextInput control and then click on the "Add to cart" button to add it to the "cart" which is represented by the TextArea at the bottom.

That works ok.The problem is that I also want the user to be able to keep adding items to the cart without having to click on the "Add to cart" button. So, I added code to handle the enter event of the Textput by calling the same handler function triggered by the "Add to cart" Click event.If you type some content and then click the "Add to cart" button, the TextInput control receives the focus and the cursor, so you can type again.
However, if you hit enter, instead of clicking the button, the TextInput control keeps focused and you can see the cursor beam, but you can not enter text until you click elsewhere and come back to the control.Below you can see the relevant part of the code, with the definition of the component that groups the three controls at the top (Label, TextInput, Button).

<?xml version="1.0" encoding="utf-8"?>
<fx:Script>
<![CDATA[

[code]........

View 3 Replies

ActionScript 2.0 :: Focus Stuck In INPUT Textfield After Hitting Enter Multiple Times?

Apr 28, 2008

I have a search input textfield on stage that searches my list component...there is no search button, instead the search is performed 1 second after the user stops typing...(this is done with a key listener)...however the input focus gets stuck in the textfield if you type something (anything) and hit the enter key multiple times...I hit it like 5-10 real quick....then I tried to click my address bar in the browser, and I am unable to type a new URL...it just continues to type in the input text field on screen..

View 3 Replies

ActionScript 3.0 :: Reload A Swf Without Hitting Browser Refresh Possible?

Mar 18, 2010

Just wondering if its possible to reload a swf into itself without hitting the browser refresh? Essentially, by clicking a button, I want to start the swf over, so all the variables are reset etc, without having to do this within the browser.

View 9 Replies

ActionScript 3.0 :: Flash CLICK Event Not Triggering After Hitting Back Button In Browser

Jul 21, 2011

Our testing department found that my flash menu sometimes doesnt work after going back to a page by clicking Back button in browser (Firefox).

It happens rarely and randomly, yet still it happens.

i cant see any pattern in its behavior and any reason in it.

[URL]

i've tested this in every way i could think of,

it gets ROLL_OVER event, but not CLICK event.

ive also tested it with hasEventListener and it always has. its just not triggering function.

BUT clicking anywhere on page outside flash makes it work again.

Question: whose fault is this? Flash? Drupal? Firefox? God?

UPDATE: it looks like its caused by <param name="wmode" value="transparent"/>.
Firefox seem to have problem with that.

[URL]

View 3 Replies

Set Focus To Swf In Browser?

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

ActionScript 3.0 :: Set Focus In Swf Instead Of Browser?

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

ActionScript 3.0 :: Know If The Browser Has Focus Of The Swf Or Not

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

Facebook :: Return The Focus To A TextInput In A Browser

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

Giving Stage Focus When First Opening In Browser Window

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

ActionScript 3.0 :: Pausing Swfs And Audio In A Browser When The Tab Is Out Of Focus?

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

Professional :: Pausing Swfs And Audio In A Browser When The Tab Is Out Of Focus?

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 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.
 
How can I adjust it to pause the externally loaded swfs that are loaded to a mc within my main movie clip and the audio OR what should I use in place of this code?  Someone mentioned on a different post that I needed to use a window.onblur funcition, but they didn't give details. 
 
import flash.display.MovieClip;import flash.utils.setTimeout; // This is a more "safe than sorry" setting, since multiple domains// have entry into my site. Can be removed or hardcoded if you feel// secure or insecure, as you see fit.flash.system.Security.allowDomain("*"); // Throw any errors around to make sure somebody actually gets

[code]....

View 1 Replies

ActionScript 3.0 :: Pause Stage/swf With Audio When A New Tab Is Opened/ Out Of Focus In Browser

May 16, 2011

I have created a container in Flash Professional CS5 for my project's CBT.  I've been able to script many of the features we require using AS3, but there are a couple of things I'm 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've tried :

var originalFrameRate:uint = stage.frameRate;
var standbyFrameRate:uint = 0;
addEventListener(Event.ACTIVATE, onActivate);
addEventListener(Event.DEACTIVATE, onDeactivate);

[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 1 Replies

Javascript :: Preserve Browser Window Focus When Clicking On Plugin?

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

ActionScript 3.0 :: When User Focus The Other Browser Window Then Flash All Functions Goes Stopped?

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

Flex :: Flash - Giving An Application The Focus In Browser To Capture Keystrokes?

Jan 1, 2010

I've written a little video game in Flex that runs in a browser. The player moves by pushing the arrow buttons on the keyboard, so I need to capture those keystrokes. In fact, the game action starts when the player presses one of those keys.In order to capture the keystrokes, the Flash/Flex application, not just the browser, needs to have the focus.How can I ensure that the application has the focus? I've implemented a bit of a hack: A "Begin" button you must click to start the game. The only point of this button is to ensure that the app has the focus.

View 2 Replies

Actionscript 3 :: Add Keyboard Shortcut To Flex-project To Focus Container Browser?

Nov 9, 2011

What would be the appropriate way to add some AS in a flex-project, giving giving focus back to the parent browser.

ctrl-q: i'm blurring flash
ctrl-t: ah, a new browser tab.

View 1 Replies

ActionScript 3.0 :: Browser (Firefox) Keyboard Shortcuts Focus (ctrl+w, Ctrl+n)

Oct 17, 2008

I have a Flash movie which fills the whole browser window. This means that always the key events are catched ("stolen") by the Flash movie only, when using Firefox. IE7 seems to be working as I want.

I want for example ctrl+w (close window), ctrl+n (new window), ctrl+t (new tab) to work in Firefox while the focus is on my Flash movie. How to accomplish this?

View 7 Replies

ActionScript 3.0 :: What The Focus 2 - Automatic-focus - Clicking To Be Able To Detect Key Input

Mar 8, 2011

[Code]...

when i have this line active(the red one) it gives me automatic focus, so no clicking to be able to detect key input so i got that going for me which is nice BUT when i have it active(not commented out) i get this big yellow line which goes away when i click it(seeBelow)

View 1 Replies

ActionScript 3.0 :: TLF Focus - Set The Keyboard Focus For A TLFTextField And Cursor?

Sep 14, 2010

can I set the keyboard focus for a TLFTextField? I tried stage.focus = myTLF but there is no cursor...

View 2 Replies

ActionScript 3.0 :: Keyboard Focus Not The Same As Focus?

Mar 16, 2009

I have a TextField called textField on the first frame of the main timeline, and this simple code.

Code:
import flash.events.KeyboardEvent;
import flash.events.FocusEvent;

[code]......

View 2 Replies

C# :: ASP .NET Loses Session Between Pages

Apr 20, 2011

I encountered a weird error, I lose sessions when moving between pages.

I lose Sessions because i use Flash (swf) menu to navigate between pages.

So when i navigate to a page using the Flash menu, I lose the session.

It doesn't let me answer my own question so here is the answer:

Thx for answering, but the problam wasn't the flash..

I just found out that the session was opened on http://WebSite.com/ And the flash was redirecting to http://www.WebSite.com/

So the session losts between domains, and not between pages because of flash :) I just made all my site use the www domain .

View 3 Replies

IDE :: Png Loses Transparency When Published As Swf?

Dec 22, 2008

I'm working on a project where I want to use a transparent png, and when authoring in Flash CS3 (using actionscript 2.0) the png image appears transparent just as it should. However when I test it the .swf file loses the transparency entirely. The png image was saved for web from photoshop as png-24.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved