Page 1 of 1
Card Transitions
Posted: Tue Jun 03, 2014 4:27 pm
by chelling
I am trying to use mobileClearTouches on closeCard, but it breaks the visual effect curl up. All the other iOS compatible transitions work OK, but I don't think they are appropriate for this app. Does anyone know how to make these both work? Thanks!
Re: Card Transitions
Posted: Wed Jun 11, 2014 2:19 pm
by Mark
Hi,
This looks like a LiveCode bug. Could you post the relevant part of your script?
Kind regards,
Mark
Re: Card Transitions
Posted: Thu Jun 12, 2014 12:51 am
by chelling
Hi Mark,
I am really interested to see what you think. These are the relevant scripts:
This is the closeCard handler in the stack script.
on closeCard
global gCorrectAnswer, gAnswerCount, gcurrentPercentage, gFirstBtn, gLastBtn
set the defaultFolder to specialFolderPath("Documents")
put field "MLUfield" of card "Data Card" into item 1 of line 49 of field "prefsField" of card "prefsCard"
put gCorrectAnswer into item 1 of line 52 of field "prefsField" of card "prefsCard"
put gAnswerCount into item 1 of line 53 of field "prefsField" of card "prefsCard"
put gcurrentPercentage into item 1 of line 54 of field "prefsField" of card "prefsCard"
put gFirstBtn into item 1 of line 55 of field "prefsField" of card "prefsCard"
put gLastBtn into item 1 of line 56 of field "prefsField" of card "prefsCard"
put the short name of this card into tCard
put tCard into item 1 of line 58 of field "prefsField" of card "prefsCard"
unmark this card
send "ListMarkedCards" to me in 20
saveUserData
pass closeCard
end closeCard
The card are also calling this transition script:
on goNextMkdCd
if the sound is not done then wait until the sound is done
if the cGestureSetting of this stack = "manualadvance" then exit goNextMkdCd
else
if the number of marked cards < 1 then
wait until the sound is done --with/without messages didn't make a difference
visual effect curl up
wait 10
go to card "Data Card"
else
visual effect curl up
go next marked card
end if
end if
end goNextMkdCd
The work around was to add the iPhonecleartouches to each card's openCard handler:
on openCard
playSpeech --this plays an instructional prompt
if the environment is "mobile" then iphoneClearTouches
if the cEnableScan of this stack is true then
initScan 0
put the cScanRate of this stack into temp
wait 28 with messages
if the cScanType of this stack is "stepScan" then
addScanLine "1276,1277,1278,1282,1288,1279,1280,1281,1283,1290,1284,1285,1286,1287,1289"
startScan(0,0,1,3)
else
if the cScanType of this stack is "linear" then
addScanLine "1276,1277,1278,1282,1288,1279,1280,1281,1283,1290,1284,1285,1286,1287,1289"
startScan(temp,0,1)
else
if the cScanType of this stack is "rcScan" then
addScanLine "1276,1277,1278,1282,1288"
addScanLine "1279,1280,1281,1283,1290"
addScanLine "1284,1285,1286,1287,1289"
startScan(temp,0,1)
end if
end if
end if
end if
end openCard
Re: Card Transitions
Posted: Thu Jun 12, 2014 12:56 am
by Mark
So, it's been solved now?
Mark
Re: Card Transitions
Posted: Thu Jun 12, 2014 3:55 am
by chelling
I wouldn't call it solved. I moved iphonecleartouches to openCard, and that preserved the trancpsition. I really needed to have it on closeCard, so if a kid was banging on the screen, which they do, the touch messages cleared.
Adding iphonecleartouches to close card prevented the visual effect. This was only with curl up/ down effects. The other transitions - like dissolve - worked with iphoneclear touches in closeCard.