Any idea about why is not working what i asked in my last post?
I think it should correspond with what i saw in the lesson, but i don't manage...

Thanks in advance!
Regards.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Is the lockloc of "grpBtn" set to true? Is there anything else inside the group apart from the two buttons?aebki wrote: one button "btn1" in the location: 151, 563
one button "btn2" in the location: 151, 1423
and one group of these two buttons named "grpBtn"
Code: Select all
on preOpenStack
if the platform is "iphone" then
set the compositorType of this stack to "opengl"
else
set the compositorType of this stack to "software"
end if
set the compositorTileSize of this stack to 32
set the compositorCacheLimit of this stack to (16 * 1024 * 1024)
end preOpenStack
Code: Select all
on preOpenCard
if the environment is not "mobile" then
exit preOpenCard
end if
-- Use a 'scrolling' layer for our gallery.
set the layerMode of group "gallery" to "scrolling"
-- Turn on 'out-of-bounds' scrolling for our image group
set the unboundedHScroll of group "gallery" to true
set the unboundedVScroll of group "gallery" to true
end preOpenCard
Code: Select all
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
end if
end mouseMove
on mouseRelease
mouseUp
end mouseRelease
on mouseUp
put false into sScrolling
end mouseUp
So, when you were trying it out on you iPad did you 'get' what I was saying about 'bigger on the inside'?So now, i could test it in my iPad and it worked...