Jigsaw dragging problem in 2014.2100 corona simulater

http://developer.coronalabs.com/code/puzzleapp

 Itz great. But I find it difficult in touching and dragging the image.Is there a problem with my device or there is really some problem with touch?

It’s old. It could have problems with Graphics 2.0, which has made some changes. 

So can anybody please tell me What kind of changes will i prefer in Graphics 2.0 . ??  i have also used graphicsCompatibility = 1 to run this code in v1 Compatibility mode but it is not working .

Hey Divakar,

I just recently developed a puzzle game in corona only.

for me drag and drop is working fine.

shall i share a source code for drag and drop code just for your ease…??

Thanks

Yeah Sure , And here it is the code source link https://github.com/LadySobriquet/Puzzle-App where you can see the code of this Corona app .    

Thank you 

Hello Divakar,

This is the sample code for the dragging and droping the object,


// Create a object. you can use image as well with display.newimageRect

local myObject = display.newRect( 0, 0, 100, 100 )

myObject:setFillColor( 255 )

– touch listener function

function myObject:touch( event )

if event.phase == “began” then

    

self.markX = self.x – store x location of object

self.markY = self.y – store y location of object

    

elseif event.phase == “moved” then

    

local x = (event.x - event.xStart) + self.markX

local y = (event.y - event.yStart) + self.markY

self.x, self.y = x, y – move object based on calculations above

end

return true

end

– make ‘myObject’ listen for touch events

myObject:addEventListener( “touch”, myObject )


So this is the way i finished my puzzle game.

Sorry for the late reply.

Thanks

Neel 

Yup .I got it. now it is working .

Thank you neel :) 

Hello DivakrJoshi257

Welcome.

Sorry for the late reply. And i am from Gujarat India too.

Where are you from…??

Cheers,

HapPy coding!! :P  :slight_smile:

Hello Neel 

It is ok and Thank you .

I am from Rajasthan .

Same Here . :slight_smile:

It’s old. It could have problems with Graphics 2.0, which has made some changes. 

So can anybody please tell me What kind of changes will i prefer in Graphics 2.0 . ??  i have also used graphicsCompatibility = 1 to run this code in v1 Compatibility mode but it is not working .

Hey Divakar,

I just recently developed a puzzle game in corona only.

for me drag and drop is working fine.

shall i share a source code for drag and drop code just for your ease…??

Thanks

Yeah Sure , And here it is the code source link https://github.com/LadySobriquet/Puzzle-App where you can see the code of this Corona app .    

Thank you 

Hello Divakar,

This is the sample code for the dragging and droping the object,


// Create a object. you can use image as well with display.newimageRect

local myObject = display.newRect( 0, 0, 100, 100 )

myObject:setFillColor( 255 )

– touch listener function

function myObject:touch( event )

if event.phase == “began” then

    

self.markX = self.x – store x location of object

self.markY = self.y – store y location of object

    

elseif event.phase == “moved” then

    

local x = (event.x - event.xStart) + self.markX

local y = (event.y - event.yStart) + self.markY

self.x, self.y = x, y – move object based on calculations above

end

return true

end

– make ‘myObject’ listen for touch events

myObject:addEventListener( “touch”, myObject )


So this is the way i finished my puzzle game.

Sorry for the late reply.

Thanks

Neel 

Yup .I got it. now it is working .

Thank you neel :) 

Hello DivakrJoshi257

Welcome.

Sorry for the late reply. And i am from Gujarat India too.

Where are you from…??

Cheers,

HapPy coding!! :P  :slight_smile:

Hello Neel 

It is ok and Thank you .

I am from Rajasthan .

Same Here . :slight_smile: