|
Post by bell4631 on Dec 10, 2016 20:17:11 GMT
Hi there, I am trying to figure out how to use Greensock in my Hippani Animator Movie.
I have downloaded the source files for the javascript files and try to use them in my project, but I keep getting errors when I try to implement them in my movie.
If I use a Greensock command when for example I try to edit a button's OnOver state it throws an error.
Does anyone have an idea how to use an external library like Greensock?
|
|
|
Post by runes on Dec 15, 2016 15:58:23 GMT
It will not work in the preview. Hippani doesn't like the way the code is written I'm afraid. But as soon as you export it works fine. Here's an example file: greensockExample.hani (88.13 KB)
|
|
|
Post by bell4631 on Dec 15, 2016 18:46:35 GMT
Hmmmm, I think I understand the gist of it now. Can you tell me how you identified the logo's element ID? I cannot seem to figure out how you found "C0L0S1" in the document.
|
|
|
Post by runes on Dec 16, 2016 7:08:37 GMT
I found the element id by publishing and using the Chrome developer tools. It doesn't get generated until you export and it can change if you add objects or layers (which is annoying). There's a logic to it as far as I can tell. C = Scene L = Layer S = Object order
So an object in scene 1 with two layers and an object in the lowest of these and 2 objects below it in the same layer would be "C0L1S2"...
@hippani: For the suggestion list could you add custom element id's?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 27, 2016 17:20:07 GMT
I found the element id by publishing and using the Chrome developer tools... runes bell4631Hi runes and bell ,I remember that I suggested @hippani maybe some month ago , to add the "GetElement()" function , and I specially wrote a technical post show how a developer to find things they want : hippani.proboards.com/thread/846/useful-functions-developersAnd then , @hippani team added a new "GetElement()" function. And now this is much easier to do that: 1. uncheck your logo's "Use Timeline" checkbox , IMPORTANT 2. change var logo = document.getElementById("C0L0S1"); to var logo = GetElement("logo");//document.getElementById("C0L0S1"); and.. It will works. If not , please upgrade hippani to the latest version greensockExample_GetElement.hani (88.41 KB)
|
|
|
Post by runes on Dec 28, 2016 19:15:37 GMT
Thanks FlashKnight! I do remember some talk about GetElement but never understood the usage for it. Well here it is
|
|