Re: drag question

2008-01-18 Thread Eric Chatonet

Hi Mark,

Le 18 janv. 08 à 20:27, Mark Swindell a écrit :


Eric,

Thank you so much.  Your solution appears to work perfectly. (more  
below)


Glad if it could help :-)


On Jan 18, 2008, at 2:07 AM, Eric Chatonet wrote:


Hi Mark,

I put a large image on a card then added some grouped label fields  
on top.
First not any mouseDown will be sent to the group when you don't  
click on an object in this group: this is normal :-)


I wonder why it was working in my case, then?  What I was doing  
_only_ worked when there was no object beneath the group, at least  
none affiliated with the group.  At the lowest card level there was  
the image... could that have passed a mouseUp to a group of which  
it was not part?


(Actually, this isn't entirely true...the fields themselves were  
part of two imbedded groups within the main card group that held  
the script.)


Second, I noticed that mouseDown is received when clicking on a  
field but the grab command is not executed :-(

Sounds like a bug to me...


I guess I should file this, then.  My assumption was correct then,  
that the mouseDown over the field should have been acted on in the  
group script?


I wonder: probably the 'grab' command does not work when the dragged  
object is not the object just under the mouse even if it is transparent.
No time now to experiment but I suspect something like this: kind of  
security scheme to not confuse beginners ;-)

Docs don't say anything about such a point.

Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: drag question

2008-01-18 Thread Mark Swindell

Eric,

Thank you so much.  Your solution appears to work perfectly. (more  
below)


On Jan 18, 2008, at 2:07 AM, Eric Chatonet wrote:


Hi Mark,

I put a large image on a card then added some grouped label fields  
on top.
First not any mouseDown will be sent to the group when you don't  
click on an object in this group: this is normal :-)


I wonder why it was working in my case, then?  What I was doing  
_only_ worked when there was no object beneath the group, at least  
none affiliated with the group.  At the lowest card level there was  
the image... could that have passed a mouseUp to a group of which it  
was not part?


(Actually, this isn't entirely true...the fields themselves were part  
of two imbedded groups within the main card group that held the script.)


Second, I noticed that mouseDown is received when clicking on a  
field but the grab command is not executed :-(

Sounds like a bug to me...


I guess I should file this, then.  My assumption was correct then,  
that the mouseDown over the field should have been acted on in the  
group script?


Mark
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: drag question

2008-01-18 Thread Eric Chatonet

Hi Mark,

I put a large image on a card then added some grouped label fields on  
top.
First not any mouseDown will be sent to the group when you don't  
click on an object in this group: this is normal :-)
Second, I noticed that mouseDown is received when clicking on a field  
but the grab command is not executed :-(

Sounds like a bug to me...

Here is a workaround.
In the script of the image:

on mouseDown
  grab me
end mouseDown

And in the group's script:

local lAllowDrag
-
on mouseDown
  put the mouseH - the left of img "Artwork" & comma & the mouseV -  
the top of img "Artwork" into lAllowDrag

end mouseDown
-
on mouseMove x,y
  if lAllowDrag is empty then exit mouseMove
  set the topleft of img "Artwork" to (x - item 1 of lAllowDrag &  
comma & y - item 2 of lAllowDrag)

end mouseMove
-
on mouseUp
  put empty into lAllowDrag
end mouseUp
-
on mouseRelease
  mouseUp
end mouseRelease
-
on mouseEnter
  put empty into lAllowDrag
end mouseEnter

Now you can move the image from anywhere.
Hope this helps.

Le 18 janv. 08 à 03:56, Mark Swindell a écrit :

I have an image that resides below a group and is not part of the  
group.  The group consists of  a collection of fields which have no  
scripts and are not focusable.  In the group script I placed the  
handler:


on mouseDown
grab image "artwork"
end mouseDown

This works if don't select directly over a field, and I can adjust  
the position of the  image by dragging it around.If I click  
over a field it doesn't work.  I'm assuming the mouseDown if being  
trapped by the field.  But shouldn't it be passed along to the  
group script?


I'm not outside the bounds of the image.

Can anyone clarify what is happing here, or suggest another  
approach to being able to move the image around?


Thanks,
Mark


Best regards from Paris,
Eric Chatonet.

Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: [EMAIL PROTECTED]/



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


drag question

2008-01-17 Thread Mark Swindell
I have an image that resides below a group and is not part of the  
group.  The group consists of  a collection of fields which have no  
scripts and are not focusable.  In the group script I placed the  
handler:


on mouseDown
grab image "artwork"
end mouseDown

This works if don't select directly over a field, and I can adjust  
the position of the  image by dragging it around.If I click over  
a field it doesn't work.  I'm assuming the mouseDown if being trapped  
by the field.  But shouldn't it be passed along to the group script?


I'm not outside the bounds of the image.

Can anyone clarify what is happing here, or suggest another approach  
to being able to move the image around?


Thanks,
Mark



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution