Forum Discussion
GSAP 3.5.1 ( latest version ) is now included in Storyline 360
Hi. Now that I made Storyline 3 stand at attention with GSAP yet another question has arisen for me. Sorry if it's annoying...
The command line:
var element2Animate = document.querySelector("[data-acc-text='star']");
for example, uses the text within an object to gain control of it (in the above case ,it's 'star'). But what can I do if I don't want to place any text within the actual object whatsoever? In the SL timeline I can change the 'name' of the object on the leftmost, white part of the timeline but the text that appears in the light blue part of the timeline can only be changed by actually typing text in the object (to the best of my understanding). Without adding any text within the object, is there a way to access the object, I guess, is my question.
I hope my question is clear and not too annoying.
Thanks,
Daniel.
Annoying questions dont exist. Any question is good. An answer or lack of that can be annoying ;-) Trying never to do that though. Actually just yesterday got a question about GSAP and Storyline ( esp. SL3 ) on the GSAP forum and planned answering that today. As i however do not have SL3, only Storyline360 ( Can you actually have both on your computer ? ) answering questions about SL3 is a bit of a guessing game for me. Thx to you Daniel, i just yesterday discovered there is quite some difference in SL3 and SL360, first of all the missing of the GSAP 3.5.1 libraries. So if you want to use that, you need to add them first.
Getting back to your question Daniel...
The name in the timeline window is not the 'acc-name'. That name is only intended for Storyline triggers. See the image below.
On the right of it, in the timeline itself you see the actual acc-name. In Storyline360 ( i am not sure if SL3 has that too ) you can right click an element , select 'Accessibility' and a window with the accessibility name pops up. As seen in the image below.
The size/pos button on the top gets you to the same window.
In that window you can change the acc-name and use it in your code. Make sure when changing it to press 'Enter' because that inputfield has the tendency to keep unchanged if you donot.
Offcourse you can use the default acc-name, but you need to be sure you have the correct one.
Regards,
Math