Image Buttons Going To Labels

Katarina Morowsky kmorowsky at gmail.com
Wed Jun 26 20:02:58 UTC 2013


Hello,
 
I am trying to create a slide with two buttons (made from images). One 
button (named Another) will take you back to the practice list and the 
other button (named Proceed) will proceed to the instructions for the first 
task.  If you click anywhere outside the buttons you will stay on the 
screen.
 
I have created a code that directs where you go via labels.  My code to 
stay on the screen works fine. The code that recognizes the images as 
buttons also works.  The problem I am running into is the locations that 
the buttons go to... 
 
With the current code when I click on both the "Another" and "Proceed" 
buttons I end up at Label 3.  I tried switching what image corresponds to 
each label (i.e. Another going to Label11 and Proceed going to Label3) to 
see if the problem was in the Elseif statement, but then both buttons ended 
up at Label11.
 
Would anyone know how to have each button go to their intended location?
 
 
Thank you,
 
Katie
 
_________________________________________________________________________
 
'Designate "theState" as the Default Slide State, which is the
'current ActiveState on the Slide object "morepractice".
Dim theState As SlideState
Set theState = morepractice.States("Default")
Dim theSlideImage As SlideImage
Dim strHit As String
Dim theMouseResponseData As MouseResponseData
 
'Was there a response?
 If morepractice.InputMasks.Responses.Count > 0 Then
  debug.print "Line 16"
  'Get the mouse response.
  Set theMouseResponseData = 
CMouseResponseData(morepractice.InputMasks.Responses(1))
  'Determine string name of SlideImage object at
  'mouse click coordinates. Assign that value to strHit
  strHit = theState.HitTest(theMouseResponseData.CursorX, 
theMouseResponseData.CursorY)
 
  'If you hit image for Another Practice Trial you will go to a label 
before the practice list'
  If strHit = "Another" Then
   Sleep 350
   GoTo Label3
  
  'If you hit the image for Proceed to Task1 you will go to a label before 
the intro slide for Task1' 
  ElseIf strHit = "Proceed" Then
   Sleep 350
   GoTo Label11
  
  'If you hit anywhere else on the screen you will stay at that screen' 
  Else
   GoTo Label4
     
  End If
 End If
 

Set theMouseResponseData = Nothing
Mouse.ShowCursor False

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/ec9337a2-41a6-4927-87ec-fcbf6d67f158%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130626/9448e15b/attachment.htm>


More information about the Eprime mailing list