Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

bm1967's Achievements



  1. Hi I'm interested to understand why when using Draggable it prevents me from using transform:translate(x,y). http://codepen.io/_d_v_/pen/JGLqQR Click on the button, the element moves to the right. Uncomment Draggable and clicking on the button has no effect. I've provided a Codepen example and would be very grateful if anyone can show me a way where both can used together. Many thanks in advance
  2. Hi I'm learning to use the ColorProps plugin and was wondering if anyone can direct me how (from a mouse event) to colour tint a loaded bitmap that's been drawn into a Canvas object. I've prepared an example on CodePen where the scale is being tweened but the bitmap image is not http://codepen.io/anon/pen/epPoJy?editors=101 Many thanks in advance
  3. Hi Jonathan Thanks for your reply and you are right in both examples. I was wondering if there may have been an alias in the tween instance that referenced the html element directly. Based on my understanding so far, it would seem that the ways to dynamically reference the html element (a tag that may have been created say, in a loop) in order to (for example) retrieve an attribute value (say 'data-appid') is: onComplete:function() { console.log( 'appid', this.target[0].dataset.appid ); } or: onCompleteParams: ["{self}"], onComplete:function( instance ) { console.log( 'appId:', instance.target[0].dataset.appid ); } or the jQuery example: onComplete: function() { console.log('appId:', $(this.target[0]).attr("data-appid") ); } Thanks for helping to clarify
  4. Hi I'm trying to find out the best way of referencing the tweened html element from it's onComplete function. I've achieved the following but my gut feeling is there's a better way of doing this onComplete: function() { console.log('appId for el tweened is:', $(this.target[0]).attr("data-appid") ); } As you can see the above way is using jQuery. Is there an easier way of referencing an attribute in the html element that's been tweened in the onComplete function. Many thanks for advice.
  5. Hey RolandSoos Thanks for that info. That's exactly the object that I wanted
  6. Hi I'm really enjoying using TweenMax - an awesome JS toolkit. I would like to know if it's possible to 'get' values with any GS methods/techniques. I see in the TweenMax docs there is a TweenMax.set, however, I would like to be able to 'get' the X / Y values. My requirement is not during a tween, it could be before after or at any point. So as an example of what I'm thinking: var xpos = TweenMax.get( $("#element") ).x; Many thanks for any advice on how to do this using GS or JS.
  7. ...thank you all for your help. The solution is much clearer
  8. Hi With TimelineLite.staggerFromTo is it possible in the context of 'fromVars' and 'toVars' to reference an array of values according to which index is being animated. for example say I have three navigation buttons: <div class="navButton"></div> <div class="navButton"></div> <div class="navButton"></div> ...and a JS object that contains x,y positions of where the three buttons should be animated to: var navPositions = [ { x:100, y:100 }, { x:200, y:30 }, { x:55, y:97} ] //arbitrary numbers ...then reference an array or positions as opposed to static values var tl = new TimelineLite(); tl.fromTo( $('.navButton'), 1, {x:0,y:0}, { navPositions[aTLprovidedIndex?] }, 0.2); I would love to know if this is possible and to be shown an example if so... Many thanks in advance
  9. Hi Many thanks for your reply. Your suggested solution worked perfectly
  10. Hi Thank you for your reply. I've put together a short example of what I mean in CodePen. To see what I mean, drag and throw the object. One line of output is correctly referenced, the other is undefined. http://codepen.io/anon/pen/KkfIo Basically I want my ScreenController.prototype.onThrowUpdate function to be able to access both scopes, ie, the scope of the throwprops object and also the scope defined in onThrowUpdateScope. Hopefully that's more clear.
  11. Hi Using Draggable with throwProps I keep checking on a 'thrown' objects coords using onThrowUpdate. My problem is based on needing a reference to two scopes. One scope being the object that's thrown (the throw scope) and the other is the scope that I set in onThrowUpdateScope. If I set "onThrowUpdateScope: this" so as it references my object and all my prototyped methods then I can't seem to reference the object with the 'throw' scope. I would be very grateful if someone can show me how this is done... Many thanks in advance...
  12. Hi Rodrigo Many thanks for your help. Your code not only answered my question, it provided a platform to learn other techniques using this great tool set Bye for now
  13. Hi I'm wanting to use Draggable (including ThrowProps) to be able to flick objects in only one direction(in this case only left). Is there a built in way I can constrain the flick say only to the left and not allow drag or throw in any other direction (similar to a SwipeLeft event in jQuery TouchSwipe - I just want to avoid importing too many libs). Many thanks in advance
  14. Hi I love GreenSock tools, they're a first class complement to HTML5. I've just renewed my subscription and am in the process of understanding how TweenMax works with RequireJS. Through perseverance I've got TweenMax working, but I'm a bit unsure if my workflow is correct. I've read various posts that seem to confuse my understanding, perhaps as they may be out of date. It would be great if Greensock or community could post an up-to-date tutorial on how TweenMax and it's Plugins work with RequireJS and some clear examples. What I find confusing is based on various areas (and the following questions are based from other posts on sites/forums perhaps now out of date). So with TweenMax v 1.11.6 and RequireJS v 2.1.11 (latest downloads at the time of writing): Do we still need a GreensockAMDPath? Why define window.GreenSockGlobals? (Is this best practice with RequireJS). My understanding of RequireJS is that we benefit from avoiding the global namespace. Are we still expected to use a 'shim' in the RequireJS config object to get TweenMax working? How are TweenMax plug-ins added with RequireJS. Is the latest TweenMax AMD? I have a feeling that there could be quite a few others asking similar questions. If anyone in the GreenSock community can help then I (and am sure others) look forward to reading your posts. Many thanks in advance for any help / examples...