[Use-revolution] Digest use-revolution.v001.n145
use-revolution-errors at www.runrev.com
use-revolution-errors at www.runrev.com
Wed Nov 28 12:44:02 EST 2001
-------------- BEGIN use-revolution.v001.n145 --------------
001 - "Mark MacKenzie (Shaw)" < - Constraining Movement
002 - Kevin Miller <kevin at runre - Re: Version 1.1.1
003 - Troy Rollins <troy at rpsyst - Re: ResetAll, Sockets, and the new FTP
004 - "Sjoerd Op 't Land" <sjoe - Re: Constraining Movement
005 - "Ken Ray" <kray at sonsothun - Re: Constraining Movement
006 - andu <undo at cloud9.net> - Re: ResetAll, Sockets, and the new FTP
007 - Scott Rossi <scott at tactil - Re: Constraining Movement
008 - Peter Reid <preid at reidit. - Re: Networking
009 - Scott Raney <raney at metaca - Re: Re post - Masking graphics
010 - "Geoff Canyon" <gcanyon at i - [Use-revolution] Re: Constraining Movement
011 - Troy Rollins <troy at rpsyst - Re: Networking
012 - "Chipp Walters" <chipp at ch - RE: Constraining Movement
013 - "Ken Ray" <kray at sonsothun - Re: Re post - Masking graphics
014 - "Ken Ray" <kray at sonsothun - Re: Constraining Movement
015 - "Sjoerd Op 't Land" <sjoe - Re: Constraining Movement
This is the Use Revolution mailing list. Use it to
discuss and solve "how-to" questions relating to using Revolution.
Please do not send bug reports or feature requests to this list.
To unsubscribe, place the word unsubscribe in the body of an
email and send it to use-revolution-request at lists.runrev.com.
--------------- MESSAGE use-revolution.v001.n145.1 ---------------
From: "Mark MacKenzie (Shaw)" <markmac at shaw.ca>
Subject: Constraining Movement
Date: Tue, 27 Nov 2001 07:36:02 -0600
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7BIT
I have a small graphic based group which upon "mousemove" etc. is grabbed by
the mouse cursor and moved. It is placed (originally and I would like it to
stay here too!) within the borders an image which is some 3 times the area
of the moveable graphic. I have been unsuccessful in constraining the
movement of the graphic group to within this image. The graphic group and
image are on a card with a much larger image underneath.
There has got to be a fairly straightforward way to do this but I have gone
round and round without getting this right.
I have received a lot of good help and advice on this list, thank you.
Regards Mark
--------------- MESSAGE use-revolution.v001.n145.2 ---------------
From: Kevin Miller <kevin at runrev.com>
Subject: Re: Version 1.1.1
Date: Tue, 27 Nov 2001 15:01:08 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In-Reply-To: <200111262045.PAA15606 at www.runrev.com>
On 26/11/01 8:44 pm, Matt Denton <matt.denton at limelight.com.au> wrote:
> Is there going to be a 1.1.1 patch?
Yes, it will be free for all users.
> Next/Prev card and many other
> niggly things need fixing in 1.1 desperately (thanks to Geoff for his
> post on a quick next/prev fix). I personally would like to see a freeze
> on 1.1 feature list and more stability in the package, with a fix to the
> most glaring issues first up.
Agreed, we are working on this.
> Most of the time I have 'errors' turned off so that I don't get the
> frequent Runtime errors appearing during development. It is frustrating
> when you are learning (re-learning) a language and you additionally have
> to filter out authoring environment errors.
>
> I love using Rev and the amazing work done by Revolution, I guess I just
> feel frustrated with the frequent error dialog appearing when it is not
> my code and the many inconsistencies still in Rev. 1.1 is definitely
> a step up, I guess I'd expected the holy grail at 1.1. All that aside,
> I'll continue to enjoy working with this powerful tool. Don't misread
> me... you guys are doing a great job and have added tons of features...
> I just don't want to have to wait for v2.0 for a stable runtime
> environment.
Absolutely not. On a percentage scale, 1.1 is proving more stable per user
than 1.0. However, we clearly have a little way to go to smooth over some
rough edges and we're working on that.
Regards,
Kevin
Kevin Miller <kevin at runrev.com> <http://www.runrev.com/>
Runtime Revolution Limited - Power to the Developer!
Tel: +44 (0) 870 747 1165. Fax: +44 (0)1639 830 707.
--------------- MESSAGE use-revolution.v001.n145.3 ---------------
From: Troy Rollins <troy at rpsystems.net>
Subject: Re: ResetAll, Sockets, and the new FTP
Date: Tue, 27 Nov 2001 10:44:57 -0500
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In-Reply-To: <200111270836.DAA23936 at www.runrev.com>
andu wrote:
>> In the transcript dictionary "ResetAll" claims to close sockets opened by
>> the FTP function.
>>
>> Are there additional relationships held by the FTP and sockets functions?
>
> Such as?
>
Such as the questions I went on to detail...
>>
>> Can one use the openSockets function to get information on the current open
>> FTP functions?
>
> OpenSockets() only returns the open sockets regardless of which protocol
> opened them. If you need the status of a download or upload use
> urlStatus() function.
>
The URLstatus function looks nice, but seems focused on receiving data,
rather than providing information about an upload process. Will it return
any information relating to an upload? Will at least the "contacted" result
return true if a connection is made for upload? Will "error" result if the
server is not found?
>
>>
>> Does the FTP function automatically close the socket it uses to make the
>
> No, you can reuse a socket opened to the same server. Servers usually
> time-out (close) an unused connection after a while (you get a dialog)
> but the library has an internal timeout-disconnect mechanism which
> closes the socket after 3 minutes of inactivity.
>
>> transfer? If so, does it send any indication of this, or can you use the
>> previously mentioned socket functions to develop monitoring routines for it?
I'm not too clear on this - does an upload which is finished provide any
indication of that status? If the socket does not automatically close when
an upload is done, and URLstatus does not provide an "upload process done",
how would one monitor status of a queued series of uploads? I would ideally
like to restrict the queue to four simultaneous connections, and as
processes finish allow more queued upload functions to take place.
Thanks for any advise.
--
Troy Rollins
RPSystems
www.rpsystems.net
ph (860)633-2295
fax (801)761-9715
--------------- MESSAGE use-revolution.v001.n145.4 ---------------
From: "Sjoerd Op 't Land" <sjoerdoptland at mac.com>
Subject: Re: Constraining Movement
Date: Tue, 27 Nov 2001 16:48:27 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In-Reply-To: <200111271335.IAA27372 at www.runrev.com>
Mark MacKenzie (Shaw) wrote/ schreef:
> I have a small graphic based group which upon "mousemove" etc. is grabbed by
> the mouse cursor and moved. It is placed (originally and I would like it to
> stay here too!) within the borders an image which is some 3 times the area
> of the moveable graphic. I have been unsuccessful in constraining the
> movement of the graphic group to within this image. The graphic group and
> image are on a card with a much larger image underneath.
>
> There has got to be a fairly straightforward way to do this but I have gone
> round and round without getting this right.
It seems to be easy, but.. at least I had some trouble. I've found a script
that works, but... it can be better:
-------------------------
global dY,dX,tDrag
on mouseDown
put true into tDrag
put item 1 of the mouseLoc - item 1 of loc of me into dX
put item 2 of the mouseLoc - item 2 of loc of me into dY
put dy,dx
end mouseDown
on mouseMove newX,newY
if the mouse is down and tDrag then
if trunc((item 1 of the mouseLoc - dX) + the width of me /
2),trunc((item 2 of the mouseLoc - dY) + the height of me / 2) is within the
rect of image "myImage" and trunc((item 1 of the mouseLoc - dX) - the width
of me / 2),trunc((item 2 of the mouseLoc - dY) - the height of me / 2) is
within the rect of image "myImage" then
set the loc of me to (item 1 of the mouseLoc - dX),(item 2 of the
mouseLoc - dY)
end if
end if
end mouseMove
on mouseUp
put false into tDrag
put empty into dY
put empty into dX
end mouseUp
-------------------------
> I have received a lot of good help and advice on this list, thank you.
>
> Regards Mark
Regards, / Groeten,
Sjoerd
--------------- MESSAGE use-revolution.v001.n145.5 ---------------
From: "Ken Ray" <kray at sonsothunder.com>
Subject: Re: Constraining Movement
Date: Tue, 27 Nov 2001 10:57:23 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
References: <200111271551.KAA31223 at www.runrev.com>
That's great, Sjoerd!
I took what you had and cleaned it up a bit (hope you don't mind)... here it
is:
-------------------------
global dY,dX,gDrag,x1,y1
on mouseDown
put true into gDrag
put the mouseH - item 1 of loc of me into dX
put the mouseV - item 2 of loc of me into dY
put (the width of me / 2) into x1
put (the height of me / 2) into y1
end mouseDown
on mouseMove newX,newY
if the mouse is down and gDrag then
put the mouseH - dX into offsetMouseH
put the mouseV - dY into offsetMouseV
if trunc(offsetMouseH + x1),trunc(offsetMouseV + y1) is within the rect
of grc "Box" and \
trunc(offsetMouseH - x1),trunc(offsetMouseV - y1) is within the rect
of grc "Box" then
set the loc of me to offsetMouseH,offsetMouseV
end if
end if
end mouseMove
on mouseUp
put false into gDrag
put empty into dY
put empty into dX
put empty into x1
put empty into y1
end mouseUp
-------------------------
Enjoy!
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Sjoerd Op 't Land" <sjoerdoptland at mac.com>
To: <use-revolution at www.runrev.com>
Sent: Tuesday, November 27, 2001 9:48 AM
Subject: Re: Constraining Movement
> Mark MacKenzie (Shaw) wrote/ schreef:
>
> > I have a small graphic based group which upon "mousemove" etc. is
grabbed by
> > the mouse cursor and moved. It is placed (originally and I would like
it to
> > stay here too!) within the borders an image which is some 3 times the
area
> > of the moveable graphic. I have been unsuccessful in constraining the
> > movement of the graphic group to within this image. The graphic group
and
> > image are on a card with a much larger image underneath.
> >
> > There has got to be a fairly straightforward way to do this but I have
gone
> > round and round without getting this right.
> It seems to be easy, but.. at least I had some trouble. I've found a
script
> that works, but... it can be better:
>
> -------------------------
> global dY,dX,tDrag
>
> on mouseDown
> put true into tDrag
> put item 1 of the mouseLoc - item 1 of loc of me into dX
> put item 2 of the mouseLoc - item 2 of loc of me into dY
> put dy,dx
> end mouseDown
>
> on mouseMove newX,newY
> if the mouse is down and tDrag then
> if trunc((item 1 of the mouseLoc - dX) + the width of me /
> 2),trunc((item 2 of the mouseLoc - dY) + the height of me / 2) is within
the
> rect of image "myImage" and trunc((item 1 of the mouseLoc - dX) - the
width
> of me / 2),trunc((item 2 of the mouseLoc - dY) - the height of me / 2) is
> within the rect of image "myImage" then
>
> set the loc of me to (item 1 of the mouseLoc - dX),(item 2 of the
> mouseLoc - dY)
> end if
> end if
> end mouseMove
>
> on mouseUp
> put false into tDrag
> put empty into dY
> put empty into dX
> end mouseUp
> -------------------------
>
> > I have received a lot of good help and advice on this list, thank you.
> >
> > Regards Mark
> Regards, / Groeten,
> Sjoerd
>
>
--------------- MESSAGE use-revolution.v001.n145.6 ---------------
From: andu <undo at cloud9.net>
Subject: Re: ResetAll, Sockets, and the new FTP
Date: Tue, 27 Nov 2001 12:19:46 -0500
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
References: <200111271545.KAA31151 at www.runrev.com>
Troy Rollins wrote:
>
> andu wrote:
>
> >> In the transcript dictionary "ResetAll" claims to close sockets opened by
> >> the FTP function.
> >>
> >> Are there additional relationships held by the FTP and sockets functions?
> >
> > Such as?
> >
>
> Such as the questions I went on to detail...
>
> >>
> >> Can one use the openSockets function to get information on the current open
> >> FTP functions?
> >
> > OpenSockets() only returns the open sockets regardless of which protocol
> > opened them. If you need the status of a download or upload use
> > urlStatus() function.
> >
>
> The URLstatus function looks nice, but seems focused on receiving data,
Should work for both. If you read the docs for urlStatus() you will
learn that in the case of uploading/downloading it also returns the
amount of data transferred and the total amount of data. A script which
will get this information at intervals will tell you when the transfer
is done (the 2 numbers are equal).
> rather than providing information about an upload process. Will it return
> any information relating to an upload? Will at least the "contacted" result
> return true if a connection is made for upload? Will "error" result if the
> server is not found?
>
> >
> >>
> >> Does the FTP function automatically close the socket it uses to make the
> >
> > No, you can reuse a socket opened to the same server. Servers usually
> > time-out (close) an unused connection after a while (you get a dialog)
> > but the library has an internal timeout-disconnect mechanism which
> > closes the socket after 3 minutes of inactivity.
> >
> >> transfer? If so, does it send any indication of this, or can you use the
> >> previously mentioned socket functions to develop monitoring routines for it?
>
> I'm not too clear on this - does an upload which is finished provide any
> indication of that status? If the socket does not automatically close when
> an upload is done, and URLstatus does not provide an "upload process done",
> how would one monitor status of a queued series of uploads? I would ideally
> like to restrict the queue to four simultaneous connections, and as
> processes finish allow more queued upload functions to take place.
See above. You can do simultaneous transactions since ftp uses 2 sockets
one for data transfer and one for commands; the one for data transfer is
closed when the operation id done but you can open several of them at
the same time since they use different ports.
>
> Thanks for any advise.
>
> --
> Troy Rollins
> RPSystems
> www.rpsystems.net
> ph (860)633-2295
> fax (801)761-9715
--
__________________________
Regards, Andu
--------------- MESSAGE use-revolution.v001.n145.7 ---------------
From: Scott Rossi <scott at tactilemedia.com>
Subject: Re: Constraining Movement
Date: Tue, 27 Nov 2001 10:20:40 -0800
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In-Reply-To: <200111271335.IAA27372 at www.runrev.com>
Recently, Mark MacKenzie (Shaw) wrote:
> I have a small graphic based group which upon "mousemove" etc. is grabbed by
> the mouse cursor and moved. It is placed (originally and I would like it to
> stay here too!) within the borders an image which is some 3 times the area
> of the moveable graphic. I have been unsuccessful in constraining the
> movement of the graphic group to within this image.
Here's another (simpler?) option that seems to work for me:
on mouseDown
set the uAllowDrag of me to true
end mouseDown
on mouseMove
if not the uAllowDrag of me then exit mouseMove
set the loc of me to \
min(max(the mouseH,left of img myImg + (width of me/2)),\
right of img myImg - (width of me/2)),\
min(max(the mouseV,top of img myImg + (height of me/2)),\
bottom of img myImg - (height of me/2))
end mouseMove
on mouseUp
set the uAllowDrag of me to false
end mouseUp
on mouseRelease
mouseUp
end mouseRelease
Regards,
Scott
_____________________________________________________________________
Scott Rossi Tactile Media - Multimedia & Design
Creative Director Email: scott at tactilemedia.com
Web: www.tactilemedia.com
--------------- MESSAGE use-revolution.v001.n145.8 ---------------
From: Peter Reid <preid at reidit.co.uk>
Subject: Re: Networking
Date: Tue, 27 Nov 2001 18:52:59 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii" ; format="flowed"
References: <200111271021.FAA25383 at www.runrev.com>
In-Reply-To: <200111271021.FAA25383 at www.runrev.com>
>Hi
>
>I'm sorry if this is a but out of the realm but as we are all cross platform
>developers:
>
>I'm setting up a LAN with a Win XP, Win 98 and Mac OS 8.6. I can't see the
>shared hard drive on the Mac but I can on the others. All computers are
>using the net connection fine.
>
>I'm wondering if anyone knows how to do this with or without third party
>software??????
>
>Best regards
>
>Monte
How are you sharing between Windows and Macs? There are two main ways:
1) treat your network as a PC network and install Dave on the Mac
2) treat your network as a Mac network and install PC MacLAN on the
PCs (this is what I've done)
As far as I'm aware you can't share folders, printers etc. without
installing something on either the PCs or the Macs. PC MacLAN is
quite expensive at 150-200UKP per system. Dave is cheaper at about
100UKP per system. I'm not aware of any freeware/shareware
alternatives.
On the Mac, make sure that the TCP/IP control panel is set to use
Ethernet rather than AppleTalk(MacIP), otherwise things don't work
fully.
Cheers
Peter
--
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: preid at reidit.co.uk
Web: http://www.reidit.co.uk
--------------- MESSAGE use-revolution.v001.n145.9 ---------------
From: Scott Raney <raney at metacard.com>
Subject: Re: Re post - Masking graphics
Date: Tue, 27 Nov 2001 11:59:02 -0700 (MST)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: <200111271300.IAA26947 at www.runrev.com>
On Mon, 26 Nov 2001 Scott Rossi <scott at tactilemedia.com> wrote:
>
> Recently, Ian Bridges wrote:
>
> > is there a way to clip a picture to a region eg a polygon,
> > without assembling an array of masking graphics?
>
> > I would like to be able to change the shape of the mask/clip region and the
> > region of the underlying picture that is displayed with script control
>
> The only way I'm aware of will allow rectangular clips only: display your
> source image in a group or a button, and then change the group's or button's
> rect. I believe there's no built-in way to create oval or irregular masks.
Correct, but there is another way to do this, set the backPattern of a
filled graphic object. Note that the image repeats if your graphic is
larger than the image, and that there are restrictions on the possible
sizes of the image (e.g., on the Mac it has to be a power of 2 in both
width and height and must be less than 64K bytes total). But at least
on NT/2000/XP and UNIX systems you can do a lot with this feature.
Regards,
Scott
> Regards,
>
> Scott
>
> _____________________________________________________________________
> Scott Rossi Tactile Media - Multimedia & Design
> Creative Director Email: scott at tactilemedia.com
> Web: www.tactilemedia.com
>
********************************************************
Scott Raney raney at metacard.com http://www.metacard.com
MetaCard: You know, there's an easier way to do that...
--------------- MESSAGE use-revolution.v001.n145.10 ---------------
From: "Geoff Canyon" <gcanyon at inspiredlogic.com>
Subject: [Use-revolution] Re: Constraining Movement
Date: Tue, 27 Nov 2001 11:03:29 -0800
MIME-Version: 1.0
Content-Type: text/plain;
charset=us-ascii
Content-Transfer-Encoding: 7bit
References: <B8291978.DED8%scott at tactilemedia.com>
In-Reply-To: <B8291978.DED8%scott at tactilemedia.com>
At 10:20 AM -0800 11/27/01, Scott Rossi wrote:
>on mouseMove
> if not the uAllowDrag of me then exit mouseMove
> set the loc of me to \
> min(max(the mouseH,left of img myImg + (width of me/2)),\
> right of img myImg - (width of me/2)),\
> min(max(the mouseV,top of img myImg + (height of me/2)),\
> bottom of img myImg - (height of me/2))
>end mouseMove
Somehow the docs on mouseMove keep fooling people (they fooled me until Kevin pointed this out). mouseMove provides you with two arguments, which are the coordinates of the mouse. Using those is obviously more efficient than using the functions to get them again. So the above could become:
on mouseMove pMouseX,pMouseY
if not the uAllowDrag of me then exit mouseMove
set the loc of me to \
min(max(pMouseX,left of img myImg + (width of me/2)),\
right of img myImg - (width of me/2)),\
min(max(pMouseY,top of img myImg + (height of me/2)),\
bottom of img myImg - (height of me/2))
end mouseMove
Of course, if speed were much of an issue you could also precalculate and store the values used for comparison.
regards,
Geoff
--------------- MESSAGE use-revolution.v001.n145.11 ---------------
From: Troy Rollins <troy at rpsystems.net>
Subject: Re: Networking
Date: Tue, 27 Nov 2001 14:19:28 -0500
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In-Reply-To: <200111271854.NAA03437 at www.runrev.com>
Peter Reid wrote:
> How are you sharing between Windows and Macs? There are two main ways:
>
> 1) treat your network as a PC network and install Dave on the Mac
>
> 2) treat your network as a Mac network and install PC MacLAN on the
> PCs (this is what I've done)
3) Connectix (www.connectix.com) has a product called DoubleTalk, which
allows a Mac to disguise itself as a windows machine - join networks, peer
level file sharing, shared postscript printers, etc. Works as well or better
than options 1 or 2 (I've used 'm all), and is currently on sale for about
$50 USD.
--
Troy
RPSystems
www.rpsystems.net
--------------- MESSAGE use-revolution.v001.n145.12 ---------------
From: "Chipp Walters" <chipp at chipp.com>
Subject: RE: Constraining Movement
Date: Tue, 27 Nov 2001 13:32:11 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In-Reply-To: <200111271821.NAA03124 at www.runrev.com>
Scott,
why do you need the mouseRelease handler? Just wondering.
-Chipp
-----Original Message-----
From: use-revolution-errors at www.runrev.com
[mailto:use-revolution-errors at www.runrev.com]On Behalf Of Scott Rossi
Sent: Tuesday, November 27, 2001 12:21 PM
To: use-revolution at www.runrev.com
Subject: Re: Constraining Movement
Recently, Mark MacKenzie (Shaw) wrote:
> I have a small graphic based group which upon "mousemove" etc. is grabbed
by
> the mouse cursor and moved. It is placed (originally and I would like it
to
> stay here too!) within the borders an image which is some 3 times the area
> of the moveable graphic. I have been unsuccessful in constraining the
> movement of the graphic group to within this image.
Here's another (simpler?) option that seems to work for me:
on mouseDown
set the uAllowDrag of me to true
end mouseDown
on mouseMove
if not the uAllowDrag of me then exit mouseMove
set the loc of me to \
min(max(the mouseH,left of img myImg + (width of me/2)),\
right of img myImg - (width of me/2)),\
min(max(the mouseV,top of img myImg + (height of me/2)),\
bottom of img myImg - (height of me/2))
end mouseMove
on mouseUp
set the uAllowDrag of me to false
end mouseUp
on mouseRelease
mouseUp
end mouseRelease
Regards,
Scott
_____________________________________________________________________
Scott Rossi Tactile Media - Multimedia & Design
Creative Director Email: scott at tactilemedia.com
Web: www.tactilemedia.com
--------------- MESSAGE use-revolution.v001.n145.13 ---------------
From: "Ken Ray" <kray at sonsothunder.com>
Subject: Re: Re post - Masking graphics
Date: Tue, 27 Nov 2001 13:53:56 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
References: <200111271859.NAA03487 at www.runrev.com>
Scott,
Perhaps a future version of MC could allow for the repeat feature of the
backPattern to be turned off? That would provide a lot more flexibility in
doing these kinds of things and it might even be an easy addition to the
language.
Just my $0.02,
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Scott Raney" <raney at metacard.com>
To: <use-revolution at www.runrev.com>
Sent: Tuesday, November 27, 2001 12:59 PM
Subject: Re: Re post - Masking graphics
> On Mon, 26 Nov 2001 Scott Rossi <scott at tactilemedia.com> wrote:
> >
> > Recently, Ian Bridges wrote:
> >
> > > is there a way to clip a picture to a region eg a polygon,
> > > without assembling an array of masking graphics?
> >
> > > I would like to be able to change the shape of the mask/clip region
and the
> > > region of the underlying picture that is displayed with script control
> >
> > The only way I'm aware of will allow rectangular clips only: display
your
> > source image in a group or a button, and then change the group's or
button's
> > rect. I believe there's no built-in way to create oval or irregular
masks.
>
> Correct, but there is another way to do this, set the backPattern of a
> filled graphic object. Note that the image repeats if your graphic is
> larger than the image, and that there are restrictions on the possible
> sizes of the image (e.g., on the Mac it has to be a power of 2 in both
> width and height and must be less than 64K bytes total). But at least
> on NT/2000/XP and UNIX systems you can do a lot with this feature.
> Regards,
> Scott
>
> > Regards,
> >
> > Scott
> >
> > _____________________________________________________________________
> > Scott Rossi Tactile Media - Multimedia & Design
> > Creative Director Email: scott at tactilemedia.com
> > Web: www.tactilemedia.com
> >
>
> ********************************************************
> Scott Raney raney at metacard.com http://www.metacard.com
> MetaCard: You know, there's an easier way to do that...
>
>
--------------- MESSAGE use-revolution.v001.n145.14 ---------------
From: "Ken Ray" <kray at sonsothunder.com>
Subject: Re: Constraining Movement
Date: Tue, 27 Nov 2001 14:01:54 -0600
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
References: <200111271821.NAA03124 at www.runrev.com>
Scott,
I like yours because you can "slide" around the edges of the bounding
rectangle. However, the mouseDown-ed object's loc still snaps to the
mouseLoc. Here's a revised version that doesn't do that:
on mouseDown
set the uAllowDrag of me to true
set the dX of me to (the mouseH - item 1 of loc of me)
set the dY of me to (the mouseV - item 2 of loc of me)
end mouseDown
on mouseMove
if not the uAllowDrag of me then exit mouseMove
put the mouseH - (the dX of me) into offsetMouseH
put the mouseV - (the dY of me) into offsetMouseV
set the loc of me to \
min(max(offsetMouseH,left of img myImg + (width of me/2)),\
right of img myImg - (width of me/2)),\
min(max(offsetMouseV,top of img myImg + (height of me/2)),\
bottom of img myImg - (height of me/2))
end mouseMove
on mouseUp
set the uAllowDrag of me to false
end mouseUp
on mouseRelease
mouseUp
end mouseRelease
I love this collaboration! :-)
Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Scott Rossi" <scott at tactilemedia.com>
To: <use-revolution at www.runrev.com>
Sent: Tuesday, November 27, 2001 12:20 PM
Subject: Re: Constraining Movement
> Recently, Mark MacKenzie (Shaw) wrote:
>
> > I have a small graphic based group which upon "mousemove" etc. is
grabbed by
> > the mouse cursor and moved. It is placed (originally and I would like
it to
> > stay here too!) within the borders an image which is some 3 times the
area
> > of the moveable graphic. I have been unsuccessful in constraining the
> > movement of the graphic group to within this image.
>
> Here's another (simpler?) option that seems to work for me:
>
> on mouseDown
> set the uAllowDrag of me to true
> end mouseDown
>
> on mouseMove
> if not the uAllowDrag of me then exit mouseMove
> set the loc of me to \
> min(max(the mouseH,left of img myImg + (width of me/2)),\
> right of img myImg - (width of me/2)),\
> min(max(the mouseV,top of img myImg + (height of me/2)),\
> bottom of img myImg - (height of me/2))
> end mouseMove
>
> on mouseUp
> set the uAllowDrag of me to false
> end mouseUp
>
> on mouseRelease
> mouseUp
> end mouseRelease
>
>
>
> Regards,
>
> Scott
>
> _____________________________________________________________________
> Scott Rossi Tactile Media - Multimedia & Design
> Creative Director Email: scott at tactilemedia.com
> Web: www.tactilemedia.com
>
>
--------------- MESSAGE use-revolution.v001.n145.15 ---------------
From: "Sjoerd Op 't Land" <sjoerdoptland at mac.com>
Subject: Re: Constraining Movement
Date: Tue, 27 Nov 2001 21:15:00 +0100
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In-Reply-To: <200111271821.NAA03124 at www.runrev.com>
Scott Rossi wrote/ schreef:
> on mouseDown
> set the uAllowDrag of me to true
> end mouseDown
>
> on mouseMove
> if not the uAllowDrag of me then exit mouseMove
> set the loc of me to \
> min(max(the mouseH,left of img myImg + (width of me/2)),\
> right of img myImg - (width of me/2)),\
> min(max(the mouseV,top of img myImg + (height of me/2)),\
> bottom of img myImg - (height of me/2))
> end mouseMove
>
> on mouseUp
> set the uAllowDrag of me to false
> end mouseUp
>
> on mouseRelease
> mouseUp
> end mouseRelease
Very good! Works like a charm!
The only glitch is that when I keep the mouse down and move it outside the
window, release, and come back into the rectangle, the button moves with the
mouse again.
The solution is quite easy: put the following in the stack script:
on mouseLeave
send "mouseRelease" to button "myButton"
end mouseLeave
Wow! What an example of teamwork: we have a perfect solution in like 5 hours
or so! Great list, great people!
Regards, / Groeten,
Sjoerd
--------------- END use-revolution.v001.n145 ---------------
More information about the use-livecode
mailing list