Metapod
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Metapod
-
-
Hi all
I have set up a code pen at :
See the Pen rKyDj by anon (@anon) on CodePen
What I want to do is when an item is clicked, both items go to the same position.
TweenMax.to("#d1", 1, {x:350,y:50})TweenMax.to("#d2", 1, {x:350,y:50})This moves it relative to the starting position.I'm sure its simple, but I seem to be missing something. The only way I can think to do it is to use the starting as an offset to the final position, which seems a bit of over kill.Any help much appreciated.ThanksMetapod -
Hi
I am new to Greensock, so please be gentle.
I have built a new Adobe Edge Animate site. It works and display fine for me when I run it form my pc through the file url.
However, when I then copy it onto our webserver, the display changes.
Functionally it still works as expected. I have attached 2 screenshots showing the difference. As it is in Edge Animate, I don't quite know how to do the codepen.
I am figuring it has something to do with this section of code
TweenLite.set($container, {height: gridRows * gridHeight + 10, width: gridColumns * gridWidth + 1});
TweenLite.set(".box", {width:gridWidth * .9, height:gridHeight * .9, lineHeight:gridHeight * .8 + "px"});
TweenLite.set(".boxBack", {width:gridWidth * .9, height:gridHeight * .9, lineHeight:gridHeight * .8 + "px"});
TweenLite.set(".boxText", {width:gridWidth * .8, height:gridHeight * .9, lineHeight:gridHeight * .8 + "px"});
$(".boxText").css("font-size","18px");
$(".boxText").css("left","5px");
$(".boxText").css("top","1px");
$(".AnswerText").css("font-size","18px");
TweenLite.set(".Answer", {width:gridWidth * 1.5, height:gridHeight * 1, lineHeight:gridHeight + "px"});
TweenLite.set(".AnswerText", {width:gridWidth * 1.3, height:gridHeight * 1, lineHeight:gridHeight + "px"});
I am also loading from the cdn via yepnope
yepnope(
{
nope:[
// loads the external script for dragging and dropping
'http://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.8/plugins/CSSPlugin.min.js,http://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.8/utils/Draggable.min.js,http://cdnjs.cloudflare.com/ajax/libs/gsap/1.12.1/TweenMax.min.js'
],
complete: init
});
Any Ideas ??*****************
So that's odd. It seems like if I refresh the page, the issue goes away, but ctrl+F5 the page and it comes back. The issue occurs with both Chrome and IE as indicated.
Confusing
Set Position Of Element
in GSAP
Posted
That's great
Thanks Jack.
I have forked the original here to include a reset button, and set the x and y position seperatky to the the offset object.. This allows the reset to go back to the original position if needed.
See the Pen aIyCn by anon (@anon) on CodePen
Hope it helps someone else.
Thanks