I have a hotspot used to play a video when an inventory item is dragged/dropped onto it. When an item is dragged onto the hotspot, the looping video plays nicely. When the hotspot is clicked, the video should stop and it does. BUT, if I click on the hotspot when a video is NOT playing, I'm getting the message that the Scripting Engine returned the message - "control array element '1' doesn't exist."
This is how I have it set up ---
I have cut/pasted GM's code to allow playing video/audio (found here http://www.adventuremaker.com/help/vbscript_techniques.htm, #29) into my global properties. And --- if it matters -- in my global procedures, I also have Shadowhunter's sub routine for Particle+ and GM's sub for playing a looping AVI randomly (#15 on the same link) for an AVI that palys on another frame.
On the Advanced tab of the "Key on hotspot #1" window I have
- Code: Select all
PlayVideo GetPath(2) + "KeyTurn.avi", 212, 115, 600, 600, True
On hotspot #1 in the advanced tab, I have
- Code: Select all
StopVideo
Using the DeBug tool, it shows the Stop Video as the problem and taking that out does get rid of the error message, but it also lets the video keep playing on successive frame. Help, please?