Creation of complex behaviour-rich and meaningful content is one of the main difficulties that currently limit wide use of virtual reality technologies in everyday applications. To enable widespread use of VR applications new methods of content creation must be developed. In this paper, we propose a novel approach to designing behaviour-rich virtual reality applications, called Flex-VR.The approach enables building configurable VR applications, in which content can be easily created and modified by domain experts or even common users without knowledge about VR design and computer programming.The VR content is configured from reusable programmable content elements, called VR-Beans. Appearance and behaviour of the VR-Beans are controlled by scripts programmed in a novel high-level language, called VR-BML (Behaviour Modelling Language).The language enables specification of generic behaviours of objects that can be dynamically composed into virtual scenes.The paper introduces the Flex-VR component and content models, describes the VR-BML language and provides an example of a Flex-VR application in the cultural heritage domain.