Page 1 of 1

Dragging files to cards

Posted: Wed May 02, 2012 6:57 pm
by rrBUSS9EE
Hi… What do I need to do to accept a drop on a card or image object? Currently I am seeing the "crossed out circle" on any areas other than fields.

Thanks.

Re: Dragging files to cards

Posted: Wed May 02, 2012 7:29 pm
by Klaus
Hi,

yes, Drag'n'Drop of text (to fields) does work out of the box wihtout any scripting.
Everything elsre needs to be scripted.

What exactly do you want to do?
What object(s) need to acceopt the DROPping?
Put the fielnames into a field? Set filename of images/pkayers?
Need to know this to give you a working example for your needs :D

Ah, and welcome to the forum!


Best

Klaus

P.S.
Please check these stacks, really great learning resources:
http://www.runrev.com/developers/lesson ... nferences/

Re: Dragging files to cards

Posted: Wed May 02, 2012 7:39 pm
by rrBUSS9EE
Thanks Klaus!

I have a number of things I want to do, but why don't we start with just one as I am guessing I'll figure out the rest when I know what to do for this one.

I want to drag a file from the Finder to a card. On drop, I'd like to verify it is an image and if so, create a new image object and set it to the dropped image file.

Re: Dragging files to cards

Posted: Wed May 02, 2012 8:02 pm
by mwieder
Welcome to the forum. You may find this useful:

http://lessons.runrev.com/s/lessons/m/4 ... t-a-primer

Re: Dragging files to cards

Posted: Wed May 02, 2012 8:19 pm
by rrBUSS9EE
mwieder wrote:Welcome to the forum. You may find this useful:
What I get from this is that the destination requires a dragEnter handler. I have put one in the card script. The message is not sent when I drag a file from the Finder to the card. It is sent to a field on the card if the mouse is over that.

I am looking to drop the file on the card (and not a cd object).

Re: Dragging files to cards

Posted: Wed May 02, 2012 8:28 pm
by Klaus
Hi,

a stack will tell more than thousand words :D
It also shows a workaround for the fact that "naked" cards do not accept DROPping.


Best

Klaus

Re: Dragging files to cards

Posted: Wed May 02, 2012 8:31 pm
by mwieder
ROTFL. I did something similar, importing an image, sizing it to the stack size, and setting its blendlevel to 100. Same effect.

Re: Dragging files to cards

Posted: Wed May 02, 2012 8:49 pm
by rrBUSS9EE
Thank you both. No card level drops being allowed was indeed the issue.