Flashcard Animation in Storyline

I've created a number of Rise courses but after learning that's it's not fully accessible I'm switching back to Storyline, which is too bad. I like both programs but Rise is definitely faster to build and looks slick enough to impress. I really like the flashcard feature in Rise and I'm trying to figure out how to create an interaction in Storyline that looks like a flashcard being flipped over like it does in Rise. 

I've looked at these articles: https://community.articulate.com/articles/4-flashcard-interactions-your-learners-will-love and https://community.articulate.com/discussions/articulate-storyline/how-to-create-objects-that-turn-over-like-in-rise-in-storyline-360 but while they're really great interactions I'm keeping for other scenarios, none of these mimic that flipping the card over motion. Some of the articles linked are 5-8 years old so the shared examples don't open in my Storyline (360). Does someone have any recent examples that haven't been shared yet? 

Thanks! :) 

14 Replies
Nancy Woinoski

Math Noterman has an example of a flip card made in Storyline on his profile page. He does not say how he created it but you can check out his profile here and if you like what you see I’m sure he would be happy to share how he did it.

https://community.articulate.com/users/MathNotermans-96c9568e-8010-446f-af9c-a9ff4765e65a

Math Notermans

Offcourse its made with GSAP. ;-) And as Storyline now includes the latest version of GSAP its easier then ever to create animations and interactions like that with Storyline. As im in the process of creating a sample/tutorial for another community member on how to work with GSAP in Storyline i will enhance that one with the flipping sample. 

Math Notermans

The old version on my profile page still used jQuery and externally loaded GSAP. As that is not needed anymore i removed that from the Storyline file and reworked it so it only uses Vanilla Javascript.

Basically it works like this...

On start of the timeline all is set to its initial state. With queryselector getting all the needed elements, then hiding whats needed...lastly hiding the blocker. Showing that in this screenshot... blocker moved on purpose so you see the texts...

step1

Then all cards and backcards have Javascript triggers.

Basically all the cards do the same more or less. With gsap.set some values are set directly so you donot see any change on screen. Then with gsap.to the animation is triggered... basically a simple perspective rotation 'rotationY' with some eases. To ensure all is properly visible i exchange the z-order of the different elements. For that i added a changeMan element ( the small block on top ) for each card. Its invisible, but used to control the z-order of the elements. So when the card is turned indeed the backside is showing on top in Storyline.
Do copy the code to a code-editor like Sublime Text with color coding, else you go bananas trying to get this right straight in Storyline. As seen below.

code

I add the working Storyline as a NewYears present ;-) ..if you need help...shout...
Happy coding in 2021

Math Notermans

Yeah...Modern and Classic player behave quite different especial on x transformations. I did write up quite some upon it and do have fixes for it. This one was older, so its not in yet i guess.
Using % instead of pixels might help... vw and vw do work too in GSAP... Basically the y rotation might be different indeed depending on values...

If needed i can update this...

Organization & Staff  Development

Math, this is amazing, I had no idea it was possible to add javascript like that. We've been emailing, but I just wanted to "publicly" thank you as well. :) I'm super grateful! 

I am in way over my head, I had hoped that perhaps I can identify which element in the code does what, but javascript is quite a bit more complicated to unravel the very minimal html I can read….

I only need the flipping cards, no text or anything showing up below it, so I removed those elements from the timeline.

I tried to make the rotation a bit faster, like Phil said he did, but I ended up making the card flip super fast and then just sort of replace itself with the backcard, so I undid all my changes. The speed is fine as is. :P 

But I did also find the same issue with the resizing Phil mentioned. When i test the output at full siz it's great, but if I make the window smaller, the animations disappear off screen. Would you mind telling me which elements in the java script for the cards I need to change to use % instead of pixels as you mentioned above? 

Math Notermans

As promised here is the solution for the Modern Player and resizing the browserwindow.

https://360.articulate.com/review/content/1dc3a53b-b41d-4544-b78f-f803667ed4af/review

Only the card with the red cadre around it has it implemented. When time permits i will rework the complete flipping card example to work as needed...but resizing the page/window and then flipping the card with the red cadre and you see it stays nice at its position...in contrary to the rest.

I will give a proper description how it works and what code you need from it to get it working on other projects. But for now here is the working sample too.

Math Notermans

Finetuned it a bit, so basically there is now a variable called flipDuration. You can change that to influence the duration/speed of the flip. Also got rid of the 'events' needed in the previous one..checking the resizing of the window. Now all in the scripts on the cards.

flipduration variable