Should have asked this before ... who developed this Pub ? ... that person should be aware of the code sections for the various navigation events (like PageEnter, PageExit, Page Change etc.) ?
It may surprise you because of my low skills, but I made the app
In Design Mode, if you hit the F12 key on your keyboard, you will see a popup window ... at the bottom, you will see tabs for Startup, Shutdown etc. ... one of them is labelled Page Change ... click on it to see if there is any code in this event section ... you can read the Help file to understand when it is invoked/serviced.
Thanks for that. I've used F12, and there aren't any PageChange commands.
In the PageEnter code section for "New Page 2", it plays the mp3 file ... but it is requested to WAIT further servicing of commands until this file finishes playing.
According to the Debuuger, the left click of Button32 was serviced next ... which is the one that causes re-navigation to "New Page" (and stops playing the mp3 file).
Can you tell us where Button32 is located ... if it is located on "New Page 2" (and is the one you click to take you to "New Page 1"), ... this could be happening because the mp3 file has not finished playing when you click on this Button ... and when it does, NeoBook tries to go back to this page to try and service any more commands in the PageEnter section of "New Page 2"
Yes, Button32 is located on "New Page 2".
The pubs pages (before my 'fix') are as follows:
"New Page" (the 'home' page... fist page users see with buttons to navigate to various sections of the pub), "New Page 1", "New Page 2" and so on, up to "New Page 9".
There is a button on "New Page" to get to "New Page 1" (and vice versa), but no buttons to navegate between "New Page 1" and "New Page 2" (the idea is that users would return to 'home' before going on to the next section, which starts at "New Page 2"... however, when I press the button on "New Page 2" to return to "New Page", it instead ends up at "New Page 1".
So, post the code associated with the ...
- left click of Button32
- PageEnter section of "New Page 2"
. code (if any) in the Page Change section of the Pub
left click of Button32:
GotoPage "New Page"
StopMedia "C:\Users\Sean\Desktop\TL Class App\TL App 1\T3Info.mp3"
PageEnter code:
PlaySoundFile "C:\Users\Sean\Desktop\TL Class App\TL App 1\T3Info.mp3" "Wait"
If "[StopExam]" "<>" "True"
GotoNextPage
EndIf
Hmmm... now that I've posted this, I imagine the pub is executing the GotoNextPage command even though I click the button to leave the page (and go back to the start of the publication) before the mp3 finishes playing. If this is the case, my apologies for being so dumb! I guess I figured the action (GotoNextPage) would only be carried out if the mp3 finished playing on its own. But I suppose the programme doesn't know the difference between stopping on its own and being interrupted
I guess I should explain the idea behind the pub. I wanted a sort of 'dual-purpose' app that could be used in class or could be used at home. The buttons were for in class, to allow students to stop/go back to ask me questions. And the auto'start of the audio was to simulate test conditions (where students have no control over exam events) so students could practise at home.
Anyway, THANK YOU for taking the time to help! I really appreciate it.