Instead of filmloops you can also use imaging lingo. Below a simple behavior (surely could be optimized) that has to be attached to some dummy bitmap sprite. I've put a sample movie to
http://dasdeck.de/staff/valentin/lingo/img_scroller.htm
http://dasdeck.de/staff/valentin/lingo/img_scroller.dir

Valentin


-- START

property pS

property pSourceImg
property pTargetImg

property pClickLoc
property pClickOffset
property pOffset
property pDX, pDY

on beginSprite me

 pS = sprite(me.spriteNum)
 pTargetImg = pS.member.image
 pS.cursor = 260

 -- ADJUST ------------------
 pOffset = point(0,0)
 pSourceImg = member("NewYork").image
 -- END ADJUST --------------

pTargetImg.copyPixels(pSourceImg, pTargetImg.rect, pTargetImg.rect.offset(pOffset[1],pOffset[2]))
end

on endSprite me
 pS.cursor = 0
 pTargetImg.fill(pTargetImg.rect, RGB(0,0,0))
 (the actorList).deleteOne(me)
end

-- PUBLIC
on setSourceImage me, tImg, tOffset
 pSourceImg = tImg
 if voidP(tOffset) then tOffset = point(0,0)
 pOffset = tOffset
pTargetImg.copyPixels(pSourceImg, pTargetImg.rect, pTargetImg.rect.offset(tOffset[1],tOffset[2]))
end

-- PRIVATE
on mouseDown me
 if (the actorList).getPos(me)=0 then (the actorList).add(me)
 pClickLoc    = the mouseLoc
 pClickOffset = pOffset
end

on mouseUp me
 pOffset = point (pDX,pDY)
 (the actorList).deleteOne(me)
end

on mouseUpOutside me
 me.mouseUp()
end

on stepFrame me
 tOffset = pClickOffset - (the mouseLoc-pClickLoc)
 pDX = min(pSourceImg.width-pTargetImg.width, max(0, tOffset[1]))
 pDY = min(pSourceImg.height-pTargetImg.height, max(0, tOffset[2]))
pTargetImg.copyPixels(pSourceImg, pTargetImg.rect, pTargetImg.rect.offset(pDX,pDY))
end
-- END
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to