Refrencing runtime textinput fields Flex 3

Posted on 2010-01-06
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
    LVL 5

    Expert Comment

    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!
    LVL 5

    Expert Comment

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

    Accepted Solution

    If you need the answer you can take this.

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="">
            	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

    LVL 1

    Author Closing Comment

    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

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
    Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
    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.
    The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now