Load images at proportional size
Mark Schonewille
m.schonewille at economy-x-talk.com
Sun Jul 5 20:22:58 EDT 2009
Josep,
The crash is indeed a very big problem with D&D. It is very
frustrating that this hasn't been fixed yet. The following might help.
First, get the dragdata and then give Revolution time to deal with it
by itself. The send command will execute the remainder of your script
after Revolution has done it's thing.
local lbl_filename
on dragDrop
put the last item of the dragdata into fld lbl_filename
send "doDDstuff" to me in 0 millisecs
end dragDrop
on doDDstuff
-- do everything else here
end doDDstuff
Please, let me know whether this avoids the crash.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
Snapper Screen Recorder 2.1 http://snapper.economy-x-talk.com
If you sent me an e-mail before 21 June and haven't got a reply yet,
please send me a reminder.
On 6 jul 2009, at 02:05, Josep wrote:
>
> Thanks Mark,... works fine...
>
> But now I detecting some extrange issue. When Drag from the desktop
> or the
> web page sometime the source image have height and width = 0... I
> don't know
> why, some times drag and drop perfectly and sometime no, and Rev
> crash!
>
> Code:
>
> on dragDrop
> lock screen
> set the width of me to 210
> set the height of me to 295
> set the threeD of me to true
> set itemdel to "/"
> put the last item of the dragdata into fld lbl_filename
>
> put URL the dragData into me
> put rescale( the formattedwidth of me,the formattedheight of
> me,the width
> of me,the height of me) into myNewSize
> set itemdel to comma
> set the width of me to item 1 of myNewSize
> set the height of me to item 2 of myNewSize
> unlock screen
> end dragDrop
>
> I set the width and height at the begin to put the original size, so
> if the
> image is rescaled to a small size the next time the image have these
> size.
>
> Any idea?
>
> Salut,
> Josep
>
More information about the use-livecode
mailing list