Forum Discussion
JJCarter
9 months agoCommunity Member
2 Error Messages in Console
Hello all!
I have a project that is running into 2 errors at the moment. One is that if I have an object that had a trigger then gets deleted, it still shows up under an option in Triggers. Th...
Jürgen_Schoene_
9 months agoCommunity Member
you have two problems
- variable X and Y are missing in the storyline file
- and more important: don't use "TweenLite.set(Ada, { x: newX });", "TweenLite.set(Ada, { y: newY })"
use: "TweenLite.set(Ada, { left: newX });", "TweenLite.set(Ada, { top: newY })"
storyline is using x, y for the positioning and scaling, not left/top -> so it can be used without disturbing storyline
what do you want to do with the javascript on the continue button?
- MathNotermans-99 months agoCommunity Member
Storyline360 has GSAP built in. So you should use gsap.set() instead of Tweenlite.set()
@Jurgen Actually GSAP is thus intelligent it uses transforms and will recalculate values.
The error JC made is probably using Tweenlite and thus using outdated code.
https://gsap.com/resources/get-startedBy default GSAP will use px and degrees for transforms but you can use other units like, vw, radians or even do your own JS calculations or relative values!
x: 200, // use default of px
x: "+=200" // relative values
x: '40vw', // or pass in a string with a different unit for GSAP to parse
x: () => window.innerWidth / 2, // you can even use functional values to do a calculation!