As Carrie Ann said, using a Freeform Drag and Drop graded question would allow you to take advantage of the built-in functionality for scoring. You wouldn't need to use any variables to track whether objects have been placed correctly. Here's the User Guide info on Freeforms:
If you want to use a custom interaction (instead of a graded question), there are a variety of ways to control the Next button. As Nedim said, it'd be easier for someone to troubleshoot and help if you uploaded the .story file.
Here are the best practices for uploading a .story file:
- Only include slides that are related to the problem.
- Be sure objects, layers, motion paths, and variables have meaningful names.
- If there is proprietary content, replace or delete it. For example, replace proprietary text with “ipsum lorem” text.