ActionScript 3.0 :: How To Force Focus To The Component

Jan 8, 2010

I'm using a scrollpane component. Within it I have textfields with html text links. All works OK, but I have to click a link twice in order for it to work - the first click seems to "focus" the scrollpane component and then every click afterwards works OK. What's weird is other mouseevents - i.e. rollover/rollout - are working OK without clicking.Is there anyway to force focus to the component so I don't have to click twice?

View 0 Replies


Similar Posts:


Flex :: Force Component To Redraw It's Focus?

Mar 23, 2011

Suppose I have a component and want to change it's focus color at runtime. Here's an example for you (I've excluded any buttons and such to prevent component from losing it's focus, cause in that case it changes it's color perfectly):

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script><![CDATA[
private function init():void {

[Code].....

What do I want: How to make this focus to be redrawn without magic (I've tried all the methods, starting with "validate", I've tried calling updateDisplayList() on entire application, I've tried to call styleChanged .

View 1 Replies

Actionscript 3 :: Force / Lock Focus In It?

Feb 18, 2010

I want to create a dialog or alert box, where a DisplayObject would take and force the focus, until an okay button or something releases the lock.

View 3 Replies

ActionScript 3.0 :: Force Flash Player To Lose Focus (probably By A Hack) Without Using ExternalInterface?

May 21, 2010

I need to be able to make the flash player lose focus to the browser by actionscript alone (when the user clicks a button) or whatever, but from within the flash player, not from the user actually clicking outside of the flash player.These are embedded flash files with allowScriptAccess="never", so I can not use ExternalInterface at all to call browser js to window.focus or whatever.

View 0 Replies

Flex :: Force Redraw On Component?

Jan 10, 2011

I have an app w/ a login screen. When the user hits "enter", the state changes to "login" & a child component is triggered to load (though the child stays invisible at the moment). The child contains many functions that the user needs upon logging in (ie their screenname & settings are retrieved from a database). The following is included in 'Parent':

<local:comp id="localComp" includeIn="login" includeInLayout="false" visible="false"/>
<mx:Button label="login" click="currentState='login'"/>
<mx:Button label="logout" click="currentState='Default'"/>

My problem is when a user logs out (state changes to 'Default') & then logs back in (state changes back to 'login') the child doesn't get "triggered" again & the functions w/in the child don't reload. Is there a way to force my child to refresh?

Note: While it would be easier to just move the child's functions to the parent it is complex...I moved these functions to the child to make it easier to follow

UPDATE: I even tried adding an "exitState" to my state:

<s:State name="login" exitState="removeElement(localComp)" />

This doesn't work either, as I get an error: "RangeError: Index 0 is out of range."

UPDATE: Even though you are allowed to call a child's function from a parent, my problem is that the child needs to be "created" in order to not show errors. It makes no sense to me why the flex team would make something like removing & adding children so complicated.

View 3 Replies

Flex3 - Force Resizing Of TitleWindow Component?

Apr 13, 2011

I need some help forcing Flex3 to resize my TitleWindow component after an event.

My resize MXML looks like this:

<mx:Resize id="rs1" duration="1000"
heightTo="{radioVBox.y + radioVBox.height + 110}" />

How do I force it to resize after an event? I want to force the TitleWindow's height to change after the event in myFunc1 ends. private function myFunc1():void {

[Code]...

View 2 Replies

ActionScript 3.0 :: Force/override Slider Component Thumb Size?

Sep 2, 2008

I am attempting to reskin the AS3 Slider component to have arelatively "tall" draggable thumb graphic. However, the sliderthumb always seems to be forcibly scaled down to 13x13 regardlessof the size of the graphic. I'm currently using the drag-and-dropcomponent on workspace method, and double-clicked the livepreviewto change the skin pieces.I've tried resizing the contents of the SliderThumb_*Skin(upSkin, downSkin, ...) symbols, the Slider component itself on thestage, and even the placeholders on the double-click skin organizersheet. The height of the thumb object is not directly accessible(seems to be private). The translated position of the 13x13 thumbrelative to the symbol center is preserved correctly... but thesize seems to be stuck at 13x13.

Is there a workaround for this? I've searched and found a fewFlex solutions having to do with overriding a measure() method orextending the class to hard-code a different height, but none ofthe corresponding classes (e.g. one site recommended extendingmx.controls.sliderClasses.SliderThumb) seem to be accessible withinthe Flash AS3 implementation of the components.

View 2 Replies

ActionScript 1/2 :: Listbox Component Focus Rectangle

Jul 27, 2009

I am working on a selector that uses 2 list boxes. Standard stuff, you can move items from the left box with arrow buttons to the right box. However I can't seem to get the annoying green "halo" to go away whenever one of the boxes is selected. I have tried

lstbox._focusrect = false;
lstbox.enabled = false;
lstbox.setStyle("themeColor", "Sample");

Nothing seems to stop that highlight box from popping up. Funny thing is it doesn't pop up in the IDE only when I view the movie online in production.

View 1 Replies

ActionScript 3.0 :: Set Focus On TI Component Without Selecting Text?

Mar 19, 2010

Is it possible to set focus on a text input component that contains text without selecting the text? I want to be able to focus on the component and have the cursor flashing after the last letter in the field.I am currently using:myTi.setFocus();That correctly focuses myTi but it also selects all of the text currently in the field. What would I need to add to just have a cursor flashing at the end of the characters currently in myTi?

View 1 Replies

Flash :: TextInput Component Not Giving Up Focus?

Jan 31, 2010

I have a project where a big part of the UI a notebook, where the user enters text in a number of fields, for which it uses a series of TextInput components.Once the notebook is filled in the user switches to a screen where the inputs are disabled and they compare what they wrote to a 'model answer'.The problem is that the last TextInput to have focus at the time of disabling retains it - it appears disabled (greyed out etc) but if you type the letters appear in the field.I have tried variations on Selection.setFocus(null), and it seems that Selection.getFocus() returns null/undefined, but can still type into it. I can't select any of the other textfields, and clicking on other interactive elements - bottons etc doesn't seem to want to remove focus either.

UPDATE - Just to make sure there wasn't something crazy happening particular to this project, if I make a nude flash movie with a textInput and a button, then make the button set theTextInput.enabled = false, I can still type into the field. I can't see any way that's a feature.

View 2 Replies

Flex :: Set Focus On One Component Until User Enters Some Value

Oct 3, 2011

I am trying to write the code for making a text input control in flex. As the user enters the value in text input control and then if he removes the typed characters to make the text input blank, then I print error message via StringValidator. But I want the focus to be set on that text input only until the user enters anything. How can I achieve that?

View 2 Replies

ActionScript 3.0 :: Get Previous Focus Manger Component?

Feb 4, 2010

script for get Previous focus manager component.I know the script for get next focus focusmanager.getNextFocusManagerComponent();

View 0 Replies

ActionScript 3.0 :: Focus Not Working Properly Because Of Component?

Apr 4, 2009

I'm trying do a simple experiment here, coz I'm stuck with manage Focus because of the component.I'm trying :1. Put an Input Text to the stageYep, the focus works fine. If u click the input text>>the input text get focus, while u click the stage area outside the input text>>the input text lose focus , and so on.2. I put some component, i put a List comp.The focus just go mad, when u click the Input Text, then click stage/another object, the focus doesn't want to leave the Input text.How's that possible? There's no script totally.

View 2 Replies

Actionscript 3 :: Get Rid Of The Blue Focus Rectangle Of A Flash Component?

Dec 5, 2010

I burnt so much time on a costume made component which extends NumericStepper.Adobe should be ashamed.. The flash component quality is poor.Now I'm at stage that all I try to do is to disable the numericStepper's focus rectangle.I haven't found a thing that works, all of the solutions I came across were Flex related.To clarify : this is a pure flash ac3 project.. no flex involved.

View 2 Replies

Flex :: Determine Which (custom) Component In A View Currently Has Focus

Nov 28, 2011

I'm currently building a Flex 4.5 mobile project including several views and custom written MXML components that can be incorporated dynamically into those views.How do I determine which component currently has focus, namely has been activated by the user tapping on it? The background for this is a global search function in the main application. Depending on the results of this search, fields in the custom components are set. Given that I don't want all components in a view to listen to the outcome of that search function, I have to check which one is currently active.I'm trying to bind the selected object (the result from the search function) to the active component.

View 1 Replies

ActionScript 3.0 :: Figure Out The Instance Name Of The Text Area Component In Focus?

Mar 2, 2009

- I have two textArea components on the stage
- I need to figure out what textArea component is in focus when clicking on it

How do i make it so that it can figure out the instance name of the text area component in focus so i can preforme some code? I tried the following code but it doesn't seem to work.

[Code]....

View 3 Replies

Flex :: Make Background Fades When A Custom Component Is In Focus

Mar 26, 2010

I created a custom component that is a s:SkinnableContainer. I want the background and other items to fade out when this component is visible. Something similar to what happens when calling Alert.show(..) so the Alert box is in focus and everything else is faded out.

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.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 :: 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 :: 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

Flex :: 4 - Null-component - Checking If The Cancel Button Component In The Child Component?

Jun 23, 2011

I have a component "child" which has a cancel button. Now this component is placed in a state called "newChildComp" I also have another component called "parent". In the parent component, i have a button that dispatches an event. Here is the event code:

[Code].....

so, basically,i am checking to see if the cancel button component in the Child component, while i am still in the parent Compoent, was clicked, if it was clicked, call the cancelButtonHandler. The problem is by the time the addNewChild handles the event, that cancel button was still null. My question is how do i solve this without using the itemCreationPolicy on the cancel button?

View 1 Replies

Put Scroll Of Tree Component In Left Side Of Component Or Creating A Custom Scrollbar For Tree Component

May 20, 2009

is there any way to put scroll of tree component in left side of component or creating a custom scrollbar for tree component

View 13 Replies

Force A Swf To Loop?

Jan 18, 2010

I have a swf file. I don't have the flash file that goes with it. It is nothing but a holder for an flv or some flash-like movie format, and I can't extract it via importing, so all I get is blank frames. I just want to make it loop without paying hundreds for a swf decompiler.

View 2 Replies

IDE :: Force SWF Into Right X & Y Position?

Aug 24, 2009

how to force a SWF from Top left corner to the correct position.. I wonder if it goes off because this script Im using is used on another MC? Two same scripts conflicting each other? Im just guessing here. This is the SCRIPT im using to load the SWF:

[Code]...

View 1 Replies

ActionScript 2.0 :: Any Way To Force MC2 To Go Down Under MC1

May 10, 2005

What I am trying to do is to force MC's to press each other down after loading content.I have MC1, MC2, MC3 Each MC has dynamic text box with function content_txt.autoSize = true;� and each one is loading text content from XML files.Is there any way to force MC2 to go down, under MC1, depending of the size of loaded text in MC1? Something like: MC2._y = MC1.height + someNumberOfPixels

View 5 Replies

Way To Force File Refresh

Jul 9, 2003

I use "loadvars" to get the dynamic info for a flash homepage from a ".txt" file. How can I force browsers to download a fresh copy of ".txt" files every access?

View 4 Replies

Force A Radio Button?

Dec 1, 2010

I'm loading a text file and based on the settings in that, I need to change which radio button in a group is selected.

My structure is three buttons to a group. One button has an instance name of rb1 and the values are 1,0,-1.

I know to get the values I need the radiobuttonGroup, but I'm not having much luck setting the values.

rb1.value=0; // does not work

View 7 Replies

Any Way To Force Caching Of FLV Files?

Jul 21, 2011

Is there way force the browser to retain previously viewed FLV files? I've noticed using the normal netstream set-up that even if you've fully loaded and viewed a video it will have to load it again from scratch each time you come back to it. Shouldn't the file be in the user's cache?

View 1 Replies







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