Hi Luisa,
very nice, you are catching up on Livecode very fast. Especially working with imagedata is putting many people of.
I did a version of the gradient image using imageData constructed on the fly. I do that with a temporary image which is merged with a baseImage via snapshot. That is easier than to stuff the gradient image imageData into the imageData of the baseImage. Which of cours is always an option. I also wanted to show the use of snapshots. With this you could also use graphic objects and do a snapshot to get a unified image.
Oh, now you can drag the gradient to the left of the starting point too.
See the comments in the code of the white "baseImage"
By the way your gradient stack showed me how to do the gradient using RGB values only, thank you.
Please test stack thouroughly, I had some crashes during development and don't know if it was me or something Livecode did not like. I have a faint recollection of people complaining about crashes when grouping/ungrouping on the fly. If you see crashes with this stack I could change it to an imageData only version, without grouping/snapshot. I use snapshots a lot so they are unlikely to be the cause.
It is always a good idea during development to save your stacks, just to be shure. I even do incremental backups (if I don't forget...). Not that Livecode crashes very often on me, but once in a while I get it to crash and without having saved your stacks you do a lot of retyping...
Kind regards
Bernd