Forum Discussion
MathNotermans-9
7 months agoCommunity Member
Using Rive in Storyline - States
On LinkedIN i allready posted how to get this done. Starting a series how to use Rive directly in Storyline here too. All the interactive elements in Rive can be triggered by Javascript. To get...
MathNotermans-9
6 months agoCommunity Member
Hi Victorien,
Thanks to ZevanRosser from Articulate i have a piece of code that will fix this.
You find it here.
https://zapp.codes/?share#rivesize
You basically need to add this part to your index.html of your Rive.
onresize = () => {
const size = Math.min(innerWidth, innerHeight) - 20
canvas.width = canvas.height = size
console.log('reszie')
r.resizeToCanvas();
}
onresize()
And then it will fit and resize nicely.
VictorienRami-5
5 months agoCommunity Member
It seems it is working quite well. It will do for the moment. Tank you for you help!
Is it normal that Storyline does not play the Rive web object's sound events? My sounds are working just fine when I test my html file, but not in Storyline. Do you know if the Rive sound events have to be fired from JavaScript to work inside Storyline?