trying to get image functionality as in RB

wayne durden wdurden at gmail.com
Fri Apr 6 18:57:49 EDT 2007


Thank you Ken!  I will give that a go shortly.  It looks like it will
shorten the existing method I was using that was handling the local files as
well.

Thank you very much!

Wayne


On 4/6/07, Ken Ray <kray at sonsothunder.com> wrote:
>
> On Fri, 6 Apr 2007 16:58:50 -0400, wayne durden wrote:
>
> > Hi all!  I am trying to rebuild an app I have in RB which takes an image
> > dropped on it and resizes it.  I am able to duplicate the app for images
> on
> > the local computer file system, but with my RB app I can drag an image
> from
> > a browser which is actually the primary use of it.. (i.e., take an image
> > from a web page, drop it on the app and get a smaller version which is
> also
> > copied to the clipboard for pasting elsewhere).
> >
> > Is there a way to get an image from a browser into an image on a card by
> > drag an drop?  I can and have handled all the other aspects, resizing,
> > copying to clipboard, I just can't figure out the drag and drop from the
> > browser part...
>
> Sure... here's a way, assuming you already have an image object on the
> card and you're dropping onto it (this is the script of the image
> object):
>
> on dragEnter
>   set the acceptDrop to true
>   pass dragEnter
> end dragEnter
>
> on dragDrop
>   if the dragData["image"] is not empty then
>     put the dragData["image"] into me
>   else
>     beep
>   end if
> end dragDrop
>
> For more info on D-n-D, see this tip:
>
>     http://www.sonsothunder.com/devres/revolution/tips/mous002.htm
>
> Hope this helps,
>
>
>
> Ken Ray
> Sons of Thunder Software, Inc.
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list