PC Review


Reply
Thread Tools Rate Thread

What am I doing wrong with this 'Concentration' game?!

 
 
David M. Marcovitz
Guest
Posts: n/a
 
      14th Jun 2004
Thanks. I thought some of your coding style looked familiar (like you
had learned something from my examples). I'm glad you find my site
useful. If you get this to work, maybe you can send it to me, and I can
put it up on my site under my "Examples from Real People" section.

As far as doing this on one slide, I'm picturing layers of pictures. If
I understand what you want to do correctly, you need one big picture at
the bottom. Then you need two layers of 36 pictures on top of that.
When someone clicks on a box, that box gets hidden to reveal the box
below it (with some sort of symbol on it). When they click on another
box, that box gets hidden as well. If the symbols match, the boxes with
symbols are hidden to reveal a piece of the larger picture. If the two
symbols do not match, the top layer boxes are made visible again. I'm
not sure what purpose all the other slides serve unless your showing the
symbols as full screen pictures.

I see that Shyam has contributed to this. He is one of the real coding
experts in this group. I'll have to see if he has solved all your
problems.

--David

--
David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/

"David N" <(E-Mail Removed)> wrote in
news:1c19501c451ce$bd2ad430$(E-Mail Removed):

> 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'. ...

>>.
>>

>


 
Reply With Quote
 
 
 
 
Shyam Pillai
Guest
Posts: n/a
 
      15th Jun 2004
I've now created a page which explains the mechanism and the code used
includes a flash demo of the game in action.
http://www.mvps.org/skp/concentrate.htm

--
Regards
Shyam Pillai

Toolbox: http://www.mvps.org/skp/toolbox/


"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
>



 
Reply With Quote
 
 
 
 
David N
Guest
Posts: n/a
 
      15th Jun 2004
I watched the flash and downloaded the file.
I can't wait to get into it!
 
Reply With Quote
 
=?Utf-8?B?UGRlaw==?=
Guest
Posts: n/a
 
      15th Jun 2004
WOW! ten stars on a 5 star scale
--
Pete


"Shyam Pillai" wrote:

> I've now created a page which explains the mechanism and the code used
> includes a flash demo of the game in action.
> http://www.mvps.org/skp/concentrate.htm
>
> --
> Regards
> Shyam Pillai
>
> Toolbox: http://www.mvps.org/skp/toolbox/
>
>
> "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
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


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


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:16 PM.