Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Tracking a multiple drag and drop problem

Tracking a multiple drag and drop problem

Tracking a multiple drag and drop problem

Hi, I'm working on a CD-ROM project and I have a problem. I need to create a drag and drop activity where the user drags multiple statements into one of two areas.  The interaction will then judge this right or wrong. I can do this when each statement has a unique area to be dragged to (using the parent/child number idea).  But I just don't have the knowledge to do a grouped verson (E.g Tags 1 and 3 to area 1, tags 2 and 4 to area 2). I have been told that the answer lies in building a linear list, but if anybody has the time could they respond telling me (step by step) where to put icons, variables etc.  Thanks.

RE: Tracking a multiple drag and drop problem

Here's a way to do it without using lists.

1. in a calculation icon at the beginning of the flowline set up a variable for the total correct. eg,

_correct := 0

2. Set up the display icons (Tag1, Tag2, Tag3, Tag4) and target area responses with a calculation icon (in your case Area01 and Area02)

3. For the Area01 response calculation icon attach the following script;

if ObjectMoved = "Tag1" then
    _correct := _correct + 1
end if
if ObjectMoved = "Tag3" then
    _correct := _correct + 1
end if
Movable@ObjectMoved := FALSE

4. do the same with the Area02 response. (theres probably a better way to script this but I couldn't get the "or" operator (|) to work properly.)

I added the movable@ObjectMoved := false command to prevent the user from dragging the same object in and out and racking up the _correct variable, once the answers in there, it'll stay in there. I would add a reset button to navigate to the beginning of the flowline to let the users change their answers.

You may want to add a target area response after the area01 and area02 repsonses that covers the entire screen and is set to "On Drop" - Put Back.

To evaluate just look at the _correct variable and ensure that it equals the total of possible correct answers

Theres other ways to do this if you want the functionality to be a little different(eg. having the object be freely moved until the answer is evaluated, or storing the answers in a propertlist), but they are more complicated to setup, post if you want another example.

Hope this helps

RE: Tracking a multiple drag and drop problem

A better way of writing the if/then statement, in this case, is using the Test Function.

Test(ObjectMoved = "Tag2" | = "Tag4", _correct := _correct + 1)
Movable@ObjectMoved := FALSE

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close