Thanks for the replies! After reading them a few times and experimenting I think I'm understanding it now.
To create and position a rect using paths, I'm creating it with ui.Path.rect() and just giving 0,0 for the position with the desired size. Then I'm setting the position property to locate the center where I want it.
@JonB thanks. I defined everything and added the music code and it’s stopping and starting on cue. Thank you for your help. I wasn’t sure how to use the stop resume and pause. I sometimes still have trouble figuring out little things.
@JonB Thank you for the advice. I’m going to try to work this in. I am also going to review all of my post to make sure I haven’t missed any advice. I really appreciate you guys helping me. I’ve seen some things you guys have worked on on github and it is much above my level. I appreciate you guys taking the time to help me. I feel it’s a privilege to be helped by people who know so much. Thank you very much @mikael@ccc@cvp.
@trey, one idea would be to place a transparent view on top (as a subview of scene.view) to handle the touches.
Then you would need to check if the touch is near the top-right corner to simulate clicking on the ”x” with superview.close(). And remember to flip the y coordinate before passing the coordinate and touch type to your scene code. And maybe go via screen coordinates if you do a lot of zooming and panning in your scene.