Note that there are some explanatory texts on larger screens.

plurals
  1. POmx custom component not working in flex
    primarykey
    data
    text
    <p>I want to create flex application by which i can verify user age i have use following code can u tell me why i cant see mx component "dialogtitle","dialogcontent""dialogbutton"</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;mx:VBox creationComplete="{initComponent();}" height="219" width="560" xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:components="components.*" xmlns:local="*"&gt; &lt;mx:Script&gt;&lt;![CDATA[ import com.people.classes.*; import com.people.interfaces.*; import com.people.utils.*; import flash.events.*; import flash.utils.*; import mx.binding.*; import mx.containers.*; import mx.controls.*; import mx.core.*; import mx.events.*; import mx.styles.*; import components.DialogTitle.*; import components.DialogContent.*; private var birth_str:String; private var _controller:IControlManager; private var testDate:Date; private var i:int; private var ageErrorTimer:int = 0; public function _AgeVerify_Spacer1_c() : Spacer { var _loc_1:* = new Spacer(); _loc_1.height = 14; if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function _AgeVerify_HBox1_c() : HBox { var _loc_1:* = new HBox(); _loc_1.percentWidth = 100; _loc_1.setStyle("horizontalAlign", "center"); if (!_loc_1.document) { _loc_1.document = this; } _loc_1.addChild(_AgeVerify_VBox2_c()); _loc_1.addChild(_AgeVerify_VBox3_c()); _loc_1.addChild(_AgeVerify_VBox4_c()); return _loc_1; }// end function public function _AgeVerify_Label4_c() : Label { var _loc_1:* = new Label(); _loc_1.text = "Year"; if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function _AgeVerify_Label6_i() : Label { var _loc_1:* = new Label(); ageError = _loc_1; _loc_1.visible = false; _loc_1.text = "You have supplied an incorrect date. Please try again."; _loc_1.setStyle("paddingLeft", 19); _loc_1.setStyle("fontSize", 12); _loc_1.setStyle("color", 16711680); _loc_1.id = "ageError"; if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function _AgeVerify_VBox3_c() : VBox { var _loc_1:* = new VBox(); _loc_1.setStyle("horizontalAlign", "center"); _loc_1.setStyle("verticalGap", 1); if (!_loc_1.document) { _loc_1.document = this; } _loc_1.addChild(_AgeVerify_Label3_c()); _loc_1.addChild(_AgeVerify_ComboBox2_i()); return _loc_1; }// end function public function _AgeVerify_Label2_c() : Label { var _loc_1:* = new Label(); _loc_1.text = "Month"; if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function _AgeVerify_ComboBox1_i() : ComboBox { var _loc_1:* = new ComboBox(); months = _loc_1; _loc_1.width = 60; _loc_1.setStyle("fontSize", 11); _loc_1.id = "months"; BindingManager.executeBindings(this, "months", months); if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function _AgeVerify_ComboBox3_i() : ComboBox { var _loc_1:* = new ComboBox(); years = _loc_1; _loc_1.width = 100; _loc_1.setStyle("fontSize", 11); _loc_1.id = "years"; BindingManager.executeBindings(this, "years", years); if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function _AgeVerify_Spacer2_c() : Spacer { var _loc_1:* = new Spacer(); _loc_1.height = 13; if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function _AgeVerify_Label3_c() : Label { var _loc_1:* = new Label(); _loc_1.text = "Day"; if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function initComponent() : void { dialogButtons.addEventListener("onOK", onOK); var _loc_1:* = new Date(); i = 0; while (i &lt; 31) { days_arr.push((i + 1)); var _loc_3:* = i + 1; i = _loc_3; } i = 0; while (i &lt; 12) { months_arr.push((i + 1)); var _loc_3:* = i + 1; i = _loc_3; } i = _loc_1.getFullYear(); while (i &gt; 1899) { years_arr.push(i); var _loc_3:* = i - 1; i = _loc_3; } days.selectedIndex = 0; months.selectedIndex = 0; years.selectedIndex = 0; return; }// end function public function _AgeVerify_Label5_i() : Label { var _loc_1:* = new Label(); underAge = _loc_1; _loc_1.visible = false; _loc_1.setStyle("paddingLeft", 19); _loc_1.setStyle("fontSize", 12); _loc_1.setStyle("color", 16711680); _loc_1.id = "underAge"; BindingManager.executeBindings(this, "underAge", underAge); if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function _AgeVerify_Label1_i() : Label { var _loc_1:* = new Label(); _AgeVerify_Label1 = _loc_1; _loc_1.setStyle("fontSize", 13); _loc_1.setStyle("fontWeight", "bold"); _loc_1.setStyle("color", 7105644); _loc_1.id = "_AgeVerify_Label1"; BindingManager.executeBindings(this, "_AgeVerify_Label1", _AgeVerify_Label1); if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function _AgeVerify_Canvas1_c() : Canvas { var _loc_1:* = new Canvas(); if (!_loc_1.document) { _loc_1.document = this; } _loc_1.addChild(_AgeVerify_Label5_i()); _loc_1.addChild(_AgeVerify_Label6_i()); return _loc_1; }// end function public function _AgeVerify_VBox2_c() : VBox { var _loc_1:* = new VBox(); _loc_1.setStyle("horizontalAlign", "center"); _loc_1.setStyle("verticalGap", 1); if (!_loc_1.document) { _loc_1.document = this; } _loc_1.addChild(_AgeVerify_Label2_c()); _loc_1.addChild(_AgeVerify_ComboBox1_i()); return _loc_1; }// end function public function _AgeVerify_VBox4_c() : VBox { var _loc_1:* = new VBox(); _loc_1.setStyle("horizontalAlign", "center"); _loc_1.setStyle("verticalGap", 1); if (!_loc_1.document) { _loc_1.document = this; } _loc_1.addChild(_AgeVerify_Label4_c()); _loc_1.addChild(_AgeVerify_ComboBox3_i()); return _loc_1; }// end function public function _AgeVerify_ComboBox2_i() : ComboBox { var _loc_1:* = new ComboBox(); days = _loc_1; _loc_1.width = 60; _loc_1.setStyle("fontSize", 11); _loc_1.id = "days"; BindingManager.executeBindings(this, "days", days); if (!_loc_1.document) { _loc_1.document = this; } return _loc_1; }// end function public function onOK(event:Event) : void { var event:* = event; testDate = new Date(years.selectedItem, (parseInt(months.selectedItem.toString()) - 1), days.selectedItem); if (testDate.getFullYear() == years.selectedItem &amp;&amp; testDate.getMonth() == (parseInt(months.selectedItem.toString()) - 1) &amp;&amp; testDate.getDate() == days.selectedItem) { birth_str = months.selectedItem + "/" + days.selectedItem + "/" + years.selectedItem; if (Formatters.getYearsOld(birth_str) &lt; 13) { ageError.visible = false; underAge.visible = true; if (ageErrorTimer &gt; 0) { clearTimeout(ageErrorTimer); } ageErrorTimer = setTimeout(function () : void { ageError.visible = false; underAge.visible = false; return; }// end function , 6000); } else { _controller.updateAge(birth_str); visible = false; } } else { underAge.visible = false; ageError.visible = true; if (ageErrorTimer &gt; 0) { clearTimeout(ageErrorTimer); } ageErrorTimer = setTimeout(function () : void { ageError.visible = false; underAge.visible = false; return; }// end function , 6000); } return; }// end function ]]&gt;&lt;/mx:Script&gt; &lt;mx:DialogTitle title="Age Verification Needed" width="172" height="45"/&gt; &lt;mx:DialogContent children="[_AgeVerify_Label1_i(), _AgeVerify_Spacer1_c(), _AgeVerify_HBox1_c(), _AgeVerify_Spacer2_c(), _AgeVerify_Canvas1_c()]"/&gt; &lt;mx:DialogButtons id="dialogButtons" okCaption="CONTINUE"/&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload