I've put the following code into a button's script:
on mouseUp
put "100,100,200,200,100,500" into myPoints
set the points of graphic "myPoly" to myPoints
end mouseUp
There is of course a polygon on the same card named "myPoints"
But when I click on the button, nothing happens.
What is up???
setting polygon points
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 28
- Joined: Fri Sep 07, 2007 2:04 am
- Location: Palo Alto, California, USA
- Contact:
setting polygon points
What matters is what matters; knowing what matters and how to know it, matters the most.
Re: setting polygon points
Hi Randall,
try this:
...
put "100,100" & CR & "200,200" & CR & "100,500" into myPoints
...
If in doubt, ALWAYS consult the dictionary first!
Best
Klaus
try this:
...
put "100,100" & CR & "200,200" & CR & "100,500" into myPoints
...
If in doubt, ALWAYS consult the dictionary first!
Best
Klaus
-
- Posts: 28
- Joined: Fri Sep 07, 2007 2:04 am
- Location: Palo Alto, California, USA
- Contact:
Re: setting polygon points
I tried that. But without the space characters between. Didn't work. The dictionary says that you can "set" points from comma delineated lists... but "put" points always returns lines of x,y pairs.
What matters is what matters; knowing what matters and how to know it, matters the most.
Re: setting polygon points
You're welcome!
-
- VIP Livecode Opensource Backer
- Posts: 7228
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: setting polygon points
Commas used to work but somewhere along the line I read they stopped working. At any rate, I assume that "myPoints" is a typo and the name of the graphic is really "myPoly", right?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com