September 21, 2019
Word Builder Example
Comments
(20)
September 21, 2019
Word Builder Example
I am currently a provider of technical training and support in the electronic manufacturing industry. My prior training and work experience as a teacher, network administrator, web design, and instructional design make me well prepared to design it, develop it, and deliver it. I am a father of five, a US Army veteran, and I enjoy playing the guitar as well as performing in local community theater. 
Legend 99 posts
Followers: 153 people
(20)

This post is inspired by a question posed in the community. You may read the original post at the following link.

https://elearning.adobe.com/2019/02/get-name-object

In a way – this question touches on some things I have done in other projects but this was a nice idea and chose to expand on this further for Mike.

I believe I have captured the essence of what Mike is trying to do. (Although I did expand on it a bit further by adding some additional features.) As with the majority of my projects – I used JavaScript to build the actions.

This project uses only a single variable called   position   to track the currently active character in the word being built. The default value is  1.

I also created a small triangle marker which will move above the currently selected character to provide better visualization of where you are in the word.

I chose to layout the letters in a keyboard fashion – but of course, they can be positioned however someone wants.

I also added a space bar, a delete key, and a button to clear the entire word and start over. As another bonus, I added the ability for the letter position to advance automatically but you can still select whatever position you want manually. The delete key functions much like a backspace. I suppose I could have just named it that way.

The Code

Code can be found in two places.

  1. For the selection of each letter
  2. For each button in the keyboard

Letter Position Selection

For each letter – the code is essentially the same and does two things. Below is the example for the first letter.

cp.changeState(“marker”,”pos1″);
position=1;

We set the position of the marker above the letter being clicked on and set the   position    variable to reflect the position of the letter in the word appropriately.

Letter Choice

The keyboard selections can be broken down into two parts. Keeping to the request of the original post requires a single line of code on each button. Below is the example for the “Q” button. This is the first part.

cp.changeState(“letter”.concat(position),”charQ”);

I took advantage of JavaScript’s ability to concatenate to help change the state of the selected position. I named each of my ten letters as letter1, letter2, letter3, etc. This way the letter change will always track with the current value of the   position   variable.

The second part is adding the ability for the marker and position to advance automatically.

++position;
if (position==11) {
position=10;
}
cp.changeState(“marker”,”pos”.concat(position));

After changing the character, we increment the   position   variable, make sure that we do not keep incrementing past a value of 10, and then change the position of the marker to match.

Here is the working project.
Enjoy!

Play
20 Comments
2019-09-23 13:22:52
2019-09-23 13:22:52

Thanks for the link !… Very nice indeed !… But the downloadable version is the final one (html version) and not a cptx file…… So there’s only one word to find…

Like
(10)
>
Ludovic Mercier
's comment
2019-09-23 13:34:44
2019-09-23 13:34:44
>
Ludovic Mercier
's comment

Bummer – I was afraid that might be the case. I might toy around with the idea and see if I can find a way to make a multi-word version.

Like
(1)
>
Ludovic Mercier
's comment
2019-09-26 03:54:37
2019-09-26 03:54:37
>
Ludovic Mercier
's comment

I have good news for you. I managed to create a functional version of hangman that will allow you to have several different words of your choosing up to a maximum of 15 letters each.

I want to try to polish it up a bit and will hopefully get it posted over the weekend.

Like
(1)
>
Greg Stager
's comment
2019-09-26 08:30:17
2019-09-26 08:30:17
>
Greg Stager
's comment

I knew it wouldn’t be so challenging for you !… So here’s another challenge : on the first slide, you enter a word… And this word becomes the one you have to discover during the game (on another slide)… ???… But I don’t want to disturb you too much in your creative work…

I already suggest this to Mark Dubois (https://www.markdubois.info/weblog/2018/03/games-in-captivate/) with elearning Brothers’s parachute game… !!…

Like
>
Greg Stager
's comment
2019-09-26 08:38:23
2019-09-26 08:38:23
>
Greg Stager
's comment

I knew it shouldn’t be so challenging for you !… (I try to sent you another challenge but I put a link in my answer… and it didn’t appear… )…

Like
>
Ludovic Mercier
's comment
2019-09-26 11:54:06
2019-09-26 11:54:06
>
Ludovic Mercier
's comment

Well – my version of this is not nearly as nice from a graphical standpoint and mine functions within the scope of a single slide.

I was actually trying to think of a way to add words from within the game in addition to making them within the CPTX file.

Any that are added within the game, of course, would not persist after closing the browser. So having some that are included is still needed. Those can be changed of course.

I was looking to have a student/teacher “login” page where students only get the game and teachers get the ability to add words. That will add a couple slides though.

We’ll see if I can get that far by the weekend. Perhaps I will make two versions and post the enhanced update sometime later.

Like
>
Greg Stager
's comment
2019-09-26 12:58:41
2019-09-26 12:58:41
>
Greg Stager
's comment

Here are the “Hangman” I made in Flash :

http://soutien67.free.fr/varies/TBI/francais/TBI_Fr_01.htm#signet4

Look at the second one below… You enter the word and then you have to discover it on another frame… The design of the hanging man is also nice (I think)… If you want them to save some time, I can send them to you… (But how ?…)

Like
>
Ludovic Mercier
's comment
2019-09-28 03:12:58
2019-09-28 03:12:58
>
Ludovic Mercier
's comment

My version is posted – complete with a password protected ability to add new words.

Keep an eye out for when that is approved.

Like
>
Greg Stager
's comment
2019-09-28 07:49:33
2019-09-28 07:49:33
>
Greg Stager
's comment

I think not before Monday now… I posted another one yesterday at noon (in UK) and it’s still not appeared… Can’t wait to see your project though !!!…

Like
>
Ludovic Mercier
's comment
2019-09-28 07:55:01
2019-09-28 07:55:01
>
Ludovic Mercier
's comment

I write too fast… Mine is online just now !… Hi hi !…

Like
>
Ludovic Mercier
's comment
2019-09-28 07:58:02
2019-09-28 07:58:02
>
Ludovic Mercier
's comment

And so is yours !!… (Can’t edit the posts…)

Like
2019-09-23 07:24:01
2019-09-23 07:24:01

As usual a great demonstration of the possibility to join JavaScript with Captivate !…

Now you have to develop your resource to make a hangman game like ??!!…

😉

Like
(1)
(8)
>
Ludovic Mercier
's comment
2019-09-23 12:09:53
2019-09-23 12:09:53
>
Ludovic Mercier
's comment

That would be an interesting project. I think such a project would not be terribly daunting for a single game but building one that utilized several words for replayability would be much more complex.

I think someone posted a hangman game a while back with some nice graphics – did you happen to see that and try it out?

Like
>
Greg Stager
's comment
2019-09-23 12:57:12
2019-09-23 12:57:12
>
Greg Stager
's comment

No I didn’t… But I would be very interested in seeing it !… I tried the Captivate Widget game but it wasn’t enough customizable (all the sounds were in english). So I used the hangman game found in the “elearning brothers” site…

See here : http://soutien67.fr/francais/activites/pendu/le%20jeu%20du%20pendu.htm

(I made one in Flash which was fully customizable… but Flash is an old story !…)

 

Like
>
Ludovic Mercier
's comment
2019-09-23 13:08:23
2019-09-23 13:08:23
>
Ludovic Mercier
's comment

Here is the one I was thinking of.

https://elearning.adobe.com/2018/05/awesome-hangman-game/

 

Like
>
Greg Stager
's comment
2019-09-26 12:51:29
2019-09-26 12:51:29
>
Greg Stager
's comment

Odd – this link, which worked the other day when I pulled it up – is not working and I cannot find it in search. Almost as though it has been pulled.

Like
>
Greg Stager
's comment
2019-10-03 11:15:07
2019-10-03 11:15:07
>
Greg Stager
's comment

Very odd indeed !… As it appears again today (see the new blog) !!… (But your version is far better…)

Like
>
Ludovic Mercier
's comment
2019-10-03 11:48:46
2019-10-03 11:48:46
>
Ludovic Mercier
's comment

I see – and the accordion effect I posted two days ago still has not been moderated. It is sad that if I have a post and wait 24 hours for it to be approved and then discover a typo that I want to fix – if I try to fix the typo – the post will disappear until it is moderated again.

So – wait like 24 hours to approve changing tetx to text or something like that. Ridiculous.

Like
>
Greg Stager
's comment
2019-10-03 11:54:06
2019-10-03 11:54:06
>
Greg Stager
's comment

Just be patient !… (Maybe all the moderators  are now in Vegas ^^ !…)

Like
>
Ludovic Mercier
's comment
2019-10-03 12:06:44
2019-10-03 12:06:44
>
Ludovic Mercier
's comment

That may very well be the case. However, for all those people who are new to Captivate that come to the community to seek answers are sorely let down.

Can you imagine seeking help for something and waiting DAYS just for your question to appear? If the community is going to thrive and grow – I think there should be several people working to moderate posts around the clock.

If my quick answer to you has a link in it – you might have to wait until tomorrow to get it. At least the plain forum is a bit more functional but I have a suspicion that the person in the referenced post below feels the way they do for a similar reason. I asked but did not get a response yet.

I broke up the link below in the hopes this post would not be lost in moderation as well.

https  ://  community [dot] adobe [dot] com/t5/Captivate/Make-alpha-from-to-always-0-1o-100/td-p/10646734

Like
Add Comment