나는 이미지 group.Like이 이미지의 그룹을 만들 slideshow.By 이미지를 만들 수 있습니다슬라이드 스크린의 속도를 계산하는 방법은 무엇입니까? - Livecode
지금은이 같은 예제 코드를 움직이지 마 마우스를 사용하여 슬라이드를 할 수 있습니다.
local sScrolling
local sInitialMouseX, sInitialMouseY
local sInitialHScroll, sInitialVScroll
on mouseDown
## Allow the group to scroll
put true into sScrolling
## Record the initial touch position
put item 1 of the mouseLoc into sInitialMouseX
put item 2 of the mouseLoc into sInitialMouseY
## Record the initial hScroll and vScroll
put the vScroll of me into sInitialVScroll
put the hScroll of me into sInitialHScroll
end mouseDown
on mouseMove mouseX, mouseY
## If the screen is being touched then
if sScrolling then
## Calculate how far the touch has moved since it started
put mouseY - sInitialMouseY into tVChange
put mouseX- sInitialMouseX into tHChange
## Reset the hScroll and vScroll to follow the touch
lock screen
-- set the vScroll of me to sInitialVScroll - tVChange
set the hScroll of me to sInitialHScroll - tHChange
unlock screen
put the hScroll of me && tHChange into fld "labS"
end if
end mouseMove
on mouseRelease
mouseUp
end mouseRelease
on mouseUp
put false into sScrolling
end mouseUp
나는 댐핑을 원하고 IOS의 다양한 응용 프로그램에서 슬라이드 쇼와 같은 스냅 사진을 가지고 있습니다.
나를위한 가이드는 코드를 미리 보거나 미리 보시기 바랍니다.
"댐핑을 원하고 스냅 사진이 있습니까?"는 것은 정확히 무엇을 의미합니까? 나는 당신이 시각적 효과를 원한다고 생각합니다. iOS 또는 Android 용 앱을 만들고 있습니까? 그런 다음 scrollerDidScroll, scrollerBeginDrag 및 scrollerEndDrag 메시지를 살펴볼 수 있습니다. scrollerDidScroll 메시지를 스크롤하면 scrollerEndDrag 메시지가 끝까지 슬라이드할지 여부와 적용 할 효과를 결정할 시간임을 알리는 동안 스크롤 할 수 있습니다. – Mark