>I've had a play around with this, but could do with some assistance. 
>I think the answer is quite simple.
>
>I've got a 12 card stack with a  background. The background contains 
>a field with the 'Shared Text' property unchecked. This means that 
>when I run my script (which repeats from 1 to 12 and sets the 
>contents of the relevant field to that number) it works fine.
>
>I've got another script which is meant to set the script of each 
>field. I read in a separate field which contains the script and 
>replace a known variable with the number of the card.
>
>This is then meant to set the script of each field to something like
>
>on mouseup
>       go cd 3 of wd "Day"
>end mouseup
>
>where the number is replaced by the number of the card.
>
>The problem is that unlike the "Shared Text" property the script for 
>each field reads
>
>on mouseup
>       go cd 12 of wd "Day"
>end mouseup
>
>ie its setting the script of each field to the last script in the loop.
>
>This is a simplified explanation of a larger project. I guess I 
>could create 'foreground' fields for each card but when I do that 
>(due to the large number of fields on a card) the 'set up script' 
>loop takes an age.
>
>So, is there anyway to define different scripts to background fields 
>? Or is the whole point that you can't or shouldn't ?
>
>TIA
>
>Gary Rathbone
>Hooknet


I'd be tempted to have a single generic script for all the fields. If 
each card contains a field which has a unique card number in it 
(assuming I understand you correctly), then simply use this value 
within the field scripts:

on mouseUp
   go cd (field "CardNo") of wd "Day"
end mouseUp

Peter

--------------------------------------------------------
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)1509 264986
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk

Reply via email to