Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Drag & Drop Failures?

Explorer ,
Jan 01, 2017 Jan 01, 2017

Does anyone understand how a "failure" works?

I have written a JavaScript which should execute "on failure", but I am not sure what classifies as a "failure".

My Drag & Drop has a "reset" button to return everything to its original spot and allow the user to keep trying until they get the correct answer, at which point it executes another JavaScript to go to the next slide (working).

I turned on "failure caption" for debugging, but apparently dragging an incorrect combination of sources does not count as a failure?

How my project currently works:

- There are 6 sources.

- There are 3 targets.

- When the correct sources are dragged onto the correct targets, it goes to the next slide (working).

Thank you in advance.

534
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2017 Jan 02, 2017

I would never use JS for showing captions in D&D because that functionality is built in.

If you use the default work flow, the Failure caption will appear. But the Failure ACTION which you need to trigger the JS only occurs after the last attempt. That is the same as for default quiz slides, but there it is better labeled 'Last Attempt' instead of 'Failure'. Since you have Infinite attempts, that Last attempt never occurs....Since I'm not a JS expert, only use it when the functionality of Captivate or its advanced actions are missing something, don't really know how you trigger this JS script.  What I just explained about the action, and more tips can be found in:

Drag&Drop tips - Captivate blog

Maybe you could use the InBuilt states, if you are on CP9, and show a failure caption that way:

Drag&Drop in 2016 with Captivate 9 - Captivate blog

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 02, 2017 Jan 02, 2017

I used captivate's "failure caption" to test whether failures occured or not. The reason I am using JS is because I am trying to make my own version of google analytics which records data every time a wrong answer (failure) occurs.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2017 Jan 02, 2017

Failure occurs, but the Failure action should be renamed Last Attempt: that event is not occurring for Infinite attempts.

The failure caption should appear for each failed attempts however, it combines the Retry and the Failure caption of a normal quesiton slide. If it doesn't appear for you, something must be wrong with the setup.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 02, 2017 Jan 02, 2017

Oh. Do you know if there is a way to have the sources auto reset when a failure occurs? I would prefer to not have the reset button.

From your links it seems auto resetting can only be done by going back to the frame at the start of the slide? But that is still with the button. I would like to connect it with the failure.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2017 Jan 02, 2017

No, since an intermediate failure cannot trigger an action. You could add a shape button to try to Re-enter the slide.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 02, 2017 Jan 02, 2017

Ah. I believe I can't re-enter the slide or reset the frame either, because of the analytics. It's tied with the OnLoad event and requires mistakes being recorded.

I made a quick video showing my project: CapD&DVid - YouTube

Notes: I didn't record my mouse, but what I did was:
- Choose an incorrect combination.

- Press the reset button.

- Choose the correct combination (auto success triggers and takes me to the next level).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 03, 2017 Jan 03, 2017

I'm out of ideas in that case, never had such a use case until now. Sorry.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 03, 2017 Jan 03, 2017
LATEST

That's fine. Thank you for your time and effort.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources