Re: repeat repeat
If speed matters, you could avoid nesting the loops. on mouseUp repeat with i = 1 to number of buttons put i into tArray[the label of button i] end repeat repeat for each item tSeatNo in field "seatNo" set the backgroundColor of button tArray[tSeatNo] to "red" end repeat end mouseUp -- Dick On 3/1/06 4:54 PM, "Mark Schonewille" <[EMAIL PROTECTED]> wrote: > Hi Liam, > > Assuming that your original code does not cause any errors, the > following should work, although I didn't test it: > > on mouseUp >repeat for each item myLabel in fld "seatNo" > repeat with x = 1 to the number of buttons >if myLabel is the label of btn x then > set the backgroundColor of btn x to red >end if > end repeat >end repeat > end mouseUp > > Instead of "item myLabel" you could also use "line myLabel". > > Best, > > Mark > > > liamlambert wrote: >> My fld "seatNo" has more than one line or item >> I want to repeat the code below for each line or item >> >> >> on mouseUp >> put fld "seatNo" into tseatNo >> repeat with x = 1 to the number of buttons >> if tseatNo = the label of button x then >> set the backgroundcolor of button x to red >> end if >> end repeat >> end mouseUp >> >> Liam Lambert >> [EMAIL PROTECTED] >> IRELAND ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: repeat repeat
on mouseUp put fld "seatNo" into tseatNo repeat for each line y in tSeatNo repeat with x = 1 to the number of buttons if y = the label of button x then set the backgroundcolor of button x to y end if end repeat end repeat end mouseUp Something like the above might work. Hope this helps. Mark On Mar 1, 2006, at 4:43 PM, liamlambert wrote: My fld "seatNo" has more than one line or item I want to repeat the code below for each line or item on mouseUp put fld "seatNo" into tseatNo repeat with x = 1 to the number of buttons if tseatNo = the label of button x then set the backgroundcolor of button x to red end if end repeat end mouseUp Liam Lambert [EMAIL PROTECTED] IRELAND ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
repeat repeat
Thank You Mark that works fine Liam Lambert [EMAIL PROTECTED] IRELAND ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: repeat repeat
Hi Liam, Assuming that your original code does not cause any errors, the following should work, although I didn't test it: on mouseUp repeat for each item myLabel in fld "seatNo" repeat with x = 1 to the number of buttons if myLabel is the label of btn x then set the backgroundColor of btn x to red end if end repeat end repeat end mouseUp Instead of "item myLabel" you could also use "line myLabel". Best, Mark liamlambert wrote: My fld "seatNo" has more than one line or item I want to repeat the code below for each line or item on mouseUp put fld "seatNo" into tseatNo repeat with x = 1 to the number of buttons if tseatNo = the label of button x then set the backgroundcolor of button x to red end if end repeat end mouseUp Liam Lambert [EMAIL PROTECTED] IRELAND -- Consultant and Software Engineer mailto:[EMAIL PROTECTED] http://www.economy-x-talk.com eHUG coordinator mailto:[EMAIL PROTECTED] http://www.ehug.info Advertise with us and reach 1000 truely interested internet users every month. See http://economy-x-talk.com/advertise.html for more information. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
repeat repeat
My fld "seatNo" has more than one line or item I want to repeat the code below for each line or item on mouseUp put fld "seatNo" into tseatNo repeat with x = 1 to the number of buttons if tseatNo = the label of button x then set the backgroundcolor of button x to red end if end repeat end mouseUp Liam Lambert [EMAIL PROTECTED] IRELAND ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution