ios - Error detecting touch/tap on rect -
i trying observe touch on "rect" object in flash builder. can't seem touch event work. here code:
import flash.events.touchevent; import mx.events.flexevent; protected function init(event:flexevent):void { blue_button.addeventlistener(touchevent.touch_tap, colorselected); } private function colorselected(e:touchevent):void { level_label.text = "hello world"; }
(i have checked, , yes init function beingness called when creationcomplete)
and mxml:
<s:label id="level_label" top="24" width="39" height="42" fontsize="30" horizontalcenter="0" text="1" textalign="center" verticalalign="middle"/> <s:rect x="73" y="506" id="blue_button" width="30" height="30" radiusx="25" > <s:fill> <s:solidcolor color="#118bf4" alpha="1.0"/> </s:fill> </s:rect>
not sure if made error in code or not. in testing, label doesn't alter "hello world" when tap "blue_button" rect. in advance help!
jacob
ios actionscript-3 adobe flash-builder
No comments:
Post a Comment