November 4, 2019
Drag and Drop: Submit button only appears when all drag sources have been dropped
Comments
(5)
November 4, 2019
Drag and Drop: Submit button only appears when all drag sources have been dropped
Newbie 4 posts
Followers: 0 people
(5)

Hi there,

Thank you ever so much for your amazing help so far!

I have a question regarding drag and drop use: I implemented a drag and drop on one slide with each 6 drag sources (DS) and drop targets (DT). Each DS can go into any DT as the order is not important in the end, there is no right or wrong. It’s more a reflective task making learners think.

Now it would be amazing to have the Submit button only appear when there is one DS in each DT, no matter which one is where and there are too many possible answers (if I’m not completely mistaken there must be about 6!=1*2*3*4*5*6=720 order options!?).  Is there any possibility to “tell” the DT-items “when full, submit button appears”?

Thanks a lot for your help!

Best, JN

5 Comments
2019-11-17 13:32:42
2019-11-17 13:32:42

@Gaanf  Why do you need a click box, that  is puzzling me?  You need to pause the slide after having the playhead released in the second decision of the advanced action (Continue), but not from the start.  You cannot address the Submit button in an advanced action because it has no ID. That is the reason you used a time-based effect, not one called from the action. Click box is not allowed in a Fluid Boxes project, but I suppose this is a non-responsive project. The variable v_SubmitButtonShown has no real functionality, or do I miss something planned more?

 

Like
(3)
>
Lieve Weymeis
's comment
2019-11-18 10:11:59
2019-11-18 10:11:59
>
Lieve Weymeis
's comment

Hi Lilibiry,

Regarding Click Box:
As you say, we need something that pauses the slide before the course plays into the next slide, because the second decision block on the advanced action will release it to make the motion path effect plays. The click box takes care of that at the last frame and keeps the slide paused. Not sure what you mean by “not from the start”. Doesn’t necessarily have to be a click box, of course. Could be any other object with an adjustable pause point.

Regarding v_SubmitButtonShown:
This is to make sure that the second decisions block only evaluates to true once: when the last empty drop target gets populated with the first drag source, and does not evaluate again to true on any subsequent drag&drop action, because that would release the play head again, and the course might play into the next slide prematurely.
Maybe I misunderstood the OP, but my understanding was that the learner should still be able to continue with the D&D interaction after the Submit button is available, if he chooses to do so. He doesn’t necessarily have to click it right away.

As I wrote – all rather awkward. There’a got to be a more elegant way. Hiding/showing the submit button with js, for example.

Like
>
Gaanf
's comment
2019-11-18 10:17:21
2019-11-18 10:17:21
>
Gaanf
's comment

What I meant about the CB is that you don’t need it from the start of the slide, you can have its timeline starting after the pausing point of the D&D slide.  Badly formulated probably.

Still don’t see any functionality for that Boolean v_SubmitButtonShown. When do you use that variable later on? If you don’t use it, it is useless in my mind. Many newbie users confuse variables and actions… want to avoid that all the time.

Wonder if an embedded object like that Submit button can be addressed by JS, it has no ID as you know. If that was the case, using a multistate object would be easier.

BTW I used also a motion effect for a workaround described in one of my Quiz Tweak blogs.

Like
>
Lieve Weymeis
's comment
2019-11-18 12:15:48
2019-11-18 12:15:48
>
Lieve Weymeis
's comment

Click Box: Yes, it doesn’t have to be there from frame 1 on. Doesn’t hurt anyone if it is though 🙂

v_SubmitButtonShown: Maybe the name isn’t chosen all to well, and is not really self-explaining. It basically tracks the moment from which on all drop targets have at least one drag source dropped to it, as it’s set from 0 to 1 in that very moment through the second decision block. If after having been released by the second decision block the slide played through to the last frame, would get paused there by the click box, and the learner would now continue dropping other drag sources on any drop target, it prevented the second decision block to evaluate to true again, thus releasing the playhead. All DropTarget variables will be 1 or greater by then, so without v_SubmitButtonShown the second decision block would evaluate to true every time another drag source get’s dropped somewhere.

ID of Submit button: While it doesn’t show up anywhere in Captivate, one can still just preview in HTML and inspect the button element in the browser console. This will give you the id. If I remember correctly it’s usually something like ‘si’ (slide item) + ‘[some 4-digit number]’.

Like
2019-11-07 11:23:12
2019-11-07 11:23:12

There’s no built-in feature like that, which you could just switch on by checking a tick box or something. Anyway, here’s one solution that does (more or less) what you want. There’s sure other solutions; among them probably much more elegant ones…

  1. Drag the Submit button off the stage, so that it sits right outside of it
  2. Give it a motion path effect that moves it back in. Set the Effect Start to 1.5 seconds and the Effect Duration to 0.1 seconds (unless you want it to slowly glide in; than set it accordingly)
  3. Put a ClickBox object somewhere on the stage where the learner would not accidentally click it. Best have it mostly off the stage with just a couple of pixels protruding onto it
  4. Create a user variable for every DropTarget and give them a default value of 0
  5. Create a user variable ‘v_SubmitButtonShown’ and give it a default value of 0
  6. Create an advanced action for every DropTarget that would
    – increment the respective DropTarget variable by one, and
    – check if all DropTargetVariables are 1 or higher AND v_SubmitButtonShown is o,
    and if so:
    – assign v_SubmitButtonShown with 1, and
    – Continue
  7. Assign the Advance Actions to the DropTargets’ Object Actions (button on the DRAG AND DROP/ Format tab) for all Drag Sources

This assumes that you do not alter the D&D Interactions’s default pause point of 1.5 seconds.

Instead of placing the Submit Button off stage and then moving it back in with a motion path effect, you might also try to achieve the same with the help of other effect; e.g. zoom it to 0 % at 0 seconds and zoom it back to 100% at 1.5 seconds. I also tried with Alpha, but couldn’t get it to work.

Like
Add Comment