Page 1 of 1
shrink in the way
Posted: Wed Jan 26, 2022 5:34 pm
by Samuele
Hi, I'm trying to show a field in the middle of the stack and after 2 seconds move it
Code: Select all
into the points of graphic "someGraphic"
and till here it's okay, but i wanted to add something else, that in the mean time that the field is going in the path of the graphic it also shrinks gradually, till it arrives to the 'end' of the graphic and it's still visible, is it possible?
Thanks!
Re: shrink in the way
Posted: Wed Jan 26, 2022 5:47 pm
by jmburnod
Hi Samuel
is it possible?
You may resize field in a loop using the num of points
Best regards
Jean-Marc
Re: shrink in the way
Posted: Wed Jan 26, 2022 6:12 pm
by Samuele
jmburnod wrote: ↑Wed Jan 26, 2022 5:47 pm
You may resize field in a loop using the num of points
Sorry, couldn't quite understand, what points do you mean? of the graphic?
something like:
for every 2 points in the graphic take it down a notch? (obviously this can't be a script)
Thanks!
Re: shrink in the way
Posted: Wed Jan 26, 2022 6:26 pm
by dunbarx
In the manner of what Jean-Marc mentioned, think about this. When you move an object to the points of a graphic, say, LC moves to successive lines of the "points" (a property) of that graphic.
But what you want to do is to reduce the field every time it reaches a new point. So work on this:
Craig
Re: shrink in the way
Posted: Wed Jan 26, 2022 6:37 pm
by jmburnod
the graphic?
Oups ! Sorry
Yes and you made it
Jean-Marc
Re: shrink in the way
Posted: Wed Jan 26, 2022 6:38 pm
by dunbarx
I never use the "move" command, except for play.
But I wonder if it is possible to do what the OP wants, not with the heavy-handed stack I just posted, but by trapping say, the "locationChanged" message while moving through the points of a graphic. One would have to remember the most recent point and only reduce the size when that changes, otherwise the control would reduce too fast, I think.
Hmmm.
Craig
Re: shrink in the way
Posted: Wed Jan 26, 2022 6:48 pm
by Samuele
alright, thanks, i don't fully understand the script, but I'm trying, is there a way to do it without causing to the stack to stop for the moving (probably without the wait) Thanks!
Re: shrink in the way
Posted: Wed Jan 26, 2022 9:24 pm
by dunbarx
Hi.
is there a way to do it without causing to the stack to stop for the moving (probably without the wait) Thanks!
Not sure what you mean. How does a stack "stop"? When you click the button, the square field tracks the graphic, and shrinks just a bit at each point. What did you intend, or wish for?
Craig
Re: shrink in the way
Posted: Wed Jan 26, 2022 9:32 pm
by dunbarx
You say you don't understand the script, have you tried stepping through the handler? Place a breakpoint at line 9, where the width is changed. Now manually step through. You can see that the field jumps to successive points of the graphic, and once there, shrinks just a little. It then goes to the next point...
Remember that the "points" of a graphic is a return delimited list; each line in that list contains one point.
Craig