To summarize, I am working on an activity that is a puzzle. The puzzle is solved when all the "pieces" (panels) are in the proper order. The puzzle is set up in the activity that uses the DraggableView class. Once this is done, the app waits for an event that moves a piece. Everything else is done by the DraggableView class module (moving the piece, updating those variables that need to be updated with each move - such as the piece's new location and determining if the puzzle is solved). All that is working as it should.
However, what is supposed to happen is that when the puzzle is solved, the player receives a congratulatory message (using one of the Msgbox routines) and, when the dialog box is closed, the puzzle activity is to start a new ("reward") activity and close itself. My problem is I can't figure out how to accomplish this. The only way the "reward" activity starts is by tapping the device's Back button.
I tried calling the "reward" activity from the DraggableView class module (which doesn't work) and from the puzzle activity's "Create", "Resume" and "Pause" subs. The only one that works is "Pause" and then only when Back is tapped. Therefore, to more fully understand how this is working and to get the app to do what is supposed to happen, I have some questions.
1. Obviously, how do I trap the puzzle's solution in the puzzle activity so as to activate the "reward" activity only when the puzzle is solved?
2. The DraggableView class module "Touch" event returns a value of True. To what and where is this value being returned?
3. In between Touch events, where in the code is the device paused?
4. Can an event sub be used in the puzzle's activity that is triggered when the puzzle's solution is True? If so, how?
Hopefully, this will be the last issue in connection with the DraggableView class. Thanks.
However, what is supposed to happen is that when the puzzle is solved, the player receives a congratulatory message (using one of the Msgbox routines) and, when the dialog box is closed, the puzzle activity is to start a new ("reward") activity and close itself. My problem is I can't figure out how to accomplish this. The only way the "reward" activity starts is by tapping the device's Back button.
I tried calling the "reward" activity from the DraggableView class module (which doesn't work) and from the puzzle activity's "Create", "Resume" and "Pause" subs. The only one that works is "Pause" and then only when Back is tapped. Therefore, to more fully understand how this is working and to get the app to do what is supposed to happen, I have some questions.
1. Obviously, how do I trap the puzzle's solution in the puzzle activity so as to activate the "reward" activity only when the puzzle is solved?
2. The DraggableView class module "Touch" event returns a value of True. To what and where is this value being returned?
3. In between Touch events, where in the code is the device paused?
4. Can an event sub be used in the puzzle's activity that is triggered when the puzzle's solution is True? If so, how?
Hopefully, this will be the last issue in connection with the DraggableView class. Thanks.