2015-02-21, 20:53
It might even be possible already, with me having just not realized it... having not seen any documented syntax for it. If not, hopefully it could be considered as a featured request for 15.x.
What I'm doing is trying to catch the .getX() of an object (type="image") that is being eternally moved by an animation (type="slide"). The problem I'm having is .getX() gets the location of where the object was last set to via .setPosition(x,y) or <posx> or <left>, but there doesn't seem to be a documented variable or function to retreive the location of where it's being displayed on the screen via the animation... which is what I'm needing for a project. I dont mind rather its the displayed location screen-wise resolution (sometimes larger like with or skin-wise resolution (1280x720). Even if someone knows a way to calculate the displayed position via the x,y set location, animation start & end locaitons, time & delay values, and current & initial timestamps maybe?!
I'm trying to do is basically make smoother object flow, and still be able to code for object interactions when 2 meet or is in line-of-fire... basically allowing for easier making of fun little playful games and such with less movement-studder and need for troublesome while-statements and other loops which can be harder on the system when it comes time to close the game / addon.
--- --- ---
Also, I've noticed that I can't seem to get or any kind of to work in a custom skin / WindowXML ran by .doModal(). Am i just not understanding how to do it or where to place it (maybe needing <includes></includes> around it), or does it just not work via addons use?
What I'm doing is trying to catch the .getX() of an object (type="image") that is being eternally moved by an animation (type="slide"). The problem I'm having is .getX() gets the location of where the object was last set to via .setPosition(x,y) or <posx> or <left>, but there doesn't seem to be a documented variable or function to retreive the location of where it's being displayed on the screen via the animation... which is what I'm needing for a project. I dont mind rather its the displayed location screen-wise resolution (sometimes larger like with or skin-wise resolution (1280x720). Even if someone knows a way to calculate the displayed position via the x,y set location, animation start & end locaitons, time & delay values, and current & initial timestamps maybe?!
I'm trying to do is basically make smoother object flow, and still be able to code for object interactions when 2 meet or is in line-of-fire... basically allowing for easier making of fun little playful games and such with less movement-studder and need for troublesome while-statements and other loops which can be harder on the system when it comes time to close the game / addon.
Code:
<animation start="-101,50" end="1281,50" time="12000" delay="0" effect="slide" loop="true" reversible="true" pulse="true" condition="true">conditional</animation>
Code:
print (['screen size',self.getWidth(),self.getHeight()])
Also, I've noticed that I can't seem to get
Code:
<constant name="MaxWidth">1280</constant>
Code:
<include ...>...</include>