@iAzz,
I’m need some more time to look at it. I’ll look at it again tomorrow and let you know what I come up with.
@jk,
I’ll take a look at that as well. [import]uid: 49520 topic_id: 20965 reply_id: 85109[/import]
@iAzz,
I’m need some more time to look at it. I’ll look at it again tomorrow and let you know what I come up with.
@jk,
I’ll take a look at that as well. [import]uid: 49520 topic_id: 20965 reply_id: 85109[/import]
Hi james ,
I have uploaded my code file and assets in rar file on :
http://www.mediafire.com/?1gp8t4rf2m6iabh
[import]uid: 95767 topic_id: 20965 reply_id: 86665[/import]
@iazz,
I got super busy (randomly, i might add) and I have been trying to recreate the issue you’re having and I haven’t been able to do it. This will surely help.
@jk,
I can’t see an issue with the code you showed off hand, do you have a example project so i can recreate the issue? [import]uid: 49520 topic_id: 20965 reply_id: 86800[/import]
@james, i will send you the project by mail.
Joakim [import]uid: 81188 topic_id: 20965 reply_id: 86809[/import]
I had no problem duplicating @iAZZoZiTTi’s issue. I have a partial solution, but need a bit more time to address a secondary issue in the code Jonathan Beebe wrote (and that iAZZ’s sample is based on).
I’ll devote some more time to it tomorrow.
Ken [import]uid: 16734 topic_id: 20965 reply_id: 86810[/import]
Page Curl is now fully functional and you can find the code for it here:
http://developer.anscamobile.com/code/page-curl
Ken [import]uid: 16734 topic_id: 20965 reply_id: 86925[/import]
ken and james thanks both for spending time trying solve my problem
ken your code works great
Thanks [import]uid: 95767 topic_id: 20965 reply_id: 86961[/import]
@Ken,
Good job man! I looked at the code too and good stuff!!
@jk,
I got the code and i’ll check it out tomorrow [import]uid: 49520 topic_id: 20965 reply_id: 87043[/import]
Why the heck is this not working?
https://developer.anscamobile.com/forum/2012/02/17/removeeventlistener-not-working-it-did
Best regards, Joakim [import]uid: 81188 topic_id: 20965 reply_id: 87557[/import]
Hey Rarmstrong - I’m looking to build a glossary type list as well with this functionality - you get anywhere with this?
[import]uid: 88842 topic_id: 20965 reply_id: 88687[/import]
Actually I recently had to put this project on the back-burner but James helped out a lot with sorting the list alphabetically. I have yet to get around to fast-jumping functionality although I’m imagining I’ll have an easier time with that than I did with the sorting issue 
[import]uid: 47361 topic_id: 20965 reply_id: 88698[/import]
Hey Everyone,
I know it looks like I kinda died for a while ( And I kinda did ). I had the tornado called life hit me… and hard too, lol. In any case I’m back and I’ll be posting the resolutions to the code that’s been fixed but I never posted on here. I’m just double checking the people who I haven’t addressed yet and then posting the fixes later this week. [import]uid: 49520 topic_id: 20965 reply_id: 89953[/import]
Hi.
When you have time, are you able to take a look at some code I wrote for the 48 hour challenge and give me some advice and suggestions please? 
Cheers. [import]uid: 10389 topic_id: 20965 reply_id: 90029[/import]
I’d be glad to take a look. You can email me: Ken at HomebrewSoftware dot com.
Ken [import]uid: 16734 topic_id: 20965 reply_id: 90038[/import]
Sure. Just send me an email @ jamestimberlakejr[at] gmail [dot] com. I’ll be looking at some code tonight and I can look at it then [import]uid: 49520 topic_id: 20965 reply_id: 90049[/import]
Thanks guys!
[import]uid: 10389 topic_id: 20965 reply_id: 90059[/import]
Hi James,
I have a 15 frame sprite that I’m controlling via drag. The sprite is a character that spins 360 degrees. If you drag your finger across the sprite more than 15 pixels it will load the previous or next frame based on the direction of the drag. This works great.
I am trying to figure out how to load additional frames based on the velocity of a flick during the drag event. Any ideas?
Thanks,
Greg
[lua]-- hide status bar
display.setStatusBar(display.HiddenStatusBar)
– pipe terminal output to Sublime Text’s build console; strip out on publish
io.output():setvbuf(“no”)
– load classes
local grabber = require(“SpriteGrabber”)
– set forward referencing & variables
local spinNum
local prevX = 0
local dragDist = 0
local math_abs = math.abs
local dragDistNum = 15
local i
– make sprite clips
local function makeClips1(num)
local spriteClips1 = {}
for i = 1, num do
spriteClips1[“spin”…i] = {i,1,1,1}
end
return spriteClips1
end
– load sprites
local spritesheetSpin1 = grabber.grabSheet(“ElephantSpin”)
local spin1 = spritesheetSpin1:grabSprite(“Elephant”,true,makeClips1(15))
local function makeSpin(e)
dragDist = math_abs(e.x - prevX)
local t = e.target
local phase = e.phase
if “began” == phase then
local parent = t.parent – make image top-most object
parent:insert(t)
display.getCurrentStage():setFocus(t)
t.isFocus = true – prevents touch events off target
prevX = e.x – store initial touch position
elseif t.isFocus then
if “moved” == phase then
if e.x > prevX and dragDist > dragDistNum then – moving right
if spinNum < 15 then
spinNum = spinNum + 1
elseif spinNum == 15 then
spinNum = spinNum - 14
end
print("Image # "…spinNum)
spin1:playClip(“spin”…spinNum)
elseif e.x < prevX and dragDist > dragDistNum then – moving left
if spinNum > 1 then
spinNum = spinNum - 1
elseif spinNum == 1 then
spinNum = spinNum + 14
end
print("Image # "…spinNum)
spin1:playClip(“spin”…spinNum)
end
– factor back swipDist
if e.x > prevX + dragDistNum or e.x < prevX - dragDistNum then
prevX = e.x
end
elseif “ended” == phase or “cancelled” == phase then
display.getCurrentStage():setFocus(nil)
t.isFocus = false
end
end
return true
end
–set initial state
local function init()
spin1:scale(1.35,1.35)
spinNum = 2
spin1:playClip(“spin”…spinNum)
spin1:addEventListener(“touch”, makeSpin)
end
init()[/lua] [import]uid: 2108 topic_id: 20965 reply_id: 90988[/import]
Hi GP,
I’ll take a look at it and see what I can come up with. [import]uid: 49520 topic_id: 20965 reply_id: 91245[/import]
@GP,
Try and see it this works out for you
[lua]–@start jt edit: hold previous time
local prevTime
–@end jt edit
local function makeSpin(e)
dragDist = math_abs(e.x - prevX)
local t = e.target
local phase = e.phase
if “began” == phase then
local parent = t.parent – make image top-most object
parent:insert(t)
display.getCurrentStage():setFocus(t)
t.isFocus = true – prevents touch events off target
prevX = e.x – store initial touch position
elseif t.isFocus then
if “moved” == phase then
–@start jt edits
local newTime = event.time
local velocity
–now we get the velocity
if prevTime ~= nil then
local totalTime = newTime - prevTime
velocity = dragDist/totalTime
end
–set the new previous time
prevTime = newTime
if velocity > 20–[[whatever number you want to use–]] then
– switch to some new frames
end
–@end jt edits
if e.x > prevX and dragDist > dragDistNum then – moving right
if spinNum < 15 then
spinNum = spinNum + 1
elseif spinNum == 15 then
spinNum = spinNum - 14
end
print("Image # "…spinNum)
spin1:playClip(“spin”…spinNum)
elseif e.x < prevX and dragDist > dragDistNum then – moving left
if spinNum > 1 then
spinNum = spinNum - 1
elseif spinNum == 1 then
spinNum = spinNum + 14
end
print("Image # "…spinNum)
spin1:playClip(“spin”…spinNum)
end
– factor back swipDist
if e.x > prevX + dragDistNum or e.x < prevX - dragDistNum then
prevX = e.x
end
elseif “ended” == phase or “cancelled” == phase then
display.getCurrentStage():setFocus(nil)
t.isFocus = false
end
end
return true
end[/lua] [import]uid: 49520 topic_id: 20965 reply_id: 91423[/import]
Hi James & Ken, I’m wondering if either one of you (or both of you) could help me out with Twitter integration. I’ve posted a cry for help here. Any input and, hopefully, generic sample code would be soo appreciated (and I’m sure tons of other users would love it too).
Naomi
[import]uid: 67217 topic_id: 20965 reply_id: 91558[/import]