Controlling Position for Drop Correct State

Apr 03, 2013

Hello all,

I'm setting up a drag and drop scenario where I'm dragging text boxes onto an object. If the drop is correct, I want the end state of the text box to be lined up below the object that it was dropped on.

For the text box that I'm dragging, I have set up a Drop Correct state, and in that state I place the text box directly below the object it was dropped on. I have a trigger set as follows:

  • Change state of 
  • On object > Text Box 1
  • To State > Drop Correct
  • When > Object dropped on
  • Object > Text Box 1
  • Dropped on: Pic 1

I have the Drop Target Options set to Snap to center. After the text box is dropped, it is not where the Drop Correct state shows when I edit the Drop Correct state. I've tried several different Drop Target options, but I can't seem to figure out how to get the text box to appear (after it is dropped) where the Drop Correct state indicates that it will appear when I'm in edit states mode.

Any ideas on how to control the final resting place of a dropped object?

Thanks very much.

8 Replies
Scott Calvin

Sure Jesse, here is a quick test file for what I'm trying to accomplish. When you complete the drop, it looks like the text box disappears, but in reality it is off the screen. If you move the text box 200 pixels to the left of where you actually want it in the Drop Correct state, then the text box ends up on the far right of the screen. 

FYI, text box 1 and 3 match with the top graphic, text box 2 matches with the bottom graphic. (they are set to appear individually)

I'm sure this has something to do with where the text box actually is when the drop is complete, but I can't seem to identify a standard like "move your drop state 150 pixels to the left of where you want it"...the final resting place seems very random.

Thanks.

Jesse Cabaniss

Scott Calvin said:

Sure Jesse, here is a quick test file for what I'm trying to accomplish. When you complete the drop, it looks like the text box disappears, but in reality it is off the screen. If you move the text box 200 pixels to the left of where you actually want it in the Drop Correct state, then the text box ends up on the far right of the screen. 

FYI, text box 1 and 3 match with the top graphic, text box 2 matches with the bottom graphic. (they are set to appear individually)

I'm sure this has something to do with where the text box actually is when the drop is complete, but I can't seem to identify a standard like "move your drop state 150 pixels to the left of where you want it"...the final resting place seems very random.

Thanks.

Where do you want the text to appear after it's dropped?
Jesse Cabaniss

I believe I figured this out. It has to do with states that change the location of an object that's being dragged and dropped. If, for example, you choose to have the object snap to center, you have to change the location of the correct state in relation to what direction and how many pixels you want it moved from where it snaps to center. It's difficult to explain, but I will attach your example in a minute.

Jesse Cabaniss

Scott Calvin said:

Also, to answer your question, I want the text boxes to appear directly below the object they are dropped on, and build a bullet-point type list.

Thanks again.


Trial and error is the only way to figure out where exactly you need to correct state to be. At least, that's the only way I could figure out how to do it.

This discussion is closed. You can start a new discussion or contact Articulate Support.