Kingsley eLearning Solutions

You have big dreams for your eLearning.
We'll make them come true.

image of Kingsley

Lock/unlock game slides with Articulate API

Submitted by Kingsley 👑 on Tue, 10/13/2009 - 12:25

After viewing my previous post"Making Forklift eLearning Interesting w/Examples"
A few folks wanted a peek at the code I use to lock the Articulate course until the user completed the game.
It's actually only a few lines
This section is near the top of my code:

var ArtAPI = _level0.ArtAPI;
slidenum = ArtAPI.GetCurrentSlide();
_level44.Presentation.Slides[0].Slide[slidenum - 1].waitforuser[0]._value = "true"; 
if(!_global.baseHit){
_level44.Presentation.Slides[0].Slide[slidenum - 1].navlocked[0]._value = "true";
}

That code grabs the Articulate API.
Gets the current slide's number
Sets the slide to wait for the user to click the next button
If the base (cargo area) has not ever been hit (more on this global variable below)
Lock this slide so the student can not click next/back etc.

Then later in my code when I have determined the cargo hit the base I run this function:

function baseHit() {
	winner_txt.text = "Good Job!";
	winner_txt._visible = true;
	timer = setInterval(resetAllCones, 3000);
	 Key.removeListener(keyListener);
	_global.baseHit = true
	_level44.Presentation.Slides[0].Slide[slidenum - 1].navlocked[0]._value = "false";
}

Most of that is for the game... the only parts that pertain to Articulate are the last two lines.
Set my global variable to true. This way the slide wont lock if they just want to come back and play.
Unlock the slide.

One thing you need to make sure of is that you disable the Articulate Keyboard shortcuts or else the course move to the next slide when the user presses their arrow keys. You 'should' be able to do this with the ArtAPI.EnableKeyboardShortcuts(bEnable) but it never works for me...

Comments

Submitted by sci72 (not verified) on Thu, 10/29/2009 - 10:55

Permalink

hmmmm... instead of 'bEnable' try a string of true or false, I've noticed that Articulate in a lot of cases doesn't use true boolean's but instead it uses strings that have 'true' or 'false' in them. Oh and nice locking code for articulate, where ever did you find it ;)

Submitted by Kingsley 👑 on Thu, 10/29/2009 - 11:19

Permalink

Thanks sci72 it will try that!

Everyone sci72 is one of the wonderfully helpful contributors to the Articulate forums.

His work here really helped me with this project.

Submitted by Yong Su (not verified) on Wed, 10/06/2010 - 07:17

Permalink

Nice article, really helpful! Thanks for sharing! Just have a quick question though, is it possible to just lock/unlock the next-slide button?

I understand that by setting navlocked[0]._value to "true" will actually lock the play button, the back button and the next button. In my project, I only want to lock the next button. Please let me know if you have any idea, thanks again!

Su

Submitted by Mark Ross (not verified) on Tue, 01/11/2011 - 13:23

Permalink

I'm also interested in only locking the "Next" button, i.e. I want them to be able to go back without completing the conditions if they want.

Did you ever do any development in this direction? Thanks!

Submitted by utamyb (not verified) on Wed, 03/12/2014 - 17:48

Permalink

I know this thread is ages old but it's still very helpful information! Here's hoping someone still checks the posts...

I have an Articulate presentation that uses a preloader. I have an interactive swf on slide 4 that uses the code above to lock the navigation controls until the user interacts with the swf. When I preview slides 3-5, the swf code works fine and navigation is only locked for slide 4. When I preview from slide 1, navigation is locked in slide 1. Could this be because the preloader loads my swf ahead of time?

As you can imagine, it's hard to get anywhere when slide 1 is locked and the key to unlocking the navigation controls is on slide 4... :(

Submitted by RobertExorp (not verified) on Tue, 11/21/2017 - 00:07

Permalink

Submitted by GregoryBoips (not verified) on Wed, 11/22/2017 - 15:56

Permalink

<a href=http://www.pastlives.dk/converse-all-star-denmark-389.php>Converse All Star Denmark</a>
Find out how a lot of calories you truly will need. Learning the actual level of unhealthy calories you ought to be having is a quick method to put yourself in the way of thinking for wholesome consuming. Once you know how many calories you require, you can decide what food products will be the best to help you achieve that aim.

<img>https://www.shiatsu-do-in.nl/images/shi2/21302-timberland-helcor.jpg</i…;

Receiving the family members jointly to get a camping outdoors venture might be some very nice exciting for anyone engaged. When preparing your camping out journey, getting some terrific suggestions and ideas helps to make the big difference within your pleasure also. Take a look at this post to soak in exceptional tips that may have you ever out the door and then in the fantastic outside right away.

<img>https://www.baukau-media.de/images/ba2/8468-nike-air-huarache-run-ultra…;

Submitted by FloydTic (not verified) on Thu, 11/23/2017 - 02:17

Permalink

<a href=http://www.occupycalgary.ca/nmd-adidas-red-and-black-591.php>Nmd Adidas Red And Black</a>
Disappointment can occur if you will find complications with your traveling plans. Routes can be slowed or even the right car might not be available. Within these conditions you will find only two people who is able to cope with the problem, yourself and the broker you happen to be speaking with. At the start, the two of you value resolving the issue, even so, it is quite easy for one of you to drop your awesome. Maintain relax and remain considerate. You will complete much more by doing this, plus your vacation is going to be significantly less nerve-racking.

<img>https://www.herbolarionaturaibaez.es/images/herbolarionaturaibaezes/155…;

Make use of a base coat, two layers of shine along with a top rated jacket to maximize the length of time that your nail improve will appear great. This provides you with the look of an experienced manicure and will keep the varnish in the nail a lot longer than what a single coat of shine would.

<img>https://www.terravilla.nl/images/ter2/7243-mbt-schoenen-emmen.jpg</img&…;

Submitted by Cecilpypob (not verified) on Sun, 11/26/2017 - 19:00

Permalink

<a href=http://www.voetbalschoenengoedkoop.nl/153-adidas-voetbalschoenen-rood-b… Voetbalschoenen Rood Blauw</a>
Using a artificial tanning cream can make your skin show up a lot more stunning without the need of receiving any of the harmful rays from sunbathing or tanning. Make sure to shave or wax tart any your hair that you simply don't want on your body before you apply any kind of tanning lotion a minimum of round the clock ahead of time.

<img>https://www.vansschoenensale.nl/images/no_picture.gif

If you wish to have a far more productive backyard garden, increase your growing time of year to the drop by using row includes. Row addresses keep heat in, frost out, plus control deer intrusion. The vegetation beneath the row includes need to certainly be fairly proof against cool nevertheless, so it is recommended to pick plants and underlying greens.

<img>https://www.newbalanceloopschoenen.nl/images/int2/11229-new-balance-993…;

Submitted by JamesSmupt (not verified) on Mon, 11/27/2017 - 07:09

Permalink

<a href=http://www.nikefreernflyknit.nl/307-nike-free-rn-flyknit-white.php>Nike Free Rn Flyknit White</a>
Don't purchase the very first home the truth is and don't hop on a residence just as it is cheap or will close quickly. Investigate, see other residences, and record delivers. By hurrying in a acquire, you could possibly ignore techniques like doing an assessment or purchase something you don't actually like.

<img>https://www.adidaszxfluxsale.nl/images/svu2/3530-yeezy-boost-350-moonro…;

Plan your workout routines for the area of the day you are most full of energy and alert. Should you find it difficult to get rid of your bed and feel as if a zombie for several time then you will not gain a lot from your early morning work out. If you work out during an productive part of every day, you will do more exercise effectively, use-up more calories and enjoy it a lot more.

<img>https://www.samsharp.nl/images/hum2/4109-asics-gel-lyte-evo-samurai.jpg…;

Add new comment