display slide image from an array
Victor
t1msky at yahoo.co.uk
Mon Mar 1 14:00:53 UTC 2010
Thanks for the speedy response Michiel :)
I included references to CRESP as there are only two possible
responses and so I had an else statement already in place to turn over
random left card if correct was on left, with the opposing card that
was not correct set to another image. My code actually worked I had
just referenced the wrong slide (slide1 not 2-doh!) which is why it
was not working. However, your suggestions for more elegant brief
coding has been incorporeated into the experiment scripts.
Thanks,
Victor
On Mar 1, 12:58 pm, Michiel Spape <Michiel.Sp... at nottingham.ac.uk>
wrote:
> Hi,
> Your code is full of errors, it seems! I bet you anything this code didn't work before, actually...
>
> " if slide1.cresp = "m" 'when correct response
> is on the right
> imageright = card(x)
> c.setattrib "imageR", imageright"
> end if"
>
> 1. I assume your slide1 has imagedisplay with filename [imageR], yes? What happens with incorrect responses
> 2. Why is there a quotation mark after imageright?
> 3. Why do you refer to .cresp? Could be you mean this, but I often get students who get confused between the difference between .resp, .cresp and allowable...
>
> Anyway, Make a blank image, (with MSPAINT!), save it as blank.bmp, then do:
>
> if slide1.cresp = "m" 'if cresp is m
> c.setattrib "imageR", card(random(1,52)) 'no need for imageright
> else
> c.SetAttrib "imageR", "blank.bmp"
> end if"
>
> Always specify an image, even if it is blank - that way, you can ensure the timing is the same :) Also, be prepared for the inevitable unexpected response (i.e. use else and such).
> Cheers,
> Mich
>
> Michiel Spapé
> Research Fellow
> Perception & Action group
> University of Nottingham
> School of Psychology
>
> -----Original Message-----
> From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Victor
> Sent: 01 March 2010 12:37
> To: E-Prime
> Subject: display slide image from an array
>
> Hi,
>
> I have a feedback slide that I want to display a random image from an
> array but I get the error 'filename on imagedisplay has not been set'
> and I do not understand why.
>
> I have a list with cards
>
> card(1) = "aceclubs" and so on..
>
> Before the feedback slide I have
>
> dim x as integer
> x = random(1,52)
>
> if slide1.cresp = "m" 'when correct response
> is on the right
> imageright = card(x)
> c.setattrib "imageR", imageright"
> end if
>
> I have used this sort of code before and it has always worked so I am
> confused as to why it doesnt work now. Any help would be appreciated,
> thanks,
>
> Victor
>
> --
> 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 athttp://groups.google.com/group/e-prime?hl=en.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
--
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