Moving Stacks or the Mouse

Thomas McGrath III 3mcgrath at adelphia.net
Wed Jun 8 19:58:10 EDT 2005


Roger,

You could capture the start points x,y and then you must know your end 
points u,v and figure the stepping distance between the two. So if you 
had x= 200 and u = 340 and you wanted a step of 10 then you could 
repeat with a = x to u step 10 or (200, 210, 220, 230, 240... 
320,330,340)
Or written like this: (not tested yet)

	repeat with a = x to u step 10
   	  put a & cr after myLocsOne
   	end repeat
	repeat with b = y to v step 10
  	  put  b & cr after myLocsTwo
  	end repeat

Then put the two lists together.

repeat with h = 1 to the number of lines in myLocsOne
	put (line h of myLocsOne) & "," & (line h of myLocsTwo) into line h of 
myLocs
end repeat

repeat with x = 1 to the number of lines in myLocs
    set the screenMouseLoc to (line x of myLocs)
     wait 500 milliseconds -- adjust this to a speed that feels good to 
you
end repeat


Tom
P.S. you can also do this kind of thing with the points of a polygon or 
line etc. and record or as I have done with the localLoc of buttons

HTHs

On Jun 8, 2005, at 7:30 PM, Roger Guay wrote:

> Thom,
>
> Thank you for this suggestion.  First let me explain that I am 
> building an animated tutorial and otherwise agree with you on the 
> inadvisability of moving the mouse for the user.  However my tutorial 
> I will require the "animation" of the mouse to occur over many 
> different paths across open stacks.  How would I generate list of 
> points for many paths that would result in a smooth animation of the 
> mouse movement?
>
> You can see why I also thought of moving a tiny stack whose 
> windowShape is a hand or pointer from the location of a point of one 
> stack to the location of a point in another stack.  This I have done, 
> but I still wonder if there isn't an easier way??
>
> Thanks and cheers, Roger
>
> Ps.  I'm sorry I dropped the Subject Heading last go-around.
>
>
> On Jun 8, 2005, at 3:26 PM, use-revolution-request at lists.runrev.com 
> wrote:
>
>> You might want to have a list of the coordinates in a variable and 
>> then
>> go through each line in a loop with:
>>
>> on mouseUp
>>    put "252,348" & cr & "267,323" & cr & "274,318" & cr & "285,275" & 
>> cr
>> & "292,248" into myLocs -- for a sample
>>
>> --or adjust this to your needs
>> --put globalLoc(the loc of group h) & cr after myLocs
>>
>> repeat with x = 1 to the number of lines in myLocs
>>    set the screenMouseLoc to (line x of myLocs)
>>     wait 500 milliseconds
>> end repeat
>> end mouseUp
>>
>> thereby making the mouse move to the points in the list. IMPORTANT 
>> this
>> is not normal HIG behavior and users do not like it when the mouse is
>> moved for them. It does have it's good points and I use it in animated
>> tutorials.
>>
>> I set points
>> On Jun 8, 2005, at 6:12 PM, Roger Guay wrote:
>>
>>
>>> Hi Eric,
>>>
>>> Not quite what I want.  I want to simulate (script) the MOVEMENT of
>>> the mouse from one location to another across stacks.  I don't want 
>>> to
>>> just set the mouse location but rather move it uniformly from one
>>> location to another.  Am I still missing something obvious??
>>>
>>> Cheers, Roger
>>>
>>>
>>> On Jun 8, 2005, at 1:41 PM, use-revolution-request at lists.runrev.com
>>> wrote:
>>>
>>>
>>>> What you need is: set the screenMouseLoc to tH,tV
>>>> Check the screenMouseLoc property in the docs :-)
>>>>
>>>> Le 8 juin 05 à 23:08, Roger Guay a écrit :
>>>>
>>>>
>>>>
>>>>> Thanks, Xavier.  I am aware of the ability to drag a tool from one
>>>>> point to another, But drag mouse does not work!  And of course,
>>>>> this is what I really want . . . I want to drag the mouse from one
>>>>> point to another across open stacks.  Since I could not figure out
>>>>> how to do this specifically, I then decided to move a tiny window
>>>>> with a "hand" shape from a point within one stack to a point in
>>>>> another stack.  To do this, I have successfully worked out the
>>>>> required geometry.  But, I still wonder if there is a way to move
>>>>> the mouse itself??  Am I missing something obvious??
>>>>>
>>>>>
>>>>
>>>> Best regards from Paris,
>>>>
>>>> Eric Chatonet.
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>

Thomas J. McGrath III
SCS
1000 Killarney Dr.
Pittsburgh, PA 15234
412-885-8541


More information about the use-livecode mailing list