ActionScript 3.0 :: Readonly Property Of TextInput?

Jan 24, 2009

I've got a small question. Is there a readonly property of a TextInput? (not just .enabled) And how do you do it then?

View 3 Replies


Similar Posts:


Flex :: Set Text Property On KeyDownHandler On TextInput?

Oct 11, 2011

I extended a mx.controls.TextInput to create a custom component with a different behavior.I'm trying to set the text property on the keyDownHandler(), and for some reason it doesn't work as I expected. The text on the component just kinda ignore the change.I'm using Flex 3.6.Down here is a simple example code that explains what's going on:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:customcomponent="com.test.customcomponent.*">
<customcomponent:TextTest x="20" y="20"/>
</mx:Application>

And below de AS class:

package com.test.customcomponent
{
import flash.events.KeyboardEvent;

[code]....

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

ActionScript 3.0 :: Dynamic ReadOnly Text Box?

Jul 28, 2009

I have a dynamic text in my project.

Code:
var textInput:TextField = new TextField();
textInput.type = TextFieldType.INPUT;

[code]........

View 4 Replies

Html :: Input Elements In HTMLLoader Are Readonly In Adobe AIR

Oct 10, 2011

Lets say i have a html file that contain a form:

<form method="post" action="url">
<input type="text" id="fullname" />
<input type="text" id="bodyText" />
<input type="submit">
</form>

we have load this html file using HTMLLoader inside an swf file.

_htmlLoader = new HTMLLoader();
_htmlLoader.paintsDefaultBackground = false;
var req:URLRequest = new URLRequest(urlValue);
_htmlLoader.load(req);
_stage.addChild(_htmlLoader);

After loading this Swf file using Loader inside main application, text boxes are readonly and can't type in it. But we can change focus of them using Mouse.

var loader1:Loader = new Loader();
loader1.load(new URLRequest("path to file.swf"));
// ...
this.addChild(loader1);
// ...

View 1 Replies

Flex :: Changing Value Of DateField.text Property Setting SelectedDate Property To Null?

Jul 26, 2011

Setting the text property of a flex DateField makes the selectedDate property of that DateField go to null.I need to set the text property so that I can use a particular format (DD-MMM-YYYY).

View 2 Replies

Flex :: Binding - Bind Property Of View To Property Of Class Using MATE?

Jan 9, 2011

Lately i discovered MATE (for Flex development) and was wondering: how do i bind a property in a view (actually a navigatorcontent component) to another property in a class so that they stay in synchronization (meaning that whenever the property in the class changes the property in the view also changes).

So if we have a view called Target.mxml and a property targertProp how do we bind it to the class called SourceClass with property SourceProp?

View 3 Replies

ActionScript 3.0 :: Accordion Control - Difference Between SelectedChild Property And SelectedIndex Property?

Sep 16, 2009

What's the difference between selectedChild property and selectedIndex property? I read the documentation, both seems to be setting currect active accordion. selectedChild can be only used in actionscript, but other than this, what's the difference?

View 0 Replies

Flex :: Change The Value Of The Source Property To Destination Property?

Sep 20, 2011

Can we put [Bindable] on functions/methods? I know that bindable is used to change the value of the source property to destination property. But not sure if we can use that for methods. why we cannot put/ if we can then what will be the outcome?

View 1 Replies

Actionscript 3 :: Getting The Value Of A Property Within Another Property Via Square Bracket Notation

Nov 29, 2011

I have a class Inhabitant with a property skin which is of type DisplayObject.

Within Inhabitant I need to access the x and y properties of skin using this method:

this["someProperty"];
Rather than:
this.someProperty;

This is fine with properties defined within Inhabitant but I'm not sure how I could do this for a property of skin. This obviously doesn't work but it might give you an idea of what I'm trying to do:

this["skin.x"];

The reason behind requiring this notation is that I have a function which I can parse a String though that will represent a property:

public function addTokenable(property:String):void
{
if(!isTokenable(property))
_tokenables[property] = true;
}

And then a related getter that will return a representation of this instance of Inhabitant as a String:

public function get token():String
{
_token = "class:" + getQualifiedClassName(this).split("::").join(".");

[Code]....

View 1 Replies

Flex :: Bind A Property To A Flash Property?

Jan 23, 2010

I'm wondering if there is a way I can bind a flex property to flash property?, the flash property is inside a swc file created in flash with the Flex Component Kit for Flash Professional, I can manipulate the flash component as a regular flex component, but I want to bind their properties, is there a way?

View 1 Replies

Take Data From TextInput Box

Nov 15, 2009

I want to take data from TextInput box and hold it in a varaible "X" Is there any tutorial I can use to help me?

View 2 Replies

Set Variable From Textinput?

Dec 29, 2010

Firstly, I have searched the forum for related topics and found 2. I have tried to make sense of the code involved to make it work with my current project but nothing works.

As the title says, I require a string to be given the value from a textinput. As this was not working in my main project I created another simple AS3 file.

The user should just type in their name in scene 1. By pressing a button I trace the variable as a test and on scene 2 I should see the users name, but no.

View 1 Replies

TextInput Becomes Uneditable After Set With AS2.0?

Jun 10, 2009

I have added a TextInput component to my movie and named the instance "fname".I use the following simple code...
 
fname.text = "test";
 
Problem is that once the text is set using AS2.0 it becomes un-editable and a user cannot change it.

View 2 Replies

AS2 :: Access A TextInput Using Its Name?

Sep 28, 2009

I want to change the text of a TextInput using its name for example.
 
("name1").text = "123"
 
or is it possible to create an array of components?:
 
txt[0].text = "123"

View 1 Replies

ActionScript 2.0 :: Access TextInput Using Its Name?

Sep 29, 2009

I want to change the text of a TextInput using its name for example.

for(i=0;i<10;i++){
("name"+i).text = "123"
}

[Code].....

View 1 Replies

Flex :: TextInput Has Become Uneditable?

Mar 4, 2010

I have been developing an application for the past couple of weeks and as of yesterday all of the textinputs have become uneditable. It seems like when you click on one it switches between the focusIn state and then back to the focusOut state.

View 2 Replies

Flex :: TextInput - Component Goes Out Of Another One

Aug 31, 2010

If I drag a textInput from a component and drop it near the end of the another component, the textInput goes outside of the dropZone.
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="[URL]"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="150" height="500" xmlns:components="components.*" >
[Code] .....

View 2 Replies

Flex :: Caret On TextInput Never Goes Away

Jan 29, 2011

I have a login form with various textInputs and a submit button. If you submit proper login credentials the system unloads the login view and loads the app view. Pretty standard. Unfortunately I've noticed this weird bug where if you hover over one of the textInput boxes with the mouse, then fill the form using only the keyboard (and leave the mouse parked on top of the textInput), and then tab to the submit button and press the space bar, i.e. login via keyboard, the mouse cursor will remain a caret in the new view, no matter what you do (move, click), until you find another textInput to undo the cursor state. I've tried to do all sorts of stuff via CursorManager but nothing seems to do the trick. I've tried dispatching events ROLL_OUT or MOUSE_OUT events to the textInput but that doesn't do the trick either.

View 2 Replies

Flex 4.6 TextInput Keyboard On IOS?

Dec 12, 2011

I have migrated my app from Flex 4.5.1 to Flex 4.6 and the TextInput click event was broken so I do this « skinClass="spark.skins.mobile.TextInputSkin" » (like was suggest here [URL]..and all seems work (tested in my Android and seems ok) but one user with iOS 5.1 complained that now the keyboard dont popup ?

Also complained for the TextArea that I dont have code in my extended component but also use the skin spark.skins.mobile.TextAreaSkin so the layout became similiar in my textinputs.

View 1 Replies

ActionScript 3.0 :: Add A Default Value On TextInput?

Jun 29, 2009

Any way to add a default value on TextInput.

View 4 Replies

ActionScript 3.0 :: Cannot Access TextInput?

Jan 28, 2010

I have an as3 class, and a flash movie with various things on it. I'm trying access a TextInput called poem_line. This is laid out on a frame (named 'gameroom') inside my scene.It accessible from certain functions inside the class. Working function:

Code:
public function onPublicMessageEvent( e:PublicMessageEvent ):void
{

[code].....

View 2 Replies

ActionScript 2.0 :: Getting Initials From TextInput?

Jan 1, 2004

When a person writes his/hers name in a textinput, I want to have a script in the "on (focusOut)" that selects the initials of the person and puts them in the variable "initials".Is it do-able? Let's say the person is called "John Doe". Then the value of "initials" would be "JD".It must also work on names like "John von Doe" (the initials would still be JD and not JvD).

View 5 Replies

ActionScript 2.0 :: Unable To Get The Value In TextInput?

Jul 10, 2005

I use TextInput component to capture user's info for my contact form and invoke an asp file to send out the mail. But value entered in the TextInput somehow is not passed to ASP. The following is my code:

on(click){
var LastName = this._parent.txtLastName.text;
trace(LastName);
this._parent.loadVariables("email.asp", "POST");
}

View 14 Replies

ActionScript 3.0 :: Get The Height Of A TextInput Box?

Apr 27, 2009

I'm trying to get the height of a TextInput box (or any component for that matter) that is nested with in MC.When trace the height of the TextInput directly, it comes out at 22, great! But when I trace the height of the MC it's 100pixels

[Code]..

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

ActionScript 2.0 :: Getting Initials From TextInput

Jan 1, 2004

This is what I'm trying to do:

When a person writes his/hers name in a textinput, I want to have a script in the "on (focusOut)" that selects the initials of the person and puts them in the variable "initials".

Is it do-able? Let's say the person is called "John Doe". Then the value of "initials" would be "JD". It must also work on names like "John von Doe" (the initials would still be JD and not JvD).

View 5 Replies

ActionScript 3.0 :: Getting TextInput From An Added Child?

Jun 24, 2010

So when you win my game I add a movieclip that will let you enter your name through a text input component. Unfortunately, I'm calling it wrong.

I'm getting an undefined property error because it's out of the youWon function, right? You'd think I'd understand this concept eventually!

[Code]....

View 2 Replies

ActionScript 3.0 :: Setting BackgroundColor Of A TextInput?

Feb 9, 2009

I've already tried a lot, but there was no way I could change the color of my textInput. Adobe Livedocs couldn't help me and there was no working piece of code I could find in other messageboards.

These things haven't work for me:

myTextInput.setStyle("backgroundColor", 0xFFF00);
--
myTextInput.setstyle("backgroundColor", Number(0xFFF00));
--
myTextInput.setstyle("backgroundColor", "#FFF00");

Do I have to do something about the border of the textInput. Or about the "background"-Property (if it still exists for AS3)??

View 9 Replies

ActionScript 3.0 :: Enable Enter In A TextInput?

Nov 30, 2009

I have a TextInput component and a Button component. When I push the button, all the text in TextInput  is wrote on a server side txt file.

textInput=new TextInput();addChild (textInput);
writeBtn=new Button();writeBtn.addEventListener (MouseEvent.CLICK,writeFile);addChild (writeBtn);

[code].....

View 12 Replies







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