With online bookings on NSB you can have some substantial savings, but you don´t get a ticket, only a voucher. This you can change at ticket counters and (every NSB) ticket machines to the real ticket. But Rygge train station has only 1 ticket machine and no counter (Myrdal has neither counter nor machine) witch is very slow and definately not user friendly, the shuttle bus brings you there 5 minutes before train departure, when i was there 3 People couldn´t buy there ticket in time from the machine, they could buy it then in the train (also possible in Flamsbana from Myrdal if not full allready) but this might not work with prepaid tickets.
An other problem, when booking Bergen to Rygge (but at Rygge to Flam) appeared a option to buy a "comfort upgrade" for NOK 90, but this is not for the long Bergen to Oslo part but for the short Oslo to Rygge part, and ist not a better seat, but Norwegial newspapers and magazins and some hot drinks from a vending machine or soda pops.
Unique Suggestions: In Rygge try to be first at the ticket machine, from the shuttle bus stop you go forward to a underpass and then back and you will see the lonely thing (metallic silver with red writhing).
You have to put in the code number on you voucher and the telefon number you have given them, but only the first 7 digits as writhen on your voucher (doesn´t make much sense).
And don´t buy the "comfort..." unless you like to read Norwegian newspapers.
If you choose to stay at Flam, be prepared to spend more money than you normally would if you stayed in the area, for instance, at Gudvangen. We did try to stop at Flam on our second stay this year but the receptionist on the campsite offered us a basic cabin for two for 450 NOK. Fortunately, we knew the prices on other campsites and decided to go back to Gudvangen instead, where we had stayed before for just 250 NOK per night for the same standard. So, if you are on a budget or just don't want to waste your money, perhaps you should consider this option. It's just as convenient for a journey on the Flamsbana and the cruise of the fjords, both of which you can do in one day. Check out the campsites in Gudvangen on my Gudvangen page.