PDA

View Full Version : Problem with container


minali
16-04-2008, 03:28 PM
I am facing a problem while creating a drag and drop activity.
In this activity, i am having 2 animals cat and dog. cat should not be dragged in dog's box, if we drag cat to dog's box it should bounce back. It is working fine with 1st attempt but the problem is if we drag cat to cat's box then to dog's box then it dosnt bounce back. Cat stays there in dog's box. Which means problem comes when we do correct drag attempt then incorrect drag attempt.

Can anyone please help me to some my prolem. I have attached the sample flp as well.

cmansell
16-04-2008, 03:39 PM
Hi,

I have changed your flipchart - I have made the boxes contain KEYWORDS rather than pictures. Check the "can contain" section.

It seems to work now.

Cheers

Craig

minali
16-04-2008, 03:44 PM
Hi Craig,

Can you please send me the flp that you have changed.

minali

cmansell
16-04-2008, 04:22 PM
clwn Doh!

Here it is...

Craig

Louise Chew
16-04-2008, 04:49 PM
I am facing a problem while creating a drag and drop activity.
In this activity, i am having 2 animals cat and dog. cat should not be dragged in dog's box, if we drag cat to dog's box it should bounce back. It is working fine with 1st attempt but the problem is if we drag cat to cat's box then to dog's box then it dosnt bounce back. Cat stays there in dog's box. Which means problem comes when we do correct drag attempt then incorrect drag attempt.

Can anyone please help me to some my prolem. I have attached the sample flp as well.


Another thing to be aware of...

The object has the ability to be moved off its container & placed into another position without it jumping back. This is so objects with "return if not contained" set won't constantly jump back into the container. If you take the cat & move it onto another part of the page it will stay put, now put it in the dog's box & it will correctly jump back to its previous position

minali
17-04-2008, 07:09 AM
HI Craig,

Sorry but i am still facing the same problem. Please follow these steps to recall the exact problem:-

1) drag the dog to dog's box
2) Now drag the dog to somewhere else or to cat's box
3) Now u will find that dogs stays there
4) then drag it anywhere, now it bounces back even if you drag it in cat's box

The problem is with second attempt.

Minali

cmansell
17-04-2008, 08:10 AM
Hi,

I am still not sure what the problem is...

I drag to dog to the dog's box. It sticks. I drag it to "somewhere else" on the page. It stays. I drag it back to the dog box, it sticks.

2. I drag the dog to the cat box, it bounces back. I drag it to the dog box, it sticks.

3. I drag the dog to the dog box, it sticks. I drag it to "somewhere else" and it stays there. I then drag it to the cat box, it bounces back, but not to it's original position, but the the "somewhere else" position. This is the only case where it doesn't do exactly as, perhaps, planned. But it's not a major problem, I think.

One thing...are you getting the cat and dog exactly in the container with no bits poking out? Containers are funny that way. Make sure the image is smallish, and the container suitably largeish!

I'll attach my flipchart again, in case I sent the wrong version, but I don't know why it's not working for you. Anyone else got any ideas?

Craig

minali
17-04-2008, 08:24 AM
Hi Craig,

Please drag dog to dog's box, it stays then to cat's box then it stays there as well. Ideally it should bounce back.(This is the main problem)

minali

cmansell
17-04-2008, 08:32 AM
Ok, you got me.

My only question, however, is:

"why would you want to drag the dog to the cat box when you've already successfully placed it in the dog box?"

:confused: Sorry I couldn't help you, hope someone comes in and solves this for you.

Craig

minali
17-04-2008, 08:38 AM
Hi Craig,

Actually this activity will have many more animals, i was testing it with 2 animals right now. Also this can be done by a child thst he/she may drag it again as well.

I think this is a bug with containers, i have tried it many times but its not working like a normal drag and drop activity.

Thanks a ton for your support and time.

Can anyone else help me to solve this problem?

Minali

Daniel Bunker
17-04-2008, 09:49 AM
Interesting - I didn't realise that once an object has successfully been contained, the return if not contained function is negated on the next move. Not sure if this is a recent thing that's crept in or it's always been like that.:confused:

Louise Chew
17-04-2008, 10:07 AM
Its been like that since we put the functionality in to DE in the old v2 days!!

cmansell
17-04-2008, 10:12 AM
It would only be a problem if you had to move an item that has been correctly placed into another container, however, which I think you are unlikely to do. I wonder what happens if you need to move an item into one container (say moving a 2 into an "even" container) and then move it into another correct container (say, moving the 2 to a "multiple of 2" container). You would want it to stick in the second,. But if you moved it to a second container that was "multiple of 3" you would want it to jump back...

hmmm.

Craig

minali
17-04-2008, 10:26 AM
What if i want to freeze the correct answer in the box, like if i want dog should not move if dagged to dog's box.
It should stay there and position should be locked and it cannot move furthur.

cmansell
17-04-2008, 10:59 AM
Right click on the dog, choose "M", then "edit..." then "lock..."

Craig

minali
17-04-2008, 11:18 AM
does it work after the correct drag, i mean to say if i drag it correctly the automatically it will be locked and wont move

davidlloyd
17-04-2008, 02:47 PM
No there's no function to automatically lock objects to a position. If you lock an object before you move it, you won't be able to move it.
However you could set up a button to lock a specific object once it's been moved to the right place. Look in Object Properties > Actions > Object > Lock. There's also an 'Unlock' action too.

sheelagh
17-04-2008, 06:57 PM
Have you tried using restrictors? Not as useful as the drag and drop but it would solve your problem of not allowing a box to have the wrong animal. An example is on the attached flipchart (see the page notes of the chart). :)

davidlloyd
18-04-2008, 12:50 PM
Sheelagh

I think that would make a really nice activity where children might draw a line from the animal to the label and then drag the animal to check.

rgrondin
21-05-2008, 09:05 PM
Which version are you using? 3.0 (PC) will have problems like that - 3.5 corrects the problem.