I think it would be like too cool if the screen would show you the coordinates of your cursor (like in photoshop, illustrator, etc.) so you don't have to do any guessing as to where you want your objects to be.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Position finder
there is... but in which application?
if you want it in your own app, use this
1 2 3 4 5 | local function onTouch(event) print(event.x, event.y) end Runtime:addEventListener("touch",onTouch) |
@k96
Using the JayantV`s tip is one way.
But if you run his chunk it will give you an error about the event.
To fix this error, just use the following fixed code:
1 2 3 4 5 6 7 | local function onTouch(event) print("POS.X = " .. event.x, "POS.Y = ".. event.y) end Runtime:addEventListener("touch",onTouch) |
Aw, man!!!! I never even thought about making a function!!!
Much appreciated,
J.C.
views:1381 update:2011/11/2 21:34:51
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
相关文章
Any Lua folks in the Phoenix area??
MovieClip / SpriteSheet (optimization)
Simulator Crashes - Unable to build
App doesn't look the same on all devices
Opinions on new look infuseddreams site
A valid provisioning profile for this executable was not found. Can't add built app to iPhone
Back and forth movement
Connection error: (corona.get)
Corona 2.0 Beta 4 now available for download
Orientation Requirements?
MovieClip / SpriteSheet (optimization)
Simulator Crashes - Unable to build
App doesn't look the same on all devices
Opinions on new look infuseddreams site
A valid provisioning profile for this executable was not found. Can't add built app to iPhone
Back and forth movement
Connection error: (corona.get)
Corona 2.0 Beta 4 now available for download
Orientation Requirements?
corona forums © 2003-2011