Flex :: Keep Focus On Spark TextInput After Setting StageWebView Source?

Jan 15, 2012

I have a mobile application that has a Text Input used for searching. Below the search TextInput is a StageWebView. When I set the source of the StageWebView using loadURL() the key input is shifted to the StageWebView. How can I prevent this?

View 2 Replies


Similar Posts:


Flex :: Setting Focus On A Popup's TextInput Control?

Jul 27, 2010

I'm trying to have a popup window with an immediately editable TextInput. This means that the user should be able to type inside the TextInput once the popup is displayed.

The problem is that I can't focus on the textInput. What happens is that when pressing a key for the first time, no text is inserted, only after a second key is pressed does the component gain focus and the user is able to type. For instance, typing "test" once the popup opened results in "est" being displayed...

For some reason the component only gains focus when the user explicitly clicks on it or types something. Programmaticaly setting the focus does not work.

Code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Panel xmlns="mog.miss.component.*" xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>

[Code].....

View 3 Replies

Flex :: AIR Set Focus On Textinput On Application Load?

Dec 22, 2009

On my application I have a login form. On application start, I want the focus/selected one is set on the user id textinput. I tried normal setFocus method and didnt worked. How can i make it work?

View 1 Replies

Flex :: Trigger Mouseevent When The Focus Is On TextInput?

Jul 29, 2010

In flex, I am using the following:

mx:TextInput mouseOver="tester(event)"

It works fine. My pointer goes over the textInput and it calls the function. But when I click inside the textInput to enter some text( focus is on the textInput) and then move the mouse (not taking mouse pointer outside of the boundary of textinput), the mouseover event is not trigerred.

If I use click event, then even if I am entering text ( or the focus is on the textinput) and then click, it will call the function.

How can I call the tester function on mouseover when the focus is on textInput?

View 1 Replies

Flex :: ErrorSkin On Spark TextInput Validation?

Mar 14, 2011

I might be taking crazy pills but has anyone actually gotten the errorSkin feature to work? I am not doing anything crazy, just extending TextInput (spark) and setting the errorSkin property.I have tried creating a skin using SparkSkin, did nothing.I have tried creating a skin using ProgrammaticSkin, did nothing.TextInput is always a red border. I know you can set errorColor and errorString but I am obviously looking to do more than just change the color of the border. I am compiling using Flex 4.1.

Implimentation:
<components:PromptedTextInput id="txt"
width="200"

[code].....

View 2 Replies

Flex :: Spark TextInput Incomplete Value Using Barcode Reader?

Jul 21, 2010

working with Flex4 AIR app, using this component I get data from the barcode reader,

<s:TextInput id="barcode" enter="showBarcode()"/>

Then for handle the enter event, wich is automatically triggered when reader finishes its reading

private function showBarcode():void{
Alert.show(barcode.text);
}

Ok, very simple. But my problem is: the text showed in the Alert Box is incomplete, it misses one or two digits (last) or it just shows the entire text in the TextInput component (correct view)

I already test my BC reader using the notepad, and it's fine.

I have tested same code using MX components in Flex3 web app, and there's no problem.

View 3 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

Flex :: Get Actual Text Width In Pixel Of Spark TextInput?

Dec 21, 2010

As textWidth property is no more accessible in spark textinput how we can get that property ?

View 1 Replies

Actionscript :: Flex - Add Search Icon Inside Spark TextInput?

May 11, 2011

I want to add search icon inside the spark TextInput control. Is there a way by which I can extend the TextInput control and add a child to it.

View 1 Replies

Actionscript 3 :: Flex Spark Textinput Prevents Component To Be Collected By GC

Mar 28, 2012

I've got a custom component (quite complex so I can't post any code here, although that shouldn't matter), that I can add to a view. When the component is deleted from the view or the view is switched I call my own dispose method which removes remaining eventListeners and kills some references so that the component can eventually be nulled and collected by the GC.

All that works perfectly fine until I add a Spark TextInput to the MXML part of the component (it took me hours to find out what is preventing the component to be collected!), so I recon that the TextInput somehow automatically adds some eventListeners.

My question is what are these listeners, or is there anything else I haven't thought of?

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 3 :: Flex TextInput Left Click - Parent Steals Focus

Jun 11, 2009

I have having a problem in my flex/air application, in which when the left mouse button is clicked on a TextInput the focus is stolen by the parent. So in more detail I have an hierarchy as follows...

[Code]...

View 2 Replies

ActionScript 3.0 :: Spark Scroller, Switch Focus To Spark View But It Still Scrolls

Jan 26, 2012

I am working on a drag and drop feature for the sparkScroller. This is sort of how my layout looks:
 
<mx:Canvas>
<s:Scroller id="items" .. />
<mx:Box id="dummyRow" visible="false" />
<s:View id="touchView" visible="false" />
</mx:Canvas>
 
So when you hold your finger over a row in the items Scroller for more than a 30 seconds, the touchView becomes visible so does the dummyRow. The dummyRow gets populated to look like the row which you held your finger over.
 
So the touchView has the event handlers for moving your fingers and places the dummyRow where your finger is. The problem I am having is even though the touchView is reacting to my move events, the scroller still keeps reacting to my move events as well even though it's a sub layer. Because I started on the scroller it still keeps track!
 
How can I remove focus / tracking from the scroller?

View 1 Replies

Flex :: Spark Skins : Blue Drop Shadow On Focus?

May 26, 2010

I'm currently experimenting flex 4 skinning. I successfully skinned most of the components i need for my application, but i can't find a way to avoid this damn blue drop shadow which is displayed when u'r focused on a textfield or a combobox.

View 1 Replies

Flex :: Spark List Itemrenderer Focus Defaults The CurrentState

Dec 29, 2010

I am using a spark list control with an itemrenderer. Whenever I set an itemrenderer's currentState, the moment I mouse out of the itemrenderer, it gets reset to its default state. How can I make an itemrenderer keep its currentState unless I explicitly tell it to change?

View 1 Replies

Actionscript 3 :: Flex TextInput With Default Mobile Skins Automatically Regains Focus On Callout Close?

Feb 20, 2012

I'm working on a simple auto complete function for my Flex mobile app. For that I've got a CalloutButton that triggers a Callout.The Callout holds some lists from which the user can select items. On item select, the callout gets closed (calloutButton.closeDropDown())The very same behavior is done for a TextInput. The user inputs text, the callout opens and according to the entered text, the lists change. Works fine so far. Now, when the user selects an item from any of the lists, the callout closes. Also fine.Now the issue, after the callout is closed, the TextInput automatically regains focus.On a mobile device this is more than disturbing.

I narrowed this behavior down to the mobile TextInput skin spark.skins.mobile.TextInputSkin) since a TextInput without this skin class doesn't show this behavior.Now you might say just use the default skin instead but unfortunately I can't. The default skin has a bug with Android devices that doesn't pass though the enter event. That I could live with since I'n not necessarily dependent on the enter event, however, the spark mobile skin allows be to continue entering text in the TextInput even after the callout has been opened, which is desperately needed as the lists change according to the entered text.I can't provide any code as the problem has been narrowed down to the skinClass, thus should not be in my own code. Believe me, I tried every nice and not so nice method to prevent the TextInput from getting focus again, but nothing worked.

Edit:Below the steps of my application's behaviour. (to be fair, the workflow inside the callout is a little more complex, I'm working with several lists and a SplitViewNavigator here (thus can't use the Flextras autocomplete), but that doesn't affect the TextInput focus issue I'm facing).ter text in TextInputOn key change a Callout with two Lists is opened.The first List receives results according to the entered text from a webserviceUser selects item from listSecond list receives results according to selection from first list from webservice User selects item on second listCallout closes

View 1 Replies

ActionScript 3.0 :: Setting Character Encoding To UTF-8 In AIR Or StageWebView?

Feb 28, 2012

I'm making an AIR app that uses StageWebView to display an external html page.  The external page displays Spanish accented characters fine in browsers, but they show up as �� in AIR.Is there a setting available that I'm unaware of for setting character encoding to UTF-8 in AIR or StageWebView?Here's my code:
 
var webView:StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle( 660, 180, 335, 480);

View 4 Replies

Flex :: TextInput - Setting Text Property Before Object?

Sep 30, 2009

I'm trying to convert an MXML component to an ActionScript Class. The component consists of a Form with a TextInput, TextArea, and two buttons - Save and Cancel, and a Validator for the TextInput, and other logic to handle events that occur. This component is currently extended by several other components. Now, in the MXML component binding the TextInput text property to a property in an Object was very easy:
<mx:TextInput text="{_itemToEdit.name}" />

But in ActionScript, I'm creating the TextInput and setting the text property before the Object is set, and the TextInput is not being updated:
public var itemToEdit:Object = {};
private var nameInput:TextInput = new TextInput();
public function MyClass() {
nameInput.text = itemToEdit.name;
}

How can I make sure that the TextInput text property is bound to the specified property in the Object?

View 4 Replies

Flex - Setting Focus On A List ItemRenderer With TextArea Inside?

Oct 29, 2010

I've wrote a custom itemrenderer for a List component (Flex 3.5) which is a VBox with a Label and a TextArea wrapped inside. All works fine so far but I want the TextArea in the first itemrenderer to receive focus so that it instantly becomes editable when tabbing onto the List. Is that possible and if how would I achieve this?

I've already added an event listener that selects the item at index 0 but the textArea in it should also be focussed at that moment _list.addEventListener(FocusEvent.FOCUS_IN, onListFocusIn);

private function onListFocusIn(e:FocusEvent):void
{
_list.selectedIndex = 0;
}

View 1 Replies

Flex :: Resizing A Spark Group By Setting Width And Height?

Apr 28, 2011

I have been given the seemingly simply task of resizing a Group container by setting width and height explicitly in response to user interaction. However, changing these values have no effect on the size of the container at all. Changing scaleX and/or scaleY will change the size of the container just fine, but this is not the behavior I am after.I have tried overriding updateDisplayList() to set a specific width and height, but this has not yielded the desired results.

<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="ns.adobe.com/mxml/2009" ;
xmlns:s="library://ns.adobe.com/flex/spark"

[code]......

View 2 Replies

Flex :: Embedding .ttf Font In Spark TextInput "prompt"?

Dec 10, 2011

This is what i have:

Main.mxml:

<fx:Style source="Main.css"/>
<s:TextInput x="72" y="95" focusColor="#CECB02" prompt="E-mail: "
skinClass="components.TextInputSkin"/>

[code]....

So, the "promptDisplay" in a computer(online) that does not have "Acens.ttf" installed shows the predefined one, but the inputed text is showed correctly with the embeded font!

View 1 Replies

Flex :: Setting Spark DataGrid Column's Default Sort On Application's CreationComplete

Sep 8, 2011

I have a spark DataGrid component with several columns and I want to have my application default to descending order on the first column in the DataGrid. I would like to use the built-in default sort that occurs when clicking the top header once. I have no need to sort the ArrayCollection I'm working with or change what the comparators are.I also want any user-generated sorting such as clicking on a different column's header to override the default sorting.

View 1 Replies

ActionScript 2.0 :: TextInput Not Getting Focus?

Jul 23, 2010

I have a movie that has been working fine until FP10 (3 years plus ). The issue is that a textinput field only gets focus on the first load of the movie. Subsequent loads none of the text input fields get focus, even when stepping through the movie focus is not automatically set. Unless the cache is cleared and the movie reloaded from our website.

I can reproduce it over and over, by clearing the cache movie works, all loads afterwards textinput boxes do not get focus.

Same results in IE 8, FF3 and Chrome. All using the latest flash player 10,1,53,64

It suggests a timingcode loadexecute issue ... introduced in FP10, but how to get around it ?

I am just embarking on a rewrite in Flex but that is some way off yet and something as simple as setting focus to the next field to be filled in affects the user experience.

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

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

ActionScript 2.0 :: Removing Focus From TextInput & TextArea?

Apr 10, 2008

trying to remove the green focus highlight from the TextInput & TextArea fields in a form.

View 2 Replies

Flash :: Set Style And Disable Focus For ALL TextInput Components?

Aug 24, 2011

How to "setStyle" and "disable focus" (remove the default blue line rectangle when focus) for "ALL" AS3 TextInput components?

View 1 Replies

Flash :: Give Focus To A TextInput Programmatically In Actionscript 2?

Nov 17, 2011

I am trying to write a small piece of Actionscript that gives focus to a TextInput. The reason being, I don't want my user to have to click into the text field to see the cursor and start typing, it should just already be there.

View 1 Replies

Actionscript 3 :: Multiple Text Color In One Spark:TextInput

Apr 10, 2012

How can I color words in spark:TextInput with two or more colors? I did it with mx:TextInput with htmlText property but i can not find it in spark component.

View 1 Replies

Actionscript 3 :: Extending Spark TextInput To Auto-resize?

Apr 20, 2010

have a Spark TextInput control but I haven't figured out a way to make is auto-resize...Does anyone have any code to get started?

View 1 Replies







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