Jump to content
GreenSock

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

Xristi

Members
  • Content Count

    37
  • Joined

  • Last visited

Community Reputation

8 Newbie

About Xristi

  • Rank
    storyproblemdoctor

Profile Information

  • Gender
    Female
  • Location
    Phoenix, AZ
  • Interests
    Intelligent Tutoring Systems, Interactive Instruction, Educational Psychology
  1. Hello Zach, I was able to arrive at a solution. Between your comments and OSUBlake's and Diaco's codepens for multiple drag objects and multiple targets I was able to piece together some code that worked. Thank you all for your time in helping all of us grateful GSAP users.
  2. Yes. I get the x/y coordinates but the the tween doesn't complete. When I put your "this.x..." in the onComplete function x/y comes back undefined. Why would the tween not complete? Some other part of my code must be wrong...
  3. What is the code to access the x/y properties of the object being dragged. I've seen the x/y property used but it's always referred to as element.x. How do you use dot syntax with a div object that has an ID?
  4. Will this give me the object's relative position within its stated bounds? Might you give me an example of its use in a Draggable function? Thank you!
  5. No, and thank you for your almost instantaneous response! I will do it now...
  6. Hi, I need to get the current position of a dragged object on the completion of its tweening to another location. Here is my code: Draggable.create("#firstNamedQuanDragImage1", {type:"x,y", bounds:"#nQL_DragDropGrid1", edgeResistance:0.5, cursor: "pointer", onDragEnd: function(e) { if (this.hitTest(dropAreasArray[0], overlapThreshold)) { TweenMax.to(this.target, 0.5, {x:ecksPos, y:wyePos, onComplete:resetPermissionsArray_Target}); //disAbleTiles2("2nd"); studentAnswer = "EXPRESSION"; removeCheckAnsButton1(false); function resetPermissionsArray_Target() { var firstTileLocus_X = $("#firstNamedQuanDragImage1").offset(); var firstTileLeft = firstTileLocus_X.left; alert("location of first tile is: " + firstTileLeft); } With this code I get the object location just fine but the tween ends and the object does not continue to its desired x/y position If I remove the the onComplete and its function the tweening completes just fine but, obviously, no position info on the object. Thank you for your invaluable assistance - I'm getting there!
  7. Thank you, Julius! I'll put it in my functions file - won't have to ask next time...
  8. Yes!! Thank you. Well done...
  9. Is it possible to use TweenMax.delayedCall() to run 3 functions simultaneously? If not, can it be done with TimeLineMax?
  10. Hi again, Thank you so much for having this great forum! My first try at an interactive, drag and drop, section of most of my webpages was a disaster w/o GSAP. Then I remembered from my AS3 days (still do it) that these greensock forums had gotten me through a number of difficult coding and design issues. I also remembered that greensock and HTML5 were almost synonymous. I was able to figure out my question, but just having this site available gives me so much more confidence in my ability to learn HTML5 and its greensock applications. So, thank you, Jack, GSAP, and these forums!! I'm sure I'll be back. The new code will be posted to codepen shortly for anyone who is looking for a way to have multiple drag objects with a single drop area where the objects are prevented from being dropped on top of one another.
  11. Hi Jack and anyone else who read my first several posts w/o the codepen. Here is the comment and the url for the codepen is included. I have three draggable objects that I want to have the user place in a single drop cell (darker green). I can only move the first one to the drop cell then it "freezes", although I know it is still draggable as it moves slightly within that cell. The other two drag objects are draggable but only to a certain point within the target then they snap to the cell below them. If I can just get the drag/drop behavior to work - that would be great. I am a long time greensock user but entirely within AS3. I'm a total html5/css/js newbie. https://codepen.io/storyproblemdoctor/pen/qePjZv
  12. OK. It's a small section of a page that I have been working on as a separate object. I have been trying to make it work on my own since I posted and now it doesn't run at all. I'll post again when I've fixed it. Thank you so much for the attention you've given my problem. You're amazing!!
  13. I'm just creating the pages; I have no website yet... shall I re-post and try to do a better job of including the codepen?
  14. Thank you for you prompt reply. Yes, I have a codepen but I didn't understand how to send it with the question and then accidentally sent the post. Perhaps that should have been my first question!
×