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

x
?
Solved

Refrencing runtime textinput fields Flex 3

Posted on 2010-01-06
4
Medium Priority
?
446 Views
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.
0
Comment
Question by:arashaga
  • 2
4 Comments
 
LVL 5

Expert Comment

by:NiklasMoller
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 ?

pseudo-code:
onDragRelease
    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!
0
 
LVL 5

Expert Comment

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

Accepted Solution

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

Thanks,
Vindys
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    
    <mx:Script>
        <![CDATA[
        	import mx.controls.Alert;
			private function addButton(event:MouseEvent):void{
				var textInput:TextInput = new TextInput();
				textContainer.addChild(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";
				}
				Alert.show(strResponse);
			}
        ]]>
    </mx:Script>
    
	<mx:VBox id="textContainer">
		<mx:TextInput id="basicText"/>
	</mx:VBox>
	<mx:HBox>
		<mx:Button label="Add Button" click="addButton(event)"/>
		<mx:Button label="Send Values" click="sendValues(event)"/>
	</mx:HBox>
</mx:Application>

Open in new window

0
 
LVL 1

Author Closing Comment

by:arashaga
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.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/Flex/Q_25025034.html
0

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