Is there a way to send back the image to its original position when event.phase =="ended" is called.Basically I want my image to go back to its original position from where i started the phase =="began" for draging.
Please help me out doing this as I am unable to figure it out.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Drag Me sample code
Not sure if I'm thinking about the same code as you, but the drag me example I remember was storing the original coordinates of the object at the phase == "began" stage as p.x0 and p.y0. So if you wanted the object to snap back to its original location, you would use:
1 2 3 | if phase == "ended" then p.x = p.x0 p.y = p.y0 |
views:1809 update:2011/12/1 20:56:45
热门文章
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
相关文章
Developer license
Problems on Device
Converting thick line into rectangular body
Director ERROR:Failed to execute new(params) function on 'menu'. Where is my object ?
get x,y of a collision
Is there a bug passing headers using network.request( )
Bitwise Operations / BitLib
Amazon App Store Requirements
New Builds and Old Builds
Help with Line path
Problems on Device
Converting thick line into rectangular body
Director ERROR:Failed to execute new(params) function on 'menu'. Where is my object ?
get x,y of a collision
Is there a bug passing headers using network.request( )
Bitwise Operations / BitLib
Amazon App Store Requirements
New Builds and Old Builds
Help with Line path
corona forums © 2003-2011