ps my images are on a slide. Here's the code:<br><br><span style="font-family: courier new,monospace;">dim myImageSubObject as SlideImage<br><br>Set myImageSubObject = CSlideImage(SlideTarget1.States(SlideTarget1.ActiveState).Objects("dash" & Cstr(j) ))<br>myImageSubObject.X = 500 ' This works<br>myImageSubObject.Filename = "images\\t.bmp" ' this runs but does replace the default image</span><br><br><br>On Tuesday, January 29, 2013 2:57:45 PM UTC, JACanterbury wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">I'm having what appears to be a similar problem (so I'm hoping you;ve fixed yours :)<br>What I seem to have found is that you CAN successfully change most image attributes at runtime (e.g X,Y coordinates) but I haven't managed to changed the .Filename successfully.<br>The code runs ok (doesn't give any errors) but the filename change is ignored.<br><br>Has anyone found the same thing, or, hopefully, found a way to update an image Filename at runtime?<br><br>thanks,<br><br>john<br><br>On Wednesday, April 25, 2012 6:49:12 AM UTC+1, MARILY ILLESCAS wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Hello! Hope you can help me.
<br>I'm making a memory experiment, in the encoding phase are two images
<br>that should be classified as same or different. In the recognition
<br>phase are two images, one must decide which image is old or if both
<br>are new. The problem is that in the recognition phase I want the
<br>program select randomly one of the two images presented in the
<br>previous stage to be presented with a new image. Use a slide with
<br>three objects, each corresponding to the three options (old image 1,
<br>old image 2 and new image). I use this script to select randomly the
<br>old image and the position (is only a part):
<br>
<br>
<br>Set RImg1 =
<br>CSlideImage(EstimulosR.States(<wbr>EstimulosR.ActiveState).<wbr>Objects("RIm1"))
<br>Set RImg2 =
<br>CSlideImage(EstimulosR.States(<wbr>EstimulosR.ActiveState).<wbr>Objects("RIm2"))
<br>Set NImg =
<br>CSlideImage(EstimulosR.States(<wbr>EstimulosR.ActiveState).<wbr>Objects("NIm"))
<br>
<br>stims = c.GetAttrib("StimType") If stims = "1" Then
<br>stim = 1
<br>Else
<br>stim = 2
<br>End If
<br>
<br>SelectPosition:
<br>pos = PRNG.Random(1, 2) 'Select a position
<br>
<br>SelectOld:
<br>OldStim = PRNG.Random(1, 2) 'Select a old image
<br>
<br>If pos = 1 And OldStim = 1 And stim = 1 Then
<br> pos1= pos1 + 1
<br> OldStim1 = OldStim1 + 1
<br> If pos1 > 10 Then
<br> GoTo SelectPosition
<br> If OldStim1 > 10 Then
<br> GoTo SelectOld
<br> Else
<br> 'RImg1.Filename = c.GetAttrib("RImagen1")
<br> 'RImg1.Draw
<br> RImg1.X = "441"
<br> RImg1.Y = "384"
<br> 'NImg.Filename =c.GetAttrib("NImagen")
<br> 'NImg.Draw
<br> NImg.X = "589"
<br> NImg.Y = "384"
<br> c.SetAttrib "Location", "1"
<br> c.SetAttrib "PosOld", "1"
<br> Debug.Print c.GetAttrib("PosOld")
<br> End If
<br> End If
<br>End If
<br>
<br>
<br>If pos = 2 And OldStim = 1 And stim = 1 Then
<br> pos2= pos2 + 1
<br> OldStim1 = OldStim1 + 1
<br> If pos2 > 10 Then
<br> GoTo SelectPosition
<br> If OldStim1 > 10 Then
<br> GoTo SelectOld
<br> Else
<br> 'NImg.Filename =c.GetAttrib("NImagen")
<br> 'NImg.Draw
<br> NImg.X = "441"
<br> NImg.Y = "384"
<br>' RImg1.Filename = c.GetAttrib("RImagen1")
<br> 'RImg1.Draw
<br> RImg1.X = "589"
<br> RImg1.Y = "384"
<br> c.SetAttrib "Location", "2"
<br> c.SetAttrib "PosOld", "1"
<br> Debug.Print c.GetAttrib("PosOld")
<br> End If
<br>End If
<br>End If
<br>
<br>
<br>The problem is that the script does not work, the program displays the
<br>three images. I do not know how to make the program ignored the image
<br>should not be presented.
<br>
<br>Can anyone help me?</blockquote></blockquote>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe@googlegroups.com.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/gFdvgB06BhcJ">https://groups.google.com/d/msg/e-prime/-/gFdvgB06BhcJ</a>.<br />
For more options, visit <a href="https://groups.google.com/groups/opt_out">https://groups.google.com/groups/opt_out</a>.<br />
<br />
<br />