Stupid Programming Question

Scott Rossi scott at tactilemedia.com
Thu May 6 21:20:14 EDT 2004


Recently, "Judy Perry" wrote:

>> repeat with x = 1 to the number of controls
>>      show control ("c"&x&".jpg")
>>      wait 5 ticks
>> end repeat

> executing at 4:36:11 PM
> Type    Chunk: no such object
> Object    Stacks
> Line    hide control ("c"&x&".jpg")
> Hint    c17.jpg
> 
> Now it's true that there is no c17.jpg (AFAIK).  Yup.  Just checked the
> app browser and no such animal.
> 
> Any guesses?

First of all, the error you cite references the word "hide" so the script
that caused the error is not really the one above.  I'm guessing maybe you
tried to do the opposite, hide the images, instead of showing them?

Otherwise, if your goal is to show *images* only, change the word "control"
to "image".  Using "controls" counts the total number of controls on the
card (fields, buttons, scrollbars, images, etc) and will be out of sync with
the number of images only.

 repeat with x = 1 to the number of images
      show image ("c"&x&".jpg")
      wait 5 ticks
 end repeat

Let us know if this is not what you're after.

Regards,

Scott Rossi
Creative Director
Tactile Media, Development & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the use-livecode mailing list