65 to 530 to 65 solved

Phil Davis phildavis at attbi.com
Thu Apr 17 23:37:01 EDT 2003


I haven't been following this thread, so maybe someone already contributed this idea. It's total speculation, but: (see below)

> From: miscdas at boxfrog.com
> To: metacard at lists.runrev.com
> Subject: Re: 65 to 530 to 65 solved
> Date: Thu, 17 Apr 2003 05:23:48 -0500
> Reply-To: metacard at lists.runrev.com
> 
> Shari writes: 
> 
> > finally wrote the following (very fast) handler to import all those 
> > images: 
> > 
> > on importImages
> >   put the effective filename of this stack into imageList
> >   set the itemDel to "/"
> >   put "Images/TerrainOutdoors" into the last item of imageList
> >   set the itemDel to comma
> >   set the directory to imageList
> >   get the files
> #############################
> >   repeat for each line x in it
> >     import paint from file (imageList & "/" & x)
> >   end repeat
> >   repeat with x = 2 to the number of images
> >     set the visible of image x to false
> >   end repeat
> ###################################
> > end importImages
> ============== 
> 
> If I understand correctly the marked section, you import images in a repeat 
> loop, then execute a second repeat loop to hide all of them except the first 
> image. 
> 
> Wouldn't it be faster to run only one loop, like the following? 
> 
>   repeat for each line x in it
>     import paint from file (imageList & "/" & x)
>     set the visible of image x to false
>   end repeat
>   set the visible of image 1 to true 
> 


Would the following be any faster? (And more important, would it work?) If it works, it would eliminate one line of code inside the loop (and x executions of it):

   set the visible of the templateImage to false
   repeat for each line x in it
     import paint from file (imageList & "/" & x)
     #set the visible of image x to false
   end repeat
   set the visible of image 1 to true 

I don't know if the templateImage affects the 'import' command.

Phil


> Also, is there any speed difference between 
> 
>   set the visible of image x to false 
> 
> and 
> 
>   hide image x 
> 
> ? 
> 
> miscdas 
> 
> --__--__--
> 





More information about the metacard mailing list