Jump to content
Search Community

jrgalim

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by jrgalim

  1. Greetings! I'm currently developing a Haxe project that utilizes GSAP, but I am running into a compatibility issue with Haxe getters & setters. Unlike typical JS getters/setters, Haxe generates functions in the class with a prefix "get_" or "set_" and then changes variable assignments to function calls at compile time. For example, if I have the following setup: public var myVar(get, set):Int; function get_myVar():String{ return parent.somethingCool; } function set_myVar(value:String):String{ parent.somethingCool = value; return value; } if I call myVar = "blah", it's compiled to set_myVar("blah"). Because of this, if I try to tween myVar, it doesn't work since myVar doesn't exist. Is there some way to create a plugin or something so the tween checks the target to see if target["get_"+<propname>] exists, and use that instead? Let me know if that doesn't make sense, I'll try to clarify more. Thanks!
×
×
  • Create New...