Hi - I can't really tell without tinkering with your code but I should think the reason you are seeing a 'jump' is because you have two 'visual effect' statements running.
I also think you are making things more complicated for yourself than you need to by putting a visual effect in a closecard handler, I would put visual effects in the 'action' or calling script (or reference visual effects from the calling script) - like you've done with your button in the first stack and the BACK button in your second stack.
You are right to put something in the closecard handler that moves the information image if its showing, but I think you should be able to simply set it's loc to the down position as long as you've already got an 'unlock screen with visual effect' in your 'calling' script:
Code: Select all
on closecard
if the loc of img tImage = tUpPosition then set the loc of img tImage to tDownPostion
end closecard
With any luck you'll now find that the information image is removed gracefully inside the visual effect called in your BACK button.
As to how you would now get a swipe effect when you've removed 'visual effect' from the closecard handler - if you are not already using something to give you a visual effect you could use the following in the stack script of your second stack:
Code: Select all
local sStartH
on mousedown
put the mouseH into sStartH
end mousedown
on mouseUp
if abs(the mouseH - sStartH) > 50 then
if the mouseH < sStartH then
goNext
else
goPrevious
end if
end if
end mouseUp
on goNext
if the short name of the current cd <> "cdLastCard" then
lock screen
go next cd
unlock screen with visual effect "push left" very fast
end if
end goNext
on goPrevious
if the short name of the current cd <> "cdFirstCard" then
lock screen
go previous cd
unlock screen with visual effect "push right" very fast
end if
end goPrevious
And of course make sure you change "cdFirstCard" and "cdLastCard" to suit your stack
WARNING: I haven't checked all of this code so watch out for misspellings and bugs!
Dave
EDIT: oops, just corrected an error in the closecard handler