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:1382 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
相关文章
Advantages and disadvantages of using director class?
Need your opinion. Huge framerate drop after resume from suspend event.
Vaporware: Corona Visual Designer
Live Wallpaper
To Universal my app... or not.
How to provide same graphics for iPad and Retina?
[Solved] Widget Buttons
Retrieve device screen size
Linking external lua files to main lua file
touch the monkey
Need your opinion. Huge framerate drop after resume from suspend event.
Vaporware: Corona Visual Designer
Live Wallpaper
To Universal my app... or not.
How to provide same graphics for iPad and Retina?
[Solved] Widget Buttons
Retrieve device screen size
Linking external lua files to main lua file
touch the monkey
corona forums © 2003-2011