Multiple Mouse Click Question
Walter Piper
waltpipedawgs at gmail.com
Thu Sep 1 00:09:18 UTC 2011
Here's what I recommend based on the limited experience I have:
On the slide, place a text box for each of the possible choices. Since
you have 2 sets of choices, place 26 text boxes on one side of the
slide, and 26 text boxes on the other. Each text box will hold a
different letter, and the name of each text box will be "1a", "1b",...
"1z", "2a", "2b"... "2z". Also have a text box with the name "NEXT"
that participant can click on when done selecting. These will serve as
buttons of sort.
Before the slide, create an InLine that declares 2 Boolean variables,
and set them both to False. Also, create 2 String variables to hold
the names of the textbox selected.
"""
dim Response1 as Boolean
dim Response2 as Boolean
Response1 = FALSE
Response2 = FALSE
dim R1String as String
dim R2String as String
"""
Also, in this InLine, declare and manipulate some variables in order
to get the mouse input - slide interface going. I'll just list off the
code that I think will work for you and explain a little bit after the
' symbol (because I can't remember off the top of my head how it all
works), but I'll be happy to figure it out if you need more
explanation.
"""
dim SlideHit as SlideState 'Declares a variable that allows
you to reference your slide.
set SlideHit = Slide1.States("Default") 'This is assuming the
name of your slide is "Slide1" and you're using the "Default" slide
state.
dim xSlide1 as SlideText 'Declares a variable that allows you to
reference the text boxes/buttons.
Mouse.ShowCursor TRUE 'Self-explanatory
dim MouseHit as MouseResponseData
dim MouseString as String
dim MouseRow as String
"""
This should be sufficient for the InLine before the slide. Now, create
a label between the InLine and the slide called "FromStart". Create
the slide as described above. Set the duration to "(infinite)". Add a
mouse input in the slide properties, and set the end action to
"Terminate". Uncheck the keyboard response.
Create a new InLine after the slide, and a label after the InLine
called "NextSlide". Start the InLine with:
"""
If Slide1.InputMasks.Responses.Count > 0 Then 'Launches action
if there was a mouse response.
Set MouseHit =
CMouseResponseData(Slide1.InputMasks.Responses(1)) 'Checks to
see what text box was clicked on.
MouseString = SlideHit.HitTest.(MouseHit.CursorX,
MouseHit.CursorY) 'Sets the previously created string as the
name of the text box that was clicked on.
MouseRow = Mid(MouseString, 1) 'Sets the MouseRow string as
the first character of the textbox (In this case, 1 or 2)
Select Case MouseRow 'Decides the next action based on whether
MouseRow equals 1 or 2.
Case "1"
If Not R1String = "" Then
Set xSlide1 =
CSlideText(Slide1.States.Item("Default").Objects(R1String))
xSlide1.BackColor = CColor ("White")
End If
Set xSlide1 =
CSlideText(Slide1.States.Item("Default").Objects(MouseString))
xSlide1.BackColor = CColor ("Red")
R1 = TRUE
R1String = MouseString
Case "2" 'Copy and paste the above, but use the variables
"R2String" and "R2" instead.
Case "N"
If R1 AND R2 = TRUE Then
Goto NextSlide
End If
End Select
End If
Goto FromStart
"""
Create a third InLine after the label NextSlide. Write it as such:
"""
c.SetAttrib "Choice1.1", R1String
c.SetAttrib "Choice1.2", R2String
R1String = ""
R2String = ""
R1 = FALSE
R2 = FALSE
Set SlideHit = Slide2.States("Default") 'Assuming your next slide
is called "Slide2"
set xSlide1 = Nothing
"""
I THINK this should work. Sorry it's such a long-winded answer. Good
luck!
--
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