This might be useful for some (New AGAIN)

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

micmac
Posts: 29
Joined: Mon May 30, 2011 9:00 am

This might be useful for some (New AGAIN)

Post by micmac » Mon Nov 19, 2012 11:51 am

Hi there

This little stack demonstrate resizing a rectangle in any direction

Its also an exersice in calculating pendicular lines


Michael
Attachments
Resize a rect in any direction.zip
(1.6 KiB) Downloaded 297 times
Box Resize.png
Last edited by micmac on Mon Jan 20, 2014 3:44 pm, edited 4 times in total.

NoN'
Posts: 53
Joined: Thu Jul 03, 2008 9:56 pm
Location: Paris
Contact:

Re: This might be useful for some

Post by NoN' » Mon Nov 19, 2012 5:39 pm

Very nice job.

Congratulations.

Renaud

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3416
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: This might be useful for some

Post by bn » Mon Nov 19, 2012 7:06 pm

Hi Michael,

thanks for sharing this. Very useful.

You might want to add

Code: Select all

if Læng = 0 then exit mouseMove
right before

Code: Select all

put T/Læng into Skala
to avoid division by zero.

Kind regards
Bernd

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2530
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: This might be useful for some

Post by jmburnod » Mon Nov 19, 2012 7:32 pm

Hi Michael,
Nice. I played with it and i met the error about "Læng = 0"
but Bernd has been faster than me (salut Bernd) :wink:

I suggest a simple move constraint, something like that:

add just a line

Code: Select all

on mouseMove x,y
   if x,y is within the rect of this cd then 
      if gDragging is true then
         -- your script
      end if
   end if
end mouseMove 
Best regards
Jean-Marc

micmac
Posts: 29
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some

Post by micmac » Tue Nov 20, 2012 2:06 pm

Thanks to Renaud, Bernd and Jean-Marc

You are right about the corrections.

The thread is not so long – folks can easily read it and make the corrections

Therefore I leave the first upload as it is.


Thanks
Michael

micmac
Posts: 29
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some

Post by micmac » Tue Jan 15, 2013 2:25 pm

Hi there

Here is a little page turning drill. Much more could be done.

You are welcome to improve on it.

Mic





EDIT
a new doc, doc
Attachments
Pageturn.rev.zip
(1.95 KiB) Downloaded 191 times
Pageturn.livecode.zip
(1.92 KiB) Downloaded 266 times
PageTurning.jpg
Last edited by micmac on Tue Jan 15, 2013 5:28 pm, edited 1 time in total.

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm
Location: Oklahoma, USA

Re: This might be useful for some (New)

Post by doc » Tue Jan 15, 2013 4:17 pm

Here is a simple, humble reminder to folks...

Whether you are looking for help or just posting a sample to help others, it would be very beneficial and appreciated if you would use the legacy format whenever possible (presuming that the stack doesn't require any of the latest and greatest features). That will allow those of us using an older version of LC to participate in the fun and games, not wasting time, bandwidth and/or the joy of seeing the file opening errors as I've posted the screen shot of. Thanks. :D

Best regards,
-Doc-
Attachments
error_grab.png
error_grab.png (9.54 KiB) Viewed 7624 times

micmac
Posts: 29
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some (New)

Post by micmac » Thu Feb 07, 2013 8:10 pm

Hi there

Sometimes you need some graphic that is round in one end and square in the other (at least on Mac)

This makes it easy for you.

Use it for tabs, custom menus, small palettes and more.

Mic
Attachments
FairandSquare.png
FairandSquare.png (14.03 KiB) Viewed 7430 times
Fair and Square.rev.zip
(1.94 KiB) Downloaded 184 times
Fair and Square.livecode.zip
(1.96 KiB) Downloaded 234 times

micmac
Posts: 29
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some (New NEW)

Post by micmac » Thu Jun 13, 2013 7:47 pm

Collapsing Toolpalette

Hope it is usefull

Mic
Attachments
Multi Palette-5 tabs.rev.zip
(2.83 KiB) Downloaded 262 times
Tool 3.png
Tool 2.png
Tool 2.png (13.33 KiB) Viewed 7055 times

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: This might be useful for some (New NEW N E W)

Post by Mag » Thu Jun 13, 2013 9:58 pm

WOW!



....

tellboy
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 50
Joined: Wed Mar 06, 2013 1:31 pm

Re: This might be useful for some (New NEW N E W)

Post by tellboy » Sat Jun 22, 2013 8:17 am

Hi,

This is excellent work.:)

However, there is a slight visual discrepancy. In the sample stack the width of the title bar is slightly more than the width of the section buttons.

All the best

Terry

micmac
Posts: 29
Joined: Mon May 30, 2011 9:00 am

Re: This might be useful for some (New AGAIN)

Post by micmac » Mon Jan 20, 2014 3:44 pm

Hi there

A Tracing stack

If you improve on it please repost.

Michael
Splash.png
Trace.zip
(62.22 KiB) Downloaded 207 times

capellan
Posts: 631
Joined: Wed Aug 15, 2007 11:09 pm
Contact:

Re: This might be useful for some (New AGAIN)

Post by capellan » Mon Jan 20, 2014 8:52 pm

Hi Michael,

Your Tracing stack shows a really clever use
of the mouseColor. :o

Works great under Lubuntu Linux
Excellent idea and presentation! :D

An enhancement could be adding more undos and redos
(with custom properties stored in a button or the polygon)
and offer some easy way to add a new point between
two points in the vector graphic.

Keep Up this great work!

Al

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3416
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: This might be useful for some (New AGAIN)

Post by bn » Thu Jan 23, 2014 10:50 pm

Hi Michael,

here is my attempt at tracing.
Works with images that have transparency, e.g. png with transparency.

See stack for details.

see also sample images.

Kind regards
Bernd

EDIT: I posted a new version of this stack in a new thread
http://forums.runrev.com/phpBB2/viewtop ... 10&t=19040
Attachments
images with transparency.zip
sample images to trace, they contain transparency
(82.06 KiB) Downloaded 193 times
TracingBN_0_3.livecode.zip
tracing stack
(9.91 KiB) Downloaded 232 times
Last edited by bn on Fri Feb 07, 2014 10:21 pm, edited 1 time in total.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2530
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: This might be useful for some (New AGAIN)

Post by jmburnod » Thu Jan 23, 2014 11:31 pm

Salut Bernd,

I just played with "TracingBN_0_3".It will be very useful for a shadow theater in which we work
Thank one more

Kind regards
Jean-Marc

Post Reply

Return to “Talking LiveCode”