Substitute one out of 100 images on a slide

Tobias tobias.fw at gmail.com
Tue Jul 12 16:28:11 UTC 2011


On 12 Jul., 17:32, David McFarlane <mcfar... at msu.edu> wrote:
> Try something like
>
> Mask_SlideImage.Filename = "mask" & i & ".bmp"
>
> where image file names take the form "mask1.bmp", "mask2.bmp",
> etc.  You get the idea.


Thanks for the answer, but I think I expressed myself a bit unclearly.
The if-slope from the above code is an excerpt from an object called
"slide1". So far, I additionally had "slide2" with the exact same code
except for this fallowing line:

	if c.getattrib("ProbePos") = (i-1) then ProbeMask_SlideImage.Filename
= "probe.bmp"

After defining the slides with this code, I have:

run.slide1
run.slide2


My idea was that I should use:

run.slide1
[some code that changes one of the 100 images of slide1]
run.slide2



> BTW, why do you have a Select Case... clause in your code
> excerpt?  Since you have only one case, you could eliminate
> that.  Also, why have a For loop from 1 to 101, and then include an
> If clause for i=1?  Why not instead just do i=1 outside the loop, and
> then loop for i = 2 to 101?  Also, this should make no difference,
> but you could move the Set Mask_SlideImage = New SlideImage and Set
> Mask_SlideImage = Nothing statements outside of the loop.
>
> Regarding an earlier question about the time it takes to Load the
> same image 100 times, most machines already do automatic disk
> caching, so once your program has loaded the file the first time then
> it should just load the image from the memory cache all the other
> times.  We have taken advantage of that behavior ourselves in some
> programs.  So I don't know what takes your computer so long to do
> this.  But I agree with Mich on the other thread that you might get
> maximum performance by judicious use of the Canvas.

You are right, this does not make too much sense. It is an artifact
from another experiment when it made sense :-p
Nevertheless, this does not seem to be time-consuming.

Best,
Tobias

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list