A grid of rectangles

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

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

Re: A grid of rectangles

Post by capellan » Mon Oct 10, 2016 2:48 am

Surely, I made a mistake describing the second option.

This second option works just like Adobe Director's CopyPixels:
http://director-online.dasdeck.com/buil ... php?id=857

Could we replicate every feature of CopyPixels with scripts?
This an example of the kind of imaging application that we could
create with a feature like CopyPixels:
http://director-online.dasdeck.com/buil ... php?id=840
And these kind of effects:
http://tympanus.net/Development/ImageTiltEffect/

Al
Last edited by capellan on Sun Sep 10, 2017 2:42 am, edited 1 time in total.

jiml
Posts: 173
Joined: Sat Dec 09, 2006 1:27 am
Location: Los Angeles

Re: A grid of rectangles

Post by jiml » Mon Oct 10, 2016 9:02 pm

Good thread!

This is a little tangential to the discussion but throw this behavior into the grid image to get the 'cell' that a user clicks.

on mousedown
put item 1 of the clickloc - the left of me into hoffset
put item 2 of the clickloc - the top of me into voffset
put the selectedtext of btn mygridspacing into spacing
put 1 + (hoff div spacing), 1 + (voff div spacing)
end mousedown

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2124
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: A grid of rectangles

Post by [-hh] » Mon Oct 10, 2016 11:41 pm

Yes, nice idea.
Perhaps one shouldn't rely on the label of an 'independent' button (may have changed, especially if you have several images). One could store instead the 'spacing' as a property of the created image.
shiftLock happens

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

Re: A grid of rectangles

Post by bn » Tue Oct 11, 2016 12:22 am

here is a version of the grid stack including an animation of the grid

it is a bit cleaned up, uses Herman's suggestion to do the grid at 1 Pixel size and let Livecode resize to final dimensions.
Also shows the effect that Hermann mentioned that doing a resize with an image leads to interesting effects.
use "fuzzy" to see the effect for animation.

Kind regards

Bernd

ATTACHEMENT
Attachments
Create Grid Image III.livecode.zip
(10.1 KiB) Downloaded 89 times

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

Re: A grid of rectangles

Post by capellan » Tue Oct 11, 2016 9:32 pm

Thanks again, Bernd and Hermann for sharing many great ideas
and practical examples.

I will restart some pending projects in this platform with the
hope that they get attention and critical reviews. :D

By the way, Have you checked the resize script of this stack:
http://forums.livecode.com/viewtopic.php?f=10&t=28042
My tests reveal that this script distort the position of controls
after repeated use. Why? :?

Have a nice week!

Alejandro

Post Reply

Return to “Rich Media”