Forum Discussion
HunterBlake
1 day agoCommunity Member
JavaScript Help - Object Variables
Hey All!
I learned how to do a few JavaScript animations from a YouTube video. It was a couple of years ago before Storyline put in their object reference code. The video I learned from uses the Ac...
coraldstephen
7 hours agoNew to the Community
If the object references return the actual DOM element, you should be able to swap them in directly and use them throughout the timeline instead of querying by accessibility text. That's a much cleaner approach and keeps the accessibility labels free for their intended purpose.
HunterBlake
3 hours agoCommunity Member
Hey Stephen,
That is almost English for me. 😁 Can you give me an example?
I have tried my script with:
//select the Card(s)
var cardFront = object('64XQyHVDBOj');
var cardBack = object('6ft6OP0e9xE');//Card Front Timeline
let card_front_timeline = gsap.timeline();
card_front_timeline.set(card_back,{rotateY:-90});
card_front_timeline.to(card_front,{rotateY:-90, duration:0.5});
card_front_timeline.to(card_back,{rotateY:0, duration:0.5});
That did not work.