Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Refrencing runtime textinput fields Flex 3

Posted on 2010-01-06
Medium Priority
Last Modified: 2013-11-11
I am trying to create a flex form that has a simple add field button that adds textinput or textfields  and a save button that sends out the values of the fields that have been dynamically created.
I can handle the php side of it but I was wondering if anyone out there can help me on this or direct me to any examples.

Thanks everyone in advance.
Question by:arashaga
  • 2

Expert Comment

ID: 26192359
well correct me if I am getting this wrong... but I have a solution that might be simpler than using dropTarget.
here it goes:

- you want to say "correct" when the dial is turned to a certain angle... right?
so you can just check the rotation property of the dial Sprite/Movieclip ?

    check rotation of dial
    if rotation is within acceptable range
         say "correct!"

You could store the acceptable rotation-range as two variables: min   and   max for example and check against those!

should work right?
and then you dont need to care about droptarget at all!

Expert Comment

ID: 26192371
something went wrong. this is not the correct thread that I wanted to post in. sorry. forget about above comment
LVL 11

Accepted Solution

vindys80 earned 2000 total points
ID: 26196806
If you need the answer you can take this.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        	import mx.controls.Alert;
			private function addButton(event:MouseEvent):void{
				var textInput:TextInput = new TextInput();
			private function sendValues(event:MouseEvent):void{
				var strResponse:String = "";
				for( var i:int =0; i< textContainer.numChildren; i++){
					trace("Text at " + i + "= " + TextInput(textContainer.getChildAt(i)).text)
					strResponse += "Text at " + i + "= " + TextInput(textContainer.getChildAt(i)).text + "\r";
	<mx:VBox id="textContainer">
		<mx:TextInput id="basicText"/>
		<mx:Button label="Add Button" click="addButton(event)"/>
		<mx:Button label="Send Values" click="sendValues(event)"/>

Open in new window


Author Closing Comment

ID: 31673559
thank you very much I was going nuts figuring it out that's why I resorted to datagrid and had a new problem with that also. I have posted a separate question for that issue.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question