How to erase..

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mario baccheschi
Posts: 13
Joined: Mon Oct 26, 2009 7:30 pm

How to erase..

Post by mario baccheschi » Fri Apr 23, 2010 6:56 pm

Goodevenig to everybody
may YOU help me to erase part of an img from a script?
I would have a btn with a script which could erase a part of an image
Many thanks
mario

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: How to erase..

Post by Mark » Fri Apr 23, 2010 11:24 pm

Hi Mario,

Here's a simple way:

Code: Select all

on mouseUp
     lock screen
     choose select tool
     drag from the topleft of img 1 to the loc of img 1
     cut
     choose browse tool
     unlock screen
end mouseUp
Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

mario baccheschi
Posts: 13
Joined: Mon Oct 26, 2009 7:30 pm

Re: How to erase..

Post by mario baccheschi » Sat Apr 24, 2010 2:07 pm

Many thanks Mark
but it doesn't run
On my project i have srveral btns and i need to erase the part of the img which is the area of the btn..
mario

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: How to erase..

Post by Mark » Sat Apr 24, 2010 2:58 pm

Hi Mario,

Of course it runs. Probably, you mean that it doesn't do what you want.

Why exactly do you want to delete an area of an image that's covered by a button?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

mario baccheschi
Posts: 13
Joined: Mon Oct 26, 2009 7:30 pm

Re: How to erase..

Post by mario baccheschi » Sat Apr 24, 2010 3:55 pm

..some btns are transparent... and only the img over them is visible...
by clicking on a different btn ... it should be possible to erase a part of the img...
mario

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: How to erase..

Post by Mark » Sat Apr 24, 2010 4:03 pm

Dear Mario,

Why? Maybe there's a different way to do it, but I need to know why.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

mario baccheschi
Posts: 13
Joined: Mon Oct 26, 2009 7:30 pm

Re: How to erase..

Post by mario baccheschi » Sat Apr 24, 2010 4:30 pm

Dear Mark
some times the procedure you told me runs ... and the corrispondent part of the img is erased...
some times it doesn't happen nothing...
perhapse it depends from the img data... i use imgs taken from web..
i'm studying it..
best,
mario

mario baccheschi
Posts: 13
Joined: Mon Oct 26, 2009 7:30 pm

Re: How to erase..

Post by mario baccheschi » Sat Apr 24, 2010 5:13 pm

Hi Mark
I' thinking also that it may be impossible to drag ,within an image, if the point from which the drag action begins is not within the img itself....
mario

Post Reply