Symbol object (or id) passed along event argument


(Alexandre Geissmann) #1

A really handy feature would be to be able to target a symbol instance via the event object.
Right now we have :

Event Object {
   timelineName: "Main Timeline",
   type: "HypeTimelineAction"
}

If only we could have the id of the symbol Instance if the event was actually trigger from within a symbol. It would be great to avoid duplicating code and creating reusable behaviour for ui symbols for example.
Ex :

  Event Object {
       symbolInstanceId : "hype-obj-54654654654654",
       timelineName: "Main Timeline",
       type: "HypeTimelineAction"
    }

Thanks.


(stephen) #2

That sounds like a a great idea, thanks for the suggestion! I will look into this and see if there is a good way for me to add it.


(Alexandre Geissmann) #3

Thanks for taking it into consideration.
I look forward next updates !


(www.360FUN.net) #4

Hi, I was just looking for something like that…
there is no way to get, right now, the caller Symbol from a Symbol Action? :frowning:


(Mark Hunte) #5

@Cescomare

Have a look at my post here


(www.360FUN.net) #6

Yep, I used that trick in the end since I didn’t find any other (clean) working solution…

In the beta this will work! :smile:
console.log( hypeDocument.getSymbolInstanceById(element.id) );