| Home | Forums | Reviews | Articles | Register |
![]() |
| Thread Tools | Rate Thread |
|
|
|
| |
|
David N
Guest
Posts: n/a
|
I have a blank slide as #37. The grid is on #38. #39 is
the 'Match!!!' Slide. |
|
||
|
||||
|
|
|
| |
|
dee
Guest
Posts: n/a
|
wow! I teach math and don't have a clue of how to do what you are asking
but if you get it working, would you be willing to share the template? I would love to be able to do something like this with--solve an equation and match it with the correct answer. Since you are doing all the work, I know this is a lot to ask, but I wouldn't begin to know how to do this--so if you could think about it? dee "David N" <(E-Mail Removed)> wrote in message news:1baba01c45116$f7419fe0$(E-Mail Removed)... > I've been trying to get this working, but I am obviously > doing something basically wrong. > I am trying to build a template for a 'Memory' game to use > with students, based on the TV show 'Concentration'. The > main screen has 36 action buttons in a grid, with a rebus > puzzle behind them. Contestants choose first one button, > then a second one which they think is the matching picture > to the first. If they are correct, 'Match!!!' is > displayed, and the grid redisplays, but with the two > matching action buttons invisible, thus revealing part of > the underlying puzzle. If they are incorrect, the grid > redisplays, ready for the next contestant. > I've set up 38 slides. #s 1-36 are the picture pairs. > Under each picture is a button ('Done') with the action > set to run Sub 'Done'. #37 is the grid of action buttons. > Each action button has text being a number from 1-36, is > named with its number, and is set to run > Sub 'ButtonClick'. #38 Has text that says 'Match!!!', and > a button that is set to run Sub 'AfterMatch'. > Running the show, when I click a button, nothing happens. > (I want it to display the slide with the same number as > the button). > I would like to continue work on this to somehow keep > score of the contestant's matches, but there's no point of > even trying, since I can't get the basic show to work > correctly. > > Here is my code: > Public vChoiceNumber As Integer > Public vButton1 As Integer > Public vButton2 As Integer > Public vPicName1 As String > Public vPicName2 As String > Public GoToSlideNumber As Integer > Sub Intialize() > ActivePresentation.SlideShowWindow.View.GotoSlide (38) > vPicName1 = "" > vPicName2 = "" > vButton1 = "" > vButton2 = "" > GoToSlideNumber = "" > vChoiceNumber = "" > End Sub > > Sub ButtonClick(oShape As Shape) > > If ChoiceNumber = "" Then > vButton1 = oShape.Name > ChoiceNumber = "1" > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > False 'to prevent puzzle from showing during screen redraw > on return to slide > GoToSlideNumber = vButton1 > ActivePresentation.SlideShowWindow.View.GotoSlide > (GoToSlideNumber) > vPicName1 = > ActivePresentation.SlideShowWindow.View.Slide.Shapes > (2).Name > ElseIf ChoiceNumber = "1" Then > vButton2 = oShape.Name > ChoiceNumber = "2" > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > False > GoToSlideNumber = vButton2 > ActivePresentation.SlideShowWindow.View.GotoSlide > (GoToSlideNumber) > vPicName2 = > ActivePresentation.SlideShowWindow.View.Slide.Shapes > (2).Name > End If > > End Sub > > Sub Done() > ' > ' Macro created 5/31/04 by DocuMed > ' > If ChoiceNumber = "1" Then > ActivePresentation.SlideShowWindow.View.GotoSlide (38) > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > True > ElseIf ChoiceNumber = "2" Then > If vPicName1 = vPicName2 Then > ActivePresentation.SlideShowWindow.View.GotoSlide > (39) > ElseIf vButton1 <> vButton2 Then > ActivePresentation.SlideShowWindow.View.GotoSlide > (38) > ActivePresentation.Slides(38).Shapes > (puzzle).Visible = True > End If > ChoiceNumber = "" > End If > > End Sub > Sub AfterMatch() > ActivePresentation.Slides(38).Shapes > (vButton1).Visible = False > ActivePresentation.Slides(38).Shapes > (vButton2).Visible = False > ActivePresentation.Slides(38).Shapes > (puzzle).Visible = True > vPicName1 = "" > vPicName2 = "" > vButton1 = "" > vButton2 = "" > End Sub > Sub NameShape() 'This is for setup, to name shapes > > Dim Name$ > On Error GoTo AbortNameShape > If ActiveWindow.Selection.ShapeRange.Count = 0 Then > MsgBox "No Shapes Selected" > Exit Sub > End If > Name$ = ActiveWindow.Selection.ShapeRange(1).Name > Name$ = InputBox$("Give this shape a name", "Shape Name", > Name$) > If Name$ <> "" Then > ActiveWindow.Selection.ShapeRange(1).Name = Name$ > End If > Exit Sub > > AbortNameShape: > MsgBox Err.Description > > End Sub > |
|
||
|
||||
|
Bill Foley
Guest
Posts: n/a
|
I haven't tried this before, but the first question is - "Are you
controlling the game?" If so, you can simply use buttons that run macros that either hide the images showing the puzzle at the back or replace them. You click on a button number and the button hides. You click on another button and it hides. This shows two images behind them. If they match, click the "Match" button and those buttons also hide. If they don't match, replace the two buttons you clicked to show the images, leaving all buttons back the way it was. If you are trying to set this up to run automatically, all you will need to do is to use something like a Select Case to see if two similar buttons were clicked to hide the various images. I would think that with a picture set as the background of your slide, one set of duplicated images set on top of the background, then another set of buttons (with code set behind them) that hide to show the images, you can do this whole thing on one slide. I doubt I will get time today to work on something, but should in the next day or two. If I do, I will post it up on my website. -- Bill Foley, Microsoft MVP (PowerPoint) Microsoft Office Specialist Master Instructor www.pttinc.com Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/ "Success, something you measure when you are through succeeding." "David N" <(E-Mail Removed)> wrote in message news:1baba01c45116$f7419fe0$(E-Mail Removed)... > I've been trying to get this working, but I am obviously > doing something basically wrong. > I am trying to build a template for a 'Memory' game to use > with students, based on the TV show 'Concentration'. The > main screen has 36 action buttons in a grid, with a rebus > puzzle behind them. Contestants choose first one button, > then a second one which they think is the matching picture > to the first. If they are correct, 'Match!!!' is > displayed, and the grid redisplays, but with the two > matching action buttons invisible, thus revealing part of > the underlying puzzle. If they are incorrect, the grid > redisplays, ready for the next contestant. > I've set up 38 slides. #s 1-36 are the picture pairs. > Under each picture is a button ('Done') with the action > set to run Sub 'Done'. #37 is the grid of action buttons. > Each action button has text being a number from 1-36, is > named with its number, and is set to run > Sub 'ButtonClick'. #38 Has text that says 'Match!!!', and > a button that is set to run Sub 'AfterMatch'. > Running the show, when I click a button, nothing happens. > (I want it to display the slide with the same number as > the button). > I would like to continue work on this to somehow keep > score of the contestant's matches, but there's no point of > even trying, since I can't get the basic show to work > correctly. > > Here is my code: > Public vChoiceNumber As Integer > Public vButton1 As Integer > Public vButton2 As Integer > Public vPicName1 As String > Public vPicName2 As String > Public GoToSlideNumber As Integer > Sub Intialize() > ActivePresentation.SlideShowWindow.View.GotoSlide (38) > vPicName1 = "" > vPicName2 = "" > vButton1 = "" > vButton2 = "" > GoToSlideNumber = "" > vChoiceNumber = "" > End Sub > > Sub ButtonClick(oShape As Shape) > > If ChoiceNumber = "" Then > vButton1 = oShape.Name > ChoiceNumber = "1" > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > False 'to prevent puzzle from showing during screen redraw > on return to slide > GoToSlideNumber = vButton1 > ActivePresentation.SlideShowWindow.View.GotoSlide > (GoToSlideNumber) > vPicName1 = > ActivePresentation.SlideShowWindow.View.Slide.Shapes > (2).Name > ElseIf ChoiceNumber = "1" Then > vButton2 = oShape.Name > ChoiceNumber = "2" > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > False > GoToSlideNumber = vButton2 > ActivePresentation.SlideShowWindow.View.GotoSlide > (GoToSlideNumber) > vPicName2 = > ActivePresentation.SlideShowWindow.View.Slide.Shapes > (2).Name > End If > > End Sub > > Sub Done() > ' > ' Macro created 5/31/04 by DocuMed > ' > If ChoiceNumber = "1" Then > ActivePresentation.SlideShowWindow.View.GotoSlide (38) > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > True > ElseIf ChoiceNumber = "2" Then > If vPicName1 = vPicName2 Then > ActivePresentation.SlideShowWindow.View.GotoSlide > (39) > ElseIf vButton1 <> vButton2 Then > ActivePresentation.SlideShowWindow.View.GotoSlide > (38) > ActivePresentation.Slides(38).Shapes > (puzzle).Visible = True > End If > ChoiceNumber = "" > End If > > End Sub > Sub AfterMatch() > ActivePresentation.Slides(38).Shapes > (vButton1).Visible = False > ActivePresentation.Slides(38).Shapes > (vButton2).Visible = False > ActivePresentation.Slides(38).Shapes > (puzzle).Visible = True > vPicName1 = "" > vPicName2 = "" > vButton1 = "" > vButton2 = "" > End Sub > Sub NameShape() 'This is for setup, to name shapes > > Dim Name$ > On Error GoTo AbortNameShape > If ActiveWindow.Selection.ShapeRange.Count = 0 Then > MsgBox "No Shapes Selected" > Exit Sub > End If > Name$ = ActiveWindow.Selection.ShapeRange(1).Name > Name$ = InputBox$("Give this shape a name", "Shape Name", > Name$) > If Name$ <> "" Then > ActiveWindow.Selection.ShapeRange(1).Name = Name$ > End If > Exit Sub > > AbortNameShape: > MsgBox Err.Description > > End Sub > |
|
||
|
||||
|
=?Utf-8?B?RGF2aWQgTS4gTWFyY292aXR6?=
Guest
Posts: n/a
|
I agree with Bill that you can probably do this just as easily on one slide. Making 38 slides seems to complicate things, but that is not your error. If I understand what you are doing, I think you have 36 shapes on your slides that you have named. You have given pairs of shapes the same name so when someone clicks on two shapes, you check to see if they have the same name. This might not be your whole problem, but it is not a good idea to give two shapes on the same slide the same name. As an alternative, I suggest that you don't worry about the shape names at all. Instead, put text in each of the slides and check to see if the text is the same. Something like:
If myShape1.TextFrame.TextRange.Text = myShape2.TextFrame.TextRange.Text Then Now, you can make the text invisible by giving it the same color as the background color of the shape. Once you get this part working, keeping score should be a piece of cake. I wish I had more time to look at this in more detail to find out if there are other problems. This looks like a great project. --David David M. Marcovitz Author of _Powerful PowerPoint for Educators_ http://www.loyola.edu/education/PowerfulPowerPoint/ "David N" wrote: > I've been trying to get this working, but I am obviously > doing something basically wrong. > I am trying to build a template for a 'Memory' game to use > with students, based on the TV show 'Concentration'. ... |
|
||
|
||||
|
Shyam Pillai
Guest
Posts: n/a
|
I'll try to post a complete example later in the day. It is a lot easier
doing it with a single slide. -- Regards Shyam Pillai Handout Wizard: http://www.mvps.org/skp/how/ "David N" <(E-Mail Removed)> wrote in message news:1baba01c45116$f7419fe0$(E-Mail Removed)... > I've been trying to get this working, but I am obviously > doing something basically wrong. > I am trying to build a template for a 'Memory' game to use > with students, based on the TV show 'Concentration'. The > main screen has 36 action buttons in a grid, with a rebus > puzzle behind them. Contestants choose first one button, > then a second one which they think is the matching picture > to the first. If they are correct, 'Match!!!' is > displayed, and the grid redisplays, but with the two > matching action buttons invisible, thus revealing part of > the underlying puzzle. If they are incorrect, the grid > redisplays, ready for the next contestant. > I've set up 38 slides. #s 1-36 are the picture pairs. > Under each picture is a button ('Done') with the action > set to run Sub 'Done'. #37 is the grid of action buttons. > Each action button has text being a number from 1-36, is > named with its number, and is set to run > Sub 'ButtonClick'. #38 Has text that says 'Match!!!', and > a button that is set to run Sub 'AfterMatch'. > Running the show, when I click a button, nothing happens. > (I want it to display the slide with the same number as > the button). > I would like to continue work on this to somehow keep > score of the contestant's matches, but there's no point of > even trying, since I can't get the basic show to work > correctly. > > Here is my code: > Public vChoiceNumber As Integer > Public vButton1 As Integer > Public vButton2 As Integer > Public vPicName1 As String > Public vPicName2 As String > Public GoToSlideNumber As Integer > Sub Intialize() > ActivePresentation.SlideShowWindow.View.GotoSlide (38) > vPicName1 = "" > vPicName2 = "" > vButton1 = "" > vButton2 = "" > GoToSlideNumber = "" > vChoiceNumber = "" > End Sub > > Sub ButtonClick(oShape As Shape) > > If ChoiceNumber = "" Then > vButton1 = oShape.Name > ChoiceNumber = "1" > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > False 'to prevent puzzle from showing during screen redraw > on return to slide > GoToSlideNumber = vButton1 > ActivePresentation.SlideShowWindow.View.GotoSlide > (GoToSlideNumber) > vPicName1 = > ActivePresentation.SlideShowWindow.View.Slide.Shapes > (2).Name > ElseIf ChoiceNumber = "1" Then > vButton2 = oShape.Name > ChoiceNumber = "2" > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > False > GoToSlideNumber = vButton2 > ActivePresentation.SlideShowWindow.View.GotoSlide > (GoToSlideNumber) > vPicName2 = > ActivePresentation.SlideShowWindow.View.Slide.Shapes > (2).Name > End If > > End Sub > > Sub Done() > ' > ' Macro created 5/31/04 by DocuMed > ' > If ChoiceNumber = "1" Then > ActivePresentation.SlideShowWindow.View.GotoSlide (38) > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > True > ElseIf ChoiceNumber = "2" Then > If vPicName1 = vPicName2 Then > ActivePresentation.SlideShowWindow.View.GotoSlide > (39) > ElseIf vButton1 <> vButton2 Then > ActivePresentation.SlideShowWindow.View.GotoSlide > (38) > ActivePresentation.Slides(38).Shapes > (puzzle).Visible = True > End If > ChoiceNumber = "" > End If > > End Sub > Sub AfterMatch() > ActivePresentation.Slides(38).Shapes > (vButton1).Visible = False > ActivePresentation.Slides(38).Shapes > (vButton2).Visible = False > ActivePresentation.Slides(38).Shapes > (puzzle).Visible = True > vPicName1 = "" > vPicName2 = "" > vButton1 = "" > vButton2 = "" > End Sub > Sub NameShape() 'This is for setup, to name shapes > > Dim Name$ > On Error GoTo AbortNameShape > If ActiveWindow.Selection.ShapeRange.Count = 0 Then > MsgBox "No Shapes Selected" > Exit Sub > End If > Name$ = ActiveWindow.Selection.ShapeRange(1).Name > Name$ = InputBox$("Give this shape a name", "Shape Name", > Name$) > If Name$ <> "" Then > ActiveWindow.Selection.ShapeRange(1).Name = Name$ > End If > Exit Sub > > AbortNameShape: > MsgBox Err.Description > > End Sub > |
|
||
|
||||
|
David N
Guest
Posts: n/a
|
I will be happy to share it if I ever get it to work!!
>-----Original Message----- >wow! I teach math and don't have a clue of how to do what you are asking >but if you get it working, would you be willing to share the template? I >would love to be able to do something like this with-- solve an equation and >match it with the correct answer. Since you are doing all the work, I know >this is a lot to ask, but I wouldn't begin to know how to do this--so if you >could think about it? >dee >"David N" <(E-Mail Removed)> wrote in message >news:1baba01c45116$f7419fe0$(E-Mail Removed)... >> I've been trying to get this working, but I am obviously >> doing something basically wrong. >> I am trying to build a template for a 'Memory' game to use >> with students, based on the TV show 'Concentration'. The >> main screen has 36 action buttons in a grid, with a rebus >> puzzle behind them. Contestants choose first one button, >> then a second one which they think is the matching picture >> to the first. If they are correct, 'Match!!!' is >> displayed, and the grid redisplays, but with the two >> matching action buttons invisible, thus revealing part of >> the underlying puzzle. If they are incorrect, the grid >> redisplays, ready for the next contestant. >> I've set up 38 slides. #s 1-36 are the picture pairs. >> Under each picture is a button ('Done') with the action >> set to run Sub 'Done'. #37 is the grid of action buttons. >> Each action button has text being a number from 1-36, is >> named with its number, and is set to run >> Sub 'ButtonClick'. #38 Has text that says 'Match!!!', and >> a button that is set to run Sub 'AfterMatch'. >> Running the show, when I click a button, nothing happens. >> (I want it to display the slide with the same number as >> the button). >> I would like to continue work on this to somehow keep >> score of the contestant's matches, but there's no point of >> even trying, since I can't get the basic show to work >> correctly. >> >> Here is my code: >> Public vChoiceNumber As Integer >> Public vButton1 As Integer >> Public vButton2 As Integer >> Public vPicName1 As String >> Public vPicName2 As String >> Public GoToSlideNumber As Integer >> Sub Intialize() >> ActivePresentation.SlideShowWindow.View.GotoSlide (38) >> vPicName1 = "" >> vPicName2 = "" >> vButton1 = "" >> vButton2 = "" >> GoToSlideNumber = "" >> vChoiceNumber = "" >> End Sub >> >> Sub ButtonClick(oShape As Shape) >> >> If ChoiceNumber = "" Then >> vButton1 = oShape.Name >> ChoiceNumber = "1" >> ActivePresentation.Slides(38).Shapes(puzzle).Visible = >> False 'to prevent puzzle from showing during screen redraw >> on return to slide >> GoToSlideNumber = vButton1 >> ActivePresentation.SlideShowWindow.View.GotoSlide >> (GoToSlideNumber) >> vPicName1 = >> ActivePresentation.SlideShowWindow.View.Slide.Shapes >> (2).Name >> ElseIf ChoiceNumber = "1" Then >> vButton2 = oShape.Name >> ChoiceNumber = "2" >> ActivePresentation.Slides(38).Shapes(puzzle).Visible = >> False >> GoToSlideNumber = vButton2 >> ActivePresentation.SlideShowWindow.View.GotoSlide >> (GoToSlideNumber) >> vPicName2 = >> ActivePresentation.SlideShowWindow.View.Slide.Shapes >> (2).Name >> End If >> >> End Sub >> >> Sub Done() >> ' >> ' Macro created 5/31/04 by DocuMed >> ' >> If ChoiceNumber = "1" Then >> ActivePresentation.SlideShowWindow.View.GotoSlide (38) >> ActivePresentation.Slides(38).Shapes (puzzle).Visible = >> True >> ElseIf ChoiceNumber = "2" Then >> If vPicName1 = vPicName2 Then >> ActivePresentation.SlideShowWindow.View.GotoSlide >> (39) >> ElseIf vButton1 <> vButton2 Then >> ActivePresentation.SlideShowWindow.View.GotoSlide >> (38) >> ActivePresentation.Slides(38).Shapes >> (puzzle).Visible = True >> End If >> ChoiceNumber = "" >> End If >> >> End Sub >> Sub AfterMatch() >> ActivePresentation.Slides(38).Shapes >> (vButton1).Visible = False >> ActivePresentation.Slides(38).Shapes >> (vButton2).Visible = False >> ActivePresentation.Slides(38).Shapes >> (puzzle).Visible = True >> vPicName1 = "" >> vPicName2 = "" >> vButton1 = "" >> vButton2 = "" >> End Sub >> Sub NameShape() 'This is for setup, to name shapes >> >> Dim Name$ >> On Error GoTo AbortNameShape >> If ActiveWindow.Selection.ShapeRange.Count = 0 Then >> MsgBox "No Shapes Selected" >> Exit Sub >> End If >> Name$ = ActiveWindow.Selection.ShapeRange(1).Name >> Name$ = InputBox$("Give this shape a name", "Shape Name", >> Name$) >> If Name$ <> "" Then >> ActiveWindow.Selection.ShapeRange(1).Name = Name$ >> End If >> Exit Sub >> >> AbortNameShape: >> MsgBox Err.Description >> >> End Sub >> > > >. > |
|
||
|
||||
|
David N
Guest
Posts: n/a
|
Hi David,
Thanks for your reply. I actually have spent a lot of time studying your samples, and I greatly appreciate your sharing them. I can't imagine how to do this on one slide. There is only one picture per slide. I have 36 slides, with 18 pairs of pictures. I can try the text idea, which seems more foolproof. But I can't get the slides to show on the button click! >-----Original Message----- >I agree with Bill that you can probably do this just as easily on one slide. Making 38 slides seems to complicate things, but that is not your error. If I understand what you are doing, I think you have 36 shapes on your slides that you have named. You have given pairs of shapes the same name so when someone clicks on two shapes, you check to see if they have the same name. This might not be your whole problem, but it is not a good idea to give two shapes on the same slide the same name. As an alternative, I suggest that you don't worry about the shape names at all. Instead, put text in each of the slides and check to see if the text is the same. Something like: > >If myShape1.TextFrame.TextRange.Text = myShape2.TextFrame.TextRange.Text Then > >Now, you can make the text invisible by giving it the same color as the background color of the shape. > >Once you get this part working, keeping score should be a piece of cake. I wish I had more time to look at this in more detail to find out if there are other problems. This looks like a great project. > >--David > >David M. Marcovitz >Author of _Powerful PowerPoint for Educators_ >http://www.loyola.edu/education/PowerfulPowerPoint/ > > >"David N" wrote: > >> I've been trying to get this working, but I am obviously >> doing something basically wrong. >> I am trying to build a template for a 'Memory' game to use >> with students, based on the TV show 'Concentration'. ... >. > |
|
||
|
||||
|
David N
Guest
Posts: n/a
|
Thank you, Bill.
I already run this with the keyboard, but I'm intent on trying to automate it because: The show is presented in a dark auditorium for 50 or more kids at a time in teams of ten, and they get very into it. Manual control is prone to (even in the light!) errors which upset the contestants, and puts pressure on the operator. It is also slower. >-----Original Message----- >I haven't tried this before, but the first question is - "Are you >controlling the game?" If so, you can simply use buttons that run macros >that either hide the images showing the puzzle at the back or replace them. >You click on a button number and the button hides. You click on another >button and it hides. This shows two images behind them. If they match, >click the "Match" button and those buttons also hide. If they don't match, >replace the two buttons you clicked to show the images, leaving all buttons >back the way it was. > >If you are trying to set this up to run automatically, all you will need to >do is to use something like a Select Case to see if two similar buttons were >clicked to hide the various images. I would think that with a picture set >as the background of your slide, one set of duplicated images set on top of >the background, then another set of buttons (with code set behind them) that >hide to show the images, you can do this whole thing on one slide. > >I doubt I will get time today to work on something, but should in the next >day or two. If I do, I will post it up on my website. > >-- >Bill Foley, Microsoft MVP (PowerPoint) >Microsoft Office Specialist Master Instructor >www.pttinc.com >Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/ >"Success, something you measure when you are through succeeding." > >"David N" <(E-Mail Removed)> wrote in message >news:1baba01c45116$f7419fe0$(E-Mail Removed)... >> I've been trying to get this working, but I am obviously >> doing something basically wrong. >> I am trying to build a template for a 'Memory' game to use >> with students, based on the TV show 'Concentration'. The >> main screen has 36 action buttons in a grid, with a rebus >> puzzle behind them. Contestants choose first one button, >> then a second one which they think is the matching picture >> to the first. If they are correct, 'Match!!!' is >> displayed, and the grid redisplays, but with the two >> matching action buttons invisible, thus revealing part of >> the underlying puzzle. If they are incorrect, the grid >> redisplays, ready for the next contestant. >> I've set up 38 slides. #s 1-36 are the picture pairs. >> Under each picture is a button ('Done') with the action >> set to run Sub 'Done'. #37 is the grid of action buttons. >> Each action button has text being a number from 1-36, is >> named with its number, and is set to run >> Sub 'ButtonClick'. #38 Has text that says 'Match!!!', and >> a button that is set to run Sub 'AfterMatch'. >> Running the show, when I click a button, nothing happens. >> (I want it to display the slide with the same number as >> the button). >> I would like to continue work on this to somehow keep >> score of the contestant's matches, but there's no point of >> even trying, since I can't get the basic show to work >> correctly. >> >> Here is my code: >> Public vChoiceNumber As Integer >> Public vButton1 As Integer >> Public vButton2 As Integer >> Public vPicName1 As String >> Public vPicName2 As String >> Public GoToSlideNumber As Integer >> Sub Intialize() >> ActivePresentation.SlideShowWindow.View.GotoSlide (38) >> vPicName1 = "" >> vPicName2 = "" >> vButton1 = "" >> vButton2 = "" >> GoToSlideNumber = "" >> vChoiceNumber = "" >> End Sub >> >> Sub ButtonClick(oShape As Shape) >> >> If ChoiceNumber = "" Then >> vButton1 = oShape.Name >> ChoiceNumber = "1" >> ActivePresentation.Slides(38).Shapes(puzzle).Visible = >> False 'to prevent puzzle from showing during screen redraw >> on return to slide >> GoToSlideNumber = vButton1 >> ActivePresentation.SlideShowWindow.View.GotoSlide >> (GoToSlideNumber) >> vPicName1 = >> ActivePresentation.SlideShowWindow.View.Slide.Shapes >> (2).Name >> ElseIf ChoiceNumber = "1" Then >> vButton2 = oShape.Name >> ChoiceNumber = "2" >> ActivePresentation.Slides(38).Shapes(puzzle).Visible = >> False >> GoToSlideNumber = vButton2 >> ActivePresentation.SlideShowWindow.View.GotoSlide >> (GoToSlideNumber) >> vPicName2 = >> ActivePresentation.SlideShowWindow.View.Slide.Shapes >> (2).Name >> End If >> >> End Sub >> >> Sub Done() >> ' >> ' Macro created 5/31/04 by DocuMed >> ' >> If ChoiceNumber = "1" Then >> ActivePresentation.SlideShowWindow.View.GotoSlide (38) >> ActivePresentation.Slides(38).Shapes (puzzle).Visible = >> True >> ElseIf ChoiceNumber = "2" Then >> If vPicName1 = vPicName2 Then >> ActivePresentation.SlideShowWindow.View.GotoSlide >> (39) >> ElseIf vButton1 <> vButton2 Then >> ActivePresentation.SlideShowWindow.View.GotoSlide >> (38) >> ActivePresentation.Slides(38).Shapes >> (puzzle).Visible = True >> End If >> ChoiceNumber = "" >> End If >> >> End Sub >> Sub AfterMatch() >> ActivePresentation.Slides(38).Shapes >> (vButton1).Visible = False >> ActivePresentation.Slides(38).Shapes >> (vButton2).Visible = False >> ActivePresentation.Slides(38).Shapes >> (puzzle).Visible = True >> vPicName1 = "" >> vPicName2 = "" >> vButton1 = "" >> vButton2 = "" >> End Sub >> Sub NameShape() 'This is for setup, to name shapes >> >> Dim Name$ >> On Error GoTo AbortNameShape >> If ActiveWindow.Selection.ShapeRange.Count = 0 Then >> MsgBox "No Shapes Selected" >> Exit Sub >> End If >> Name$ = ActiveWindow.Selection.ShapeRange(1).Name >> Name$ = InputBox$("Give this shape a name", "Shape Name", >> Name$) >> If Name$ <> "" Then >> ActiveWindow.Selection.ShapeRange(1).Name = Name$ >> End If >> Exit Sub >> >> AbortNameShape: >> MsgBox Err.Description >> >> End Sub >> > > >. > |
|
||
|
||||
|
Shyam Pillai
Guest
Posts: n/a
|
David,
I've uploaded a sample: http://www.mvps.org/skp/downloads/concentration.zip -- Regards Shyam Pillai Handout Wizard: http://www.mvps.org/skp/how/ "David N" <(E-Mail Removed)> wrote in message news:1baba01c45116$f7419fe0$(E-Mail Removed)... > I've been trying to get this working, but I am obviously > doing something basically wrong. > I am trying to build a template for a 'Memory' game to use > with students, based on the TV show 'Concentration'. The > main screen has 36 action buttons in a grid, with a rebus > puzzle behind them. Contestants choose first one button, > then a second one which they think is the matching picture > to the first. If they are correct, 'Match!!!' is > displayed, and the grid redisplays, but with the two > matching action buttons invisible, thus revealing part of > the underlying puzzle. If they are incorrect, the grid > redisplays, ready for the next contestant. > I've set up 38 slides. #s 1-36 are the picture pairs. > Under each picture is a button ('Done') with the action > set to run Sub 'Done'. #37 is the grid of action buttons. > Each action button has text being a number from 1-36, is > named with its number, and is set to run > Sub 'ButtonClick'. #38 Has text that says 'Match!!!', and > a button that is set to run Sub 'AfterMatch'. > Running the show, when I click a button, nothing happens. > (I want it to display the slide with the same number as > the button). > I would like to continue work on this to somehow keep > score of the contestant's matches, but there's no point of > even trying, since I can't get the basic show to work > correctly. > > Here is my code: > Public vChoiceNumber As Integer > Public vButton1 As Integer > Public vButton2 As Integer > Public vPicName1 As String > Public vPicName2 As String > Public GoToSlideNumber As Integer > Sub Intialize() > ActivePresentation.SlideShowWindow.View.GotoSlide (38) > vPicName1 = "" > vPicName2 = "" > vButton1 = "" > vButton2 = "" > GoToSlideNumber = "" > vChoiceNumber = "" > End Sub > > Sub ButtonClick(oShape As Shape) > > If ChoiceNumber = "" Then > vButton1 = oShape.Name > ChoiceNumber = "1" > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > False 'to prevent puzzle from showing during screen redraw > on return to slide > GoToSlideNumber = vButton1 > ActivePresentation.SlideShowWindow.View.GotoSlide > (GoToSlideNumber) > vPicName1 = > ActivePresentation.SlideShowWindow.View.Slide.Shapes > (2).Name > ElseIf ChoiceNumber = "1" Then > vButton2 = oShape.Name > ChoiceNumber = "2" > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > False > GoToSlideNumber = vButton2 > ActivePresentation.SlideShowWindow.View.GotoSlide > (GoToSlideNumber) > vPicName2 = > ActivePresentation.SlideShowWindow.View.Slide.Shapes > (2).Name > End If > > End Sub > > Sub Done() > ' > ' Macro created 5/31/04 by DocuMed > ' > If ChoiceNumber = "1" Then > ActivePresentation.SlideShowWindow.View.GotoSlide (38) > ActivePresentation.Slides(38).Shapes(puzzle).Visible = > True > ElseIf ChoiceNumber = "2" Then > If vPicName1 = vPicName2 Then > ActivePresentation.SlideShowWindow.View.GotoSlide > (39) > ElseIf vButton1 <> vButton2 Then > ActivePresentation.SlideShowWindow.View.GotoSlide > (38) > ActivePresentation.Slides(38).Shapes > (puzzle).Visible = True > End If > ChoiceNumber = "" > End If > > End Sub > Sub AfterMatch() > ActivePresentation.Slides(38).Shapes > (vButton1).Visible = False > ActivePresentation.Slides(38).Shapes > (vButton2).Visible = False > ActivePresentation.Slides(38).Shapes > (puzzle).Visible = True > vPicName1 = "" > vPicName2 = "" > vButton1 = "" > vButton2 = "" > End Sub > Sub NameShape() 'This is for setup, to name shapes > > Dim Name$ > On Error GoTo AbortNameShape > If ActiveWindow.Selection.ShapeRange.Count = 0 Then > MsgBox "No Shapes Selected" > Exit Sub > End If > Name$ = ActiveWindow.Selection.ShapeRange(1).Name > Name$ = InputBox$("Give this shape a name", "Shape Name", > Name$) > If Name$ <> "" Then > ActiveWindow.Selection.ShapeRange(1).Name = Name$ > End If > Exit Sub > > AbortNameShape: > MsgBox Err.Description > > End Sub > |
|
||
|
||||
|
|
|
| |
![]() |
| Thread Tools | |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Query is not doing what it's supposed to be doing! | =?Utf-8?B?VGF0YWthdQ==?= | Microsoft Access Queries | 5 | 5th Jan 2006 12:23 AM |
| Flatbed Scanner + XP = i'm doing something wrong? | =?Utf-8?B?Qmxpbng=?= | Windows XP Help | 1 | 22nd Oct 2004 12:41 AM |
| What am I Doing Wrong? | Dave in Columbus | Windows XP Security | 1 | 2nd Oct 2004 06:46 AM |
| Processor lag with 2 Gs of RAM? What am I doing wrong? | =?Utf-8?B?TWljaGVsZQ==?= | Windows XP Performance | 4 | 23rd Jan 2004 03:52 AM |
| EFS: What am I doing wrong? | EFS-wannabe | Windows XP Security | 4 | 13th Aug 2003 07:34 PM |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc. |




