Tag Archives: Event Listener

How to get touch location in Corona ?

By | August 21, 2011

Hi, For getting touch location in Corona, use the following code, [c] –Your touch event listener local function myTouchListener( event ) if event.phase == "began" then –Touch coordinates can be accessed by event.x/event.y properties of touch event print( "Touched!" ) print ("Touch X = #"..event.x) print ("Touch Y = #"..event.y) end end –Adding an event listener for touch… Read More »

How to get touch 'began', 'moved' & 'ended' in Corona ?

By | August 21, 2011

Hi, For getting touch ‘began’, ‘moved’ & ‘ended’ in Corona, use the following code. [java] –Your touch event listener local function myTouchListener( event ) if event.phase == "began" then print( "Touched!" ) elseif event.phase == "moved" then print( "Touches Moved!" ) elseif event.phase == "ended" then print( "Touches Ended!" ) end end –Adding an event listener for touch… Read More »

How to get touch ‘began’, ‘moved’ & ‘ended’ in Corona ?

By | August 21, 2011

Hi, For getting touch ‘began’, ‘moved’ & ‘ended’ in Corona, use the following code. [java] –Your touch event listener local function myTouchListener( event ) if event.phase == "began" then print( "Touched!" ) elseif event.phase == "moved" then print( "Touches Moved!" ) elseif event.phase == "ended" then print( "Touches Ended!" ) end end –Adding an event listener for touch… Read More »

How to get touch ‘began’, ‘moved’ & ‘ended’ in Corona ?

By | August 21, 2011

Hi, For getting touch ‘began’, ‘moved’ & ‘ended’ in Corona, use the following code. [java] –Your touch event listener local function myTouchListener( event ) if event.phase == "began" then print( "Touched!" ) elseif event.phase == "moved" then print( "Touches Moved!" ) elseif event.phase == "ended" then print( "Touches Ended!" ) end end –Adding an event listener for touch… Read More »

How to read and write an XML file in Adobe AIR or Flex?

By | January 15, 2011

AIR treats the XML files as just as normal file and so you can proceed using the FileStream classs. Please take a look at the sample code. Just copy and paste the following code to your main.MXML file and you are done. [xml] import flash.xml.XMLDocument; private function init():void { xmlTA.text = " Sample XML "; var fileStream:FileStream =… Read More »