private function emailButtonClickHandler (event:MouseEvent):void { var msg:String = "You can use the navigateToURL() method to open a URL" msg += " using a call similar to the following:\r\r"; msg += "navigateToURL (new URLRequest ('mailto:comments@somewhere.com'));";
Alert.show (msg); }
]]> </mx:Script>
<mx:Panel title="Leave a comment" left="10" top="10" right="10" bottom="10" layout="absolute" > <mx:Text text="Fill out this form to leave us a comment:" width="250" x="10" y="10" fontWeight="bold" /> <mx:Label text="Name:" x="10" y="38"/> <mx:TextInput id="userName" y="36" right="10" left="90"/> <mx:Label text="Email:" x="10" y="68"/> <mx:TextInput id="userEmail" y="66" right="10" left="90"/> <mx:Label text="Comment:" x="10" y="129"/> <mx:TextArea id="userComment" left="10" right="10" height="109" bottom="40"/>
<mx:CheckBox id="hideEmail" y="103" left="90" label="Hide my email address" selected="true" />
// A data provider created by using ActionScript [Bindable] private var subscriptions:ArrayCollection = new ArrayCollection ( [ {data:0, label:"Print"}, {data:1, label:"Website"}, {data:2, label:"RSS (text)"}, {data:3, label:"Podcast"} ] );
var selectedSubscriptionItems:Array = userSubscriptions.selectedItems; for ( var i:String in selectedSubscriptionItems) { // Display the selected subscriptions, separated by commas userDetails += selectedSubscriptionItems[i].label + ", "; } // Remove the last comma and space from the string we're displaying userDetails = userDetails.substring(0, userDetails.length-2);