Search found 140 matches
- Wed Mar 05, 2014 9:58 pm
- Forum: idea2app and Coding School
- Topic: Button
- Replies: 5
- Views: 3809
Re: Button
Neil: This is what i have figured out and I have gotten confused from all the posts. I don't know how to move the buttons that are intersecting. I have used the script below, but it times out because I am pass back to preOpenCard. Put me in the right direction. on preOpenCard repeat with i = 1 to 10...
- Wed Mar 05, 2014 9:14 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
This is what i have figured out so far while playing around. I can get this script to work somewhat right until it exceeds its limit. I don't know how to send the buttons that are intersect to a new location. I know how to move 1 button to a specific locations, but not sure how to handle multiple bu...
- Wed Mar 05, 2014 8:34 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
I like the fact that the buttons will be in random areas on the card each time it opens. I am not sure how I could use this array to make the buttons not overlap. If I am wrong steer me in the right direction.
- Wed Mar 05, 2014 7:54 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
Let me see if I understand what is going on. Correct me if I am wrong. The follwoing script is creating a temp list of button positions. lock screen repeat with y = 1 to 3 repeat with u = 1 to 10 put y * 140 -60 & "," & u * 40 - 15 & return after temp end repeat end repeat The next part is just crea...
- Wed Mar 05, 2014 6:51 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
This might be a stupid question but how do I create that list? I have my buttons set to width to 80 and height to 80. to keep thing similar. I think I figured out how to create the loc list thanks to Klaus. The list is the locs after the buttons have been moved. This is the script I used. put the lo...
- Wed Mar 05, 2014 6:13 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
Ok, first off I want to thank everyone for their help yesterday. I got confused and I think i am still confused. I have the script to make the buttons move. Now I need to focus on making sure they don't get behind each other. I am not sure if using the intersect function is the best way from keep th...
- Tue Mar 04, 2014 7:24 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
1. Would the intersect function fix the overlapping issue.
2. i would assume the tLocList will gather the current locs? Am I getting the locs so the original position of all the buttons be reused, but with a different button? If not I am totally confused.
2. i would assume the tLocList will gather the current locs? Am I getting the locs so the original position of all the buttons be reused, but with a different button? If not I am totally confused.
- Tue Mar 04, 2014 5:53 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
Now I need to figure out the intersect thing to keep the buttons from getting behind each other.
- Tue Mar 04, 2014 5:38 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
that is working now, but I think I have a much simpler way to do what I want. I thin this script works the same as the one you just gave me. Yes I was getting confused with all the different suggestions. repeat with i = 1 to 10 set the loc of button ("b" & i) to random (the width of this stack) , ra...
- Tue Mar 04, 2014 4:41 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
not sure what you mean about creating a list. This is what I was think?
Thanks
Mark
Code: Select all
if intersect (button "b" & i, button "b" & i) then
pass on preOpenCard
end if
Mark
- Tue Mar 04, 2014 4:10 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
Even when I add another tLocList I still get the same error.
Code: Select all
set the loc of button ("b" & i) to line i of tLocList tLocList
- Tue Mar 04, 2014 4:03 pm
- Forum: idea2app and Coding School
- Topic: Button
- Replies: 5
- Views: 3809
Re: Button
Neil: I have 10 buttons created and want to change their position randomly when the stack is open. I don't want to create any more buttons. Would the following script work the way I want it to. Do i want to relaunch the preOpenCard Handler? Is that the best way? Also, can I add -20 to the widith and...
- Tue Mar 04, 2014 3:56 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
I have made all the changes Newbie suggested. Now I am getting the following error: execution error at line n/a (Object: coordinate is not a point) near "132,342202,200" For the doSomethingQuick Handler: This is what I think needs to happen. If buttons are touching then move again. Is that close? Mark
- Mon Mar 03, 2014 11:07 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
Newbie4:
When I changed the script to what you suggested I get the following error.
Execution error at line 14 (Chunk: no such object) near "b1", char 20
When I changed the script to what you suggested I get the following error.
Execution error at line 14 (Chunk: no such object) near "b1", char 20
- Mon Mar 03, 2014 9:11 pm
- Forum: Getting Started with LiveCode - Complete Beginners
- Topic: Intersecting Buttons
- Replies: 36
- Views: 18102
Re: Intersecting Buttons
LC through up an error becuase there is not a Handler of doSomethingQuick. My orginal thought was to have it run back through the preOpenCard Handler.
I think before anything will work I need to figure out the loc and variable thing. I am not sure how to fix it at all.
I think before anything will work I need to figure out the loc and variable thing. I am not sure how to fix it at all.