Re: Drag n Drop Objects in Flash vs. Rev
Graham Samuel wrote: If Monte is content to allow the user to drag an object anywhere in a window and then apply the constraints when the user lets go of the mouse (giving a kind of rubber-band effect, which can look quite attractive in some circumstances), then it seems to me that there is only one elegant solution, which is to use 'grab me' - it's built in and it's very concise. In the 'rubber-band' case, I can't see any need for any other solution. Should there be an extension of the grab command that specifies a bounding rect?: grab me within the rect of graphic boundary -- Richard Gaskin Fourth World Media Corporation ___ [EMAIL PROTECTED] http://www.FourthWorld.com Tel: 323-225-3717 AIM: FourthWorldInc ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
On Thu, 4 Dec 2003 08:23:54 +1000, Sarah [EMAIL PROTECTED] wrote: Check out: http://lists.runrev.com/pipermail/use-revolution/2002-March/002702.html IN this, Geoff Canyon says: on mouseDown put true into tDragging end mouseDown on mouseMove mouseX,mouseY if tDragging then -- Do bounds checking here -- set the loc of me to (mouseX,mouseY) end if end mouseMove on mouseUp stopDragging end mouseUp on mouseRelease stopDragging end mouseRelease on stopDragging put false into tDragging end stopDragging IMHO, the **only** reason to use a scheme like this is in order to constrain the dragged object completely, i.e. so that the user can't move the object out of some chosen bounds (say a particular rectangle) even while dragging. If Monte is content to allow the user to drag an object anywhere in a window and then apply the constraints when the user lets go of the mouse (giving a kind of rubber-band effect, which can look quite attractive in some circumstances), then it seems to me that there is only one elegant solution, which is to use 'grab me' - it's built in and it's very concise. In the 'rubber-band' case, I can't see any need for any other solution. Just two more Eurocents Graham -- --- Graham Samuel / The Living Fossil Co. / UK France ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
This loop uses 100% of the CPU time, regardless of the speed of the processor, bringing the system to its knees, causing poor feedback for your app, and making your system unresponsive to any other processes running on it. oh and one more thing close finder - Original Message - From: J. Landman Gay [EMAIL PROTECTED] To: How to use Revolution [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 10:32 PM Subject: Re: Drag n Drop Objects in Flash vs. Rev On 12/3/03 9:48 PM, Judy Perry wrote: I just checked this link out. From what I read, it's a much more verbose solution and the only advantage I see mentioned is that it prevents the user from dragging an object out of bounds (whatever that means -- out of its intended target? Off the card?). Am I understanding it correctly? Continually polling the mouse location in a repeat loop uses up a lot of system resources. In MacOS (before OS X) it wasn't as big a deal because the Mac didn't really multitask and so you weren't holding up any other apps very much by hogging the event queue with a long repeat loop. But on all other OSs, tying up the event queue with non-stop polling can cause problems with other background tasks. The more efficient (and Raney-approved) method is to use built-in Rev messages to do the polling for you. I explain it more here: http://www.hyperactivesw.com/polling.html -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
Continually polling the mouse location in a repeat loop uses up a lot of system resources. In MacOS (before OS X) it wasn't as big a deal because the Mac didn't really multitask and so you weren't holding up any other apps very much by hogging the event queue with a long repeat loop. But on all other OSs, tying up the event queue with non-stop polling can cause problems with other background tasks. The more efficient (and Raney-approved) method is to use built-in Rev messages to do the polling for you. I explain it more here: http://www.hyperactivesw.com/polling.html -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com Jacque, Is there a way to simulate: Repeat until the mouseClick without monopolizing the CPU? This repeat loop is useful when you want the user to be able to click the mouse to stop or interrupt screen activity. Jim ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
On 12/4/03 6:11 AM, Jim Hurley [EMAIL PROTECTED] wrote: Is there a way to simulate: Repeat until the mouseClick without monopolizing the CPU? This repeat loop is useful when you want the user to be able to click the mouse to stop or interrupt screen activity. You might try the following. In your message box, type: go url http://www.tactilemedia.com/download/clickdetector.rev; As Jacque stated, and more importantly, as the creators of the engine have stated, the combination of a repeat loop and polling the mouse is inefficient for their engine. So better to use mouseMove, variable states, and send in Regards, Scott Rossi Creative Director Tactile Media, Multimedia Design - E: [EMAIL PROTECTED] W: http://www.tactilemedia.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Drag n Drop Objects in Flash vs. Rev
Roman, Don't use idle. There are a number of postings earlier on this subject. In fact the one below is from Scott Raney, the creator of the MetaCard engine: http://lists.runrev.com/pipermail/use-revolution/2002-February/002304.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Roman Opendak Sent: Thursday, December 04, 2003 11:57 AM To: How to use Revolution Subject: Re: Drag n Drop Objects in Flash vs. Rev Is there a way to simulate: Repeat until the mouseClick without monopolizing the CPU? This repeat loop is useful when you want the user to be able to click the mouse to stop or interrupt screen activity. Jim here's a script that takes up 50 % of the cpu time... heh, heh it goes in the cd script on opencard global counter put 0 into counter end opencard on idle global counter add 1 to counter if counter = 2 then put 0 into counter repeat with i = 1 to number of cd btns set the loc of cd btn i to random(height of this cd), random(width of this cd) end repeat end if end idle its not exaclty game speed but its great for making things blink! ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
On 12/4/03 1:52 AM, Graham Samuel [EMAIL PROTECTED] wrote: on mouseDown put true into tDragging end mouseDown on mouseMove mouseX,mouseY if tDragging then -- Do bounds checking here -- set the loc of me to (mouseX,mouseY) end if end mouseMove on mouseUp stopDragging end mouseUp on mouseRelease stopDragging end mouseRelease on stopDragging put false into tDragging end stopDragging IMHO, the **only** reason to use a scheme like this is in order to constrain the dragged object completely, i.e. so that the user can't move the object out of some chosen bounds (say a particular rectangle) even while dragging. If Monte is content to allow the user to drag an object anywhere in a window and then apply the constraints when the user lets go of the mouse (giving a kind of rubber-band effect, which can look quite attractive in some circumstances), then it seems to me that there is only one elegant solution, which is to use 'grab me' - it's built in and it's very concise. In the 'rubber-band' case, I can't see any need for any other solution. The above handler set is not only appropriate for constraining mouse movement, but can also be adapted to monitor the positions of dragged objects and allow responses from target objects *while the dragging is taking place* -- this can't be done using the grab command. Regards, Scott Rossi Creative Director Tactile Media, Multimedia Design - E: [EMAIL PROTECTED] W: http://www.tactilemedia.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
On 12/4/03 8:11 AM, Jim Hurley wrote: Jacque, Is there a way to simulate: Repeat until the mouseClick without monopolizing the CPU? This repeat loop is useful when you want the user to be able to click the mouse to stop or interrupt screen activity. Scott Rossi gave a good example. But I'll just add that I'm not immune myself to the convenience of the repeat loop. There are times when I know it is inefficient but I decide to take the trade-off anyway for the sake of convenience. But I usually indulge only for stacks I write for my own use. I use the approved method for anything that is shipping. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
Thanks, Jacque. I'll have a look. Judy On Thu, 4 Dec 2003, J. Landman Gay wrote: On 12/3/03 9:48 PM, Judy Perry wrote: I just checked this link out. From what I read, it's a much more verbose solution and the only advantage I see mentioned is that it prevents the user from dragging an object out of bounds (whatever that means -- out of its intended target? Off the card?). Am I understanding it correctly? Continually polling the mouse location in a repeat loop uses up a lot of system resources. In MacOS (before OS X) it wasn't as big a deal because the Mac didn't really multitask and so you weren't holding up any other apps very much by hogging the event queue with a long repeat loop. But on all other OSs, tying up the event queue with non-stop polling can cause problems with other background tasks. The more efficient (and Raney-approved) method is to use built-in Rev messages to do the polling for you. I explain it more here: http://www.hyperactivesw.com/polling.html -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
Is there a way to simulate: Repeat until the mouseClick without monopolizing the CPU? This repeat loop is useful when you want the user to be able to click the mouse to stop or interrupt screen activity. Jim here's a script that takes up 50 % of the cpu time... heh, heh it goes in the cd script on opencard global counter put 0 into counter end opencard on idle global counter add 1 to counter if counter = 2 then put 0 into counter repeat with i = 1 to number of cd btns set the loc of cd btn i to random(height of this cd), random(width of this cd) end repeat end if end idle its not exaclty game speed but its great for making things blink! ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
On Thu, 04 Dec 2003 07:54:07 -0800, Scott Rossi [EMAIL PROTECTED] wrote: [apropos of Geoff Canyon's 'constraint' example} The above handler set is not only appropriate for constraining mouse movement, but can also be adapted to monitor the positions of dragged objects and allow responses from target objects *while the dragging is taking place* -- this can't be done using the grab command. Yep - you're right of course. In fact it can give the effect of rollovers and so forth while dragging. I should have thought of that. Graham -- --- Graham Samuel / The Living Fossil Co. / UK France ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
on 12/4/03 9:00 AM, [EMAIL PROTECTED] at [EMAIL PROTECTED] wrote: Date: Thu, 4 Dec 2003 16:55:55 + From: Graham Samuel [EMAIL PROTECTED] Subject: Re: Drag n Drop Objects in Flash vs. Rev On Thu, 04 Dec 2003 07:54:07 -0800, Scott Rossi [EMAIL PROTECTED] wrote: [apropos of Geoff Canyon's 'constraint' example} The above handler set is not only appropriate for constraining mouse movement, but can also be adapted to monitor the positions of dragged objects and allow responses from target objects *while the dragging is taking place* -- this can't be done using the grab command. -- And thus comes my personal request: A more useful 'grab' command. like in SuperCard, where you have add-on parameters which allow constraint coordinates and handlers to run. What say ye? Ken N. ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Drag n Drop Objects in Flash vs. Rev
Hi, Here's how I have done this; since other solutions have been presented, perhaps someone could advise me if I'm doing it the wrong way? on mouseStillDown set the loc of me to the mouseLoc end mouseStillDown If I only want items deposited in a certain area, I do a loc detection on a mouseUp handler. Is this a bad way of doing things? Thanks! Judy On Wed, 3 Dec 2003, Monte Goulding wrote: Can anyone point me in the right direction? Do Rev objects have built in drag and drop functionality, and if so, how is it accessed? If it's a simple drag then you might want to see the grab command. More complex drags can be done using mouse events (particularly mouseMove). Cheers Monte ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
Check out: http://lists.runrev.com/pipermail/use-revolution/2002-March/002702.html Cheers, Sarah On 4 Dec 2003, at 8:06 am, Judy Perry wrote: Hi, Here's how I have done this; since other solutions have been presented, perhaps someone could advise me if I'm doing it the wrong way? on mouseStillDown set the loc of me to the mouseLoc end mouseStillDown If I only want items deposited in a certain area, I do a loc detection on a mouseUp handler. Is this a bad way of doing things? Thanks! Judy On Wed, 3 Dec 2003, Monte Goulding wrote: Can anyone point me in the right direction? Do Rev objects have built in drag and drop functionality, and if so, how is it accessed? If it's a simple drag then you might want to see the grab command. More complex drags can be done using mouse events (particularly mouseMove). Cheers Monte ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
I just checked this link out. From what I read, it's a much more verbose solution and the only advantage I see mentioned is that it prevents the user from dragging an object out of bounds (whatever that means -- out of its intended target? Off the card?). Am I understanding it correctly? Sorry to be so dense... Judy On Thu, 4 Dec 2003, Sarah wrote: Check out: http://lists.runrev.com/pipermail/use-revolution/2002-March/002702.html Cheers, Sarah On 4 Dec 2003, at 8:06 am, Judy Perry wrote: Hi, Here's how I have done this; since other solutions have been presented, perhaps someone could advise me if I'm doing it the wrong way? on mouseStillDown set the loc of me to the mouseLoc end mouseStillDown If I only want items deposited in a certain area, I do a loc detection on a mouseUp handler. Is this a bad way of doing things? Thanks! Judy On Wed, 3 Dec 2003, Monte Goulding wrote: Can anyone point me in the right direction? Do Rev objects have built in drag and drop functionality, and if so, how is it accessed? If it's a simple drag then you might want to see the grab command. More complex drags can be done using mouse events (particularly mouseMove). Cheers Monte ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
That is the advantage. It checks the new loc continuously so instead of dragging and then checking, this way checks as you go. Because mouseMove is generated all the time, not just when the mouse is down, you need the flag to tell it when to move and when not to. Cheers, Sarah On 4 Dec 2003, at 1:50 pm, Judy Perry wrote: I just checked this link out. From what I read, it's a much more verbose solution and the only advantage I see mentioned is that it prevents the user from dragging an object out of bounds (whatever that means -- out of its intended target? Off the card?). Am I understanding it correctly? Sorry to be so dense... Judy On Thu, 4 Dec 2003, Sarah wrote: Check out: http://lists.runrev.com/pipermail/use-revolution/2002-March/ 002702.html Cheers, Sarah On 4 Dec 2003, at 8:06 am, Judy Perry wrote: Hi, Here's how I have done this; since other solutions have been presented, perhaps someone could advise me if I'm doing it the wrong way? on mouseStillDown set the loc of me to the mouseLoc end mouseStillDown If I only want items deposited in a certain area, I do a loc detection on a mouseUp handler. Is this a bad way of doing things? Thanks! Judy On Wed, 3 Dec 2003, Monte Goulding wrote: Can anyone point me in the right direction? Do Rev objects have built in drag and drop functionality, and if so, how is it accessed? If it's a simple drag then you might want to see the grab command. More complex drags can be done using mouse events (particularly mouseMove). Cheers Monte ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
what if instead of mouseup you use a loop in mousedown with the same ideas applied. like, on mousedown repeat while the mouse is down set the loc of me (the target) to the mouseloc end repeat drop end mousedown now that i think about it, its only twenty ticks or so. cause instead of waiting for the messages to go through and waisting time on a function, you avoid stepping into it. i usually do it with icons and drag around a tooltip too Rome - Original Message - From: Sarah Reichelt [EMAIL PROTECTED] To: How to use Revolution [EMAIL PROTECTED] Sent: Wednesday, December 03, 2003 8:02 PM Subject: Re: Drag n Drop Objects in Flash vs. Rev That is the advantage. It checks the new loc continuously so instead of dragging and then checking, this way checks as you go. Because mouseMove is generated all the time, not just when the mouse is down, you need the flag to tell it when to move and when not to. Cheers, Sarah On 4 Dec 2003, at 1:50 pm, Judy Perry wrote: I just checked this link out. From what I read, it's a much more verbose solution and the only advantage I see mentioned is that it prevents the user from dragging an object out of bounds (whatever that means -- out of its intended target? Off the card?). Am I understanding it correctly? Sorry to be so dense... Judy On Thu, 4 Dec 2003, Sarah wrote: Check out: http://lists.runrev.com/pipermail/use-revolution/2002-March/ 002702.html Cheers, Sarah On 4 Dec 2003, at 8:06 am, Judy Perry wrote: Hi, Here's how I have done this; since other solutions have been presented, perhaps someone could advise me if I'm doing it the wrong way? on mouseStillDown set the loc of me to the mouseLoc end mouseStillDown If I only want items deposited in a certain area, I do a loc detection on a mouseUp handler. Is this a bad way of doing things? Thanks! Judy On Wed, 3 Dec 2003, Monte Goulding wrote: Can anyone point me in the right direction? Do Rev objects have built in drag and drop functionality, and if so, how is it accessed? If it's a simple drag then you might want to see the grab command. More complex drags can be done using mouse events (particularly mouseMove). Cheers Monte ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Drag n Drop Objects in Flash vs. Rev
On 12/3/03 9:48 PM, Judy Perry wrote: I just checked this link out. From what I read, it's a much more verbose solution and the only advantage I see mentioned is that it prevents the user from dragging an object out of bounds (whatever that means -- out of its intended target? Off the card?). Am I understanding it correctly? Continually polling the mouse location in a repeat loop uses up a lot of system resources. In MacOS (before OS X) it wasn't as big a deal because the Mac didn't really multitask and so you weren't holding up any other apps very much by hogging the event queue with a long repeat loop. But on all other OSs, tying up the event queue with non-stop polling can cause problems with other background tasks. The more efficient (and Raney-approved) method is to use built-in Rev messages to do the polling for you. I explain it more here: http://www.hyperactivesw.com/polling.html -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Drag n Drop Objects in Flash vs. Rev
Can anyone point me in the right direction? Do Rev objects have built in drag and drop functionality, and if so, how is it accessed? If it's a simple drag then you might want to see the grab command. More complex drags can be done using mouse events (particularly mouseMove). Cheers Monte ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution