PDF

Ken Norris pixelbird at interisland.net
Sat Mar 6 02:48:36 EST 2004


on 3/5/04 5:29 PM, use-revolution-request at lists.runrev.com at
use-revolution-request at lists.runrev.com wrote:

> Date: Fri, 5 Mar 2004 17:42:05 -0600
> From: "Ken Ray" <kray at sonsothunder.com>
> Subject: RE: PDF
> To: "'How to use Revolution'" <use-revolution at lists.runrev.com>
> Message-ID: <00e501c4030b$7af9c790$6601a8c0 at LightningFlash>
> Content-Type: text/plain;    charset="US-ASCII"
> 
>> I imported the 2448 x 3240 JPEG image to a Rev stack, grouped
>> it, bordered it, set the margins to 0, locked it, added
>> scrollbars, and plugged the
>> *genuine* Rev-style mouseMove grab/scroll handlers into the
>> image script.
>> 
>> It works beautifully. Grab/scrolls like its on bed of ball
>> bearings. No problems, no joke.
> 
> Ken, any chance you could post your code for this (if you haven't
> already)?
-------------
Yep, I did, but it was a different thread (Chris asked). Actually it moves
like on ball bearings with instant braking. It's a assembled from several
other techniques, no dross. Anyway, here it is again (only one comment,
everything is fairly self-explanatory and simple):

on mouseDown
  global gTX,gTY
  put item 1 of mouseLoc() into gTX
  put item 2 of mouseLoc() into gTY
  set the allowMove of me to true ## automatically creates a custom prop
end mouseDown

on mouseMove x,y
  global gTX,gTY
  if the allowMove of me then
     set hScroll(group id 1007) to hScroll(group id 1007)+(gTX-x)
     set vScroll(group id 1007) to vScroll(group id 1007)+(gTY-y)
     put x into gTX
     put y into gTY
   end if
end mouseMove

on mouseUp
  global gAllowMove
  set the allowMove of me to false
end mouseUp

Ken N.



More information about the use-livecode mailing list