Actionscript 3 :: Flash Buttons Take Focus Off Of Screen
Jan 27, 2010
In my flash movie, every time when I click on a button, it takes focus off of the stage. And I have to reclick the stage in order to interact with it again. Is there away to fix this issue. I am making a game and it will be very annoying if the player has to keep reclicking the stage in order to take control of the game every time they click on a button.
I'm trying to build accessibility into a slideshow that will work in Window Eyes on a PC/IE7. The user will tab in order over a button for each slide. It all works except for I'd like to show the image on the stage when they tab to the button. I thought if I could listen for the tab, I could execute a function to change the image. But that doesn't seem to work. Should I scan for a change in which button is focused on? I'm not sure how to do that..
What code would I use to change the focus of an object so it would rotate around the center of the screen like for a car game with a scrolling ground that moved based on key presses?
I have a menu which consists of several buttons held with a movieclip (menu_mc) on the stage. You can select a menu option with a mouse click. However, I need to be able to use the keyboard too.
So I've set an keyboard eventlistener and that works, but only if the mouse has clicked on the main stage area first.
If I click on the menu_mc movie clip (for example selecting a menu option with the mouse) then the keyboard eventlistener doesn't work (presumably it's taken the focus off the stage?)
I think this is to do with the focus - so how do I keep the focus on the stage.
I've got a problem with rotated buttons in Flex. They seem to contaminate other components' focus rectangles. Take the following source code, which couldn't be much simpler:
[Code]....
Now execute it. Click in the text area, the focus rectangle is correct. Press tab twice, the focus rectangle aroung the TextArea is rotated! Is there a fix for this, or should I avoid rotating buttons altogether? I'm using Flex SDK 3.5.
Very strange. I'm using the following function to pass characters to 2 text input components, but sometimes (and much more often with the "Password" field), after I click a button, the button loses focus and I have to move the mouse to regain the rollover state and be able to click the button again. When I've lost focus, if I click the mouse, it just changes the button to the rollover state but doesn't pass the value...
Here's the code: var Focus:String = ""; function KeyPadButtonClick(_id:Number) { // default the focus to the UserID if (this.Focus == "") { this.Focus = "UserID"; [Code] .....
After a user clicks a button the getURL passes some variables to a js function that displays an html lightbox type effect. After closing the lightbox and returning to the page underneath all of the buttons are now no longer clickable
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)
Trying to create a Projector which contains FLV files andother on-screen elements.I have a button "myFSButton" on screen which switches theProjector to Full screen.However when the button is clicked the FLV file plays fullscreen rather than enlarging theentire stage to full screen. I'd like to have the entireinterface zoom to full when the button ispressed.I've tried a couple of different was to switch to fullscreen, but both have the same effect.
First using fscommands: function gofull(event:MouseEvent):void {
I have created a movie that plays a video and displays links on the right side of the movie when queue points are reached. I've created a custom fullscreen button and added the following AS to it[code]...
So you are in the menu screen of a game and you press a button to enter a level code. A pop-up menu is created that asks for the level code.
In a situation like this, how can I prevent you from clicking the "start game button" or the "options button" or whatever when this level code pop up is on the screen?
Would I have to temporarily remove all the listeners for the other buttons? That sounds like it would work, but it would require a lot of maintenance, especially if there are a lot of buttons on this menu screen.
I've built my first flash application and it's very close to being finished. I have a problem with two buttons that are on the are on the left and right of the stage. When the browser is enlarged these buttons don't remain on the edge of the browser. Not sure if I explained that very well so here is a link to the application [URL] if you make you browser wider you will see my problem.
I'm creating a quiz application using Flash CS3, but it's been such a long time since I've used ActionScript and I'm a little bit stuck.I've created an input text box in the first frame of my quiz program. A person will enter their name into this text box (which I've called "nameInput") and then click the next button to proceed through the quiz.However, when I get to the results page I cannot figure out how to get the input name to be displayed automatically in the dynamic text box (which is called "nameOutput") when the user enters the frame.
I made a custom button-class (called CustomBlitButton) where a button is defined. The roll over-states of the button are defined inside of the class CustomScreen. That's because a custom screen holds one or more buttons. I can create a button when using the createButton-function of the CustomScreen-class.
So if I want to make a screen with a menu, i.e. several buttons I do this like that (this is just an excerpt):
I've got the following code working perfectly so that when I click the 'mc.fullscreen_btn' the movies goes full screen. When I click 'mc.fullscreen_btn' again the movie returns the the browser. However ideally I would like it so the user has to click a deferent button to return the movie to the browser (ie: _root.topmenu_mc.displaymenu_mc.displaymenuON_mc.b rowser_btn).. is this possible using the code base I have?
// Full Screen var stageListener:Object = new Object(); stageListener.onFullScreen = function(bFullScreen:Boolean):Void {
1. When you click on the buttons for 2 and 3, ALL three buttons move to a different part of the screen.
2. When you click on the button for 1, ALL three buttons return to their initial position.
Ideally, when the buttons move they would in fact travel across the screen rather than disappear for an instant and reappear in the new locations. Usually I would do this via a motion tween, but I can't figure out how to incorporate one here without conflicting with the other actions and thus messing everything up! I have to use a site structure similar to the one in the example because I need the intros/outros to be different for each mc.
I want to know the actionscript for when hovering over a button which is a picture, the whole screen fades into a translucent grey (with everything else still in the background) and have a larger version of my picture appearing on top of the grey. And when the mouse leaves the button, the grey and the larger version of the picture will fade out and return back to my original.
this works fine, just wondering if anyone has another way to handle it. it seems excessive to have 4 handlers for touch input, but i cant figure out any other way.
TOUCH_OVER and TOUCH_OUT check a switch statement to enable/disable buttons within buttonContainer.
TOUCH_BEGIN and TOUCH_END are used to store points and get a "swipe angle" (only if TOUCH_END is not over a button)
my only problem is i started having glitch's i think becuase so many listeners including: ORIENTATION_CHANGE, KeyboardEvents, Event.DEACTIVATE
this is why i ask if perhaps im missing someway to simplify the touch input listeners
I have an AIR application that will go full screen when the application starts: stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; The stage size is 2560 x 1024. And I have 2 moniters (1280 x 1024 , 1280 x 1024) When I start the application, it shows my application on one of my moniter only.
I need the left side of the stage to be shown in moniter 1 and right side of the stage to be shown in moniter 2. Currently, both sides are shown in moniter 1, and in moniter 2, it shows nothing but my default desktop. *The blue color line is a divider for better visual purpose. How do I make the left side of the stage to appear in moniter 1 and right side of the stage to appear in moniter 2 when the application starts in full screen mode?
Is a command for AS2 to make my movie file play fullscreen (stretch, fit to screen, anything).
goFullScreen(); is great but it leaves white bars left and right. What's odd is that I'm using Adobe Flash Media Live Encoder and it seems to display a perfect widescreen that I want as an input and output but once compiled in flash, it's more square leaving me with white bars left and right. The frame for the video in flash is also widescreen looking.
edit: I ended up stretching the width of the frame but if there is a better way through a command that would make my life easier so I don't have to adjust to every monitor that I run this on.
I have a few online magazines I run and I have noticed that when in full screen mode in Google Chrome, all my buttons, everything is disabled I just have a 'hand' for a mouse and nothing works.
My fullscreen option works on all other browsers its only Google Chrome it seems to of disabled any user interaction whilst in full screen mode.
I have tried searching but cant find any similar problems, and need this fixed ASAP. You Tube works in full screen mode on Google Chrome, so it cant just be a Google Chrome bug. Maybe there are some added security features you have to code for in Google Chrome.
Here is a link, make sure you are using Google Chrome or you wont replicate the error.
Try the navigation on the top bar, then click full screen top left, then notice how no buttons work anymore.
Im currently trying to create a type of speedometer thing which reacts via various buttons on the screen.I done a simple script for the needle to move so many degrees left or right but this simple script doesn't stop the needle from continuing to go to far left or right (min/max on dial). Is there a way of stoping the needle once it has reached say 10 degrees and 120 degrees?
My script is:
bad_btn.onPress = function (){ needle_mc._rotation +=16; } good_btn.onPress = function (){ needle_mc._rotation -=16; }
bad and good buttons determine the left and right Im also interested in whether once the needle has reached it max point this would trigger of another function etc
My question is what needs to be done in order to make a .swf file go into full screen without falling to a black screen when a movie is played? I have tried coding it, however I come up with the following error.
[Code]....
What should I do to fix this? This is not going to be an HTML file, however, so the initial thought of changing the publish settings does not seem to work this time.
I'm creating a flash site. I want the flash movie to fill the entire browser window. What size should I make the canvas, I've been experimenting with sizes and a canvas size of 750*370 fills my browser well on a resolution of 800*600
How do you accomodate different resolution settings? What's the most commonly used canvas size for this type of project.