Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

NicolasJ

Members
  • Posts

    36
  • Joined

  • Last visited

NicolasJ's Achievements

2

Reputation

  1. Pen updated. I think that the solustion for DoIt3 is centerX = (useCenter ? (containerW - blocW * scale) / 2 -(blocW - blocW*scale)/2: -(blocW - blocW*scale)/2); centerY = (useCenter ? (containerH - blocH * scale) / 2 -(blocH - blocH*scale)/2: -(blocH - blocH*scale)/2); Due to the fact that the scale is from the center of the object
  2. Thanks, I update the pen .. but this solution does not work if you try another scale value, for example 3
  3. Hello, My question with this example : http://codepen.io/NicolasJ/pen/umFdy How to ensure that when "Center" is unchecked and click on the button "DO IT 2" the red block is positioned correctly. That is to say that the two upper corners are aligned and the result is displayed [t = 0 | b = 290 | l = 0 | r = 50] and not [55 t = | b = 235 | s = 55 | r = 5] How to ensure that when "Center" is checked and click on the "DO IT 3" button the red block is centered on the gray block? In summary, my question is how to properly calculate the sets of coordinates which I want to go in both cases (centered checked and unchecked) and keeping transformOrigin:"50% 50%". Hoping to be sufficiently clear Thanks
  4. Hello Rodrigo, Carl, Many many thanks for these examples. This was exactly what I was looking for. Now, we do not know what to choose Nicolas
  5. Hello, I would like to know if there is way to execute any logic at half animation. For example : TweenLite.to($(item), 3, {rotationY: 180}); and at 1.5 s. execute : TweenLite.set($(otherItem), {alpha: 0}); best.
  6. Thanks, for your answers.
  7. Hello Jonathan, thanks for your answer. this is actually what I'm gone. Suddenly comes another question, what should I use in GSAP? I went on ThrowPropsPlugin, is this a good idea?
  8. Hello, Is someone tried to extend "Draggable" to make it possible to use the multi-touch and so with two fingers simultaneously rotate, scale and move an object ? This is a general question but I did not really find an answer on the forum. Before leaving for prototyping I'm not sure this is possible. Is someone has any feedback on this point ?
  9. Rhoo ... sorry for this post ... Thanks Jack
  10. Hello, I just downloaded the last AS3 version. Copied it in my project and just start a compilation (this is a Flex project). I have several errors : Description Resource Path Location Type 1061: Call to a possibly undefined method initClass through a reference with static type Class. TweenCore.as /<myproject>/src/com/greensock/core line 84 Flex Problem Description Resource Path Location Type 1061: Call to a possibly undefined method remove through a reference with static type com.greensock.core:SimpleTimeline. TweenCore.as /<myproject>/src/com/greensock/core line 219 Flex Problem Description Resource Path Location Type 1067: Implicit coercion of a value of type com.greensock.core:SimpleTimeline to an unrelated type com.greensock.core:TweenCore. TweenCore.as /<myproject>/src/com/greensock/core line 241 Flex Problem In TweenCore line 83 : Multiple markers at this line: -Access of undefined property rootFrame -1119: Access of possibly undefined property rootFrame through a reference with static type Class. is it a regression ? Best, Nicolas
  11. Hello both, many thanks for your answers. jamiejefferson, I do share your point about testing Best
  12. Hello again, one guy make the test for me on a windows vista and a real internet explorer 8 (IE : 8.0.6001.19443). And it works fine .....
  13. Hello, I do not have any real internet explorer 8, just the compatibility mode of IE10 on a Windows 7. I saw on the forum that it could have some issues with the compatibility mode. Thus, I wonder if someone could confirm or not that this example below works on a real IE8 (and IE7 if possible) The problem I have is that the rotation does not work. There is strange behavior. <!DOCTYPE html><html><head> <meta charset="utf-8"><meta name="viewport" content="width=1000" /> <title>ROTATION</title> <style>body {margin: 50px;background-color: #000;font-family:Arial, Helvetica, sans-serif;}#box {position: absolute;}</style> </head> <body> <button id="rotate">rotate</button> <div id="box"><img src="http://www.snorkl.tv/images/crab.png"></div> <script src="http://codeorigin.jquery.com/jquery-1.10.2.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.10.2/TweenMax.min.js"></script> <script> $(function() { $("#rotate").on("click", function() { TweenLite.to("#box", 0.95, { directionalRotation:'+=90_short', ease:Power3.easeOut }); }); }); </script> </body> </html> Best
  14. Hi, it works well. I have not had time to test different scenarios, but I will take time next week. I will make some returns if it makes sense. Thank you !!!
  15. One point that may be important. Let's consider the modification of the snap object like this : snap: { x: function(endValue) {return Math.max(this.xMin - 20, Math.min(this.xMax - 20, endValue));}, y: function(endValue) {return Math.max(this.yMin - 20, Math.min(this.yMax - 20, endValue));} } After the creation of the draggable object, the image is not at the right place. just a click on the image and it goes to the right place. Apply a rotation, then the image is not to the right place. just a click on the image and it goes to the right place. The js code of this example : $(function() { var draggables = Draggable.create($("#drag"), { edgeResistance:0.85, throwProps:true, bounds:$("#wrapper"), type:"x,y", resistance:1000, snap: { x: function(endValue) {return Math.max(this.xMin - 20, Math.min(this.xMax - 20, endValue));}, y: function(endValue) {return Math.max(this.yMin - 20, Math.min(this.yMax - 20, endValue));} } }); $("#rotate").on("click", function() { TweenLite.to("#drag", 0.95, { directionalRotation:'+=90_short', ease:Power3.easeOut, onUpdate :function() { $.each(draggables, function(index, value) { value.applyBounds(); }); } }); }); });
×