Jump to content

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


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Newbie

About ChronixPsyc

  • Rank

Profile Information

  • Gender
    Not Telling
  1. Hi, Thanks for your replies I've uploaded the code to JS Fiddle for you guys: http://jsfiddle.net/6Bk76/ I tried using the functions that you posted above but obviously I'm a complete r*tard at JS ( ) so cannot actually figure out how to do it properly. In my code, I have set "minTime = 0.4" and "maxTime = 1" and have been able to reverse this on the speed variable (inside trigonometryCalc function). What I need to be able to do is set the powerMask so that when the height reaches 0%, that will then equal minTime and when the height reach 100%, that will then equal
  2. I've got a timeline running which adds a mask over a div to act as a power slider for a game I'm building rather than having a range slider. I was wondering if anyone would know how to set min and max values and be able to then set the min and max as a range to have as power? pretty much what I need is below: powerMask height @ 0% = 0.4 powerMask height @ 100% = 1 At the moment, when the mask reaches 0%, it treats that as 1 second, rather than 0.4 seconds so I need to be able to flip the value round somehow. I've posted my whole javascript code below. Please let me know if
  3. I've been at this for 6 hours now... God damn! You are my idol now sir! (As you can probably guess, I'm a JavaScript noob..) Thank you so much!
  4. Just an update, I've removed the timeline and replaced it with just a simple jquery animate. I do have a feeling that I will have to replace this at some point with the TimelineMax as I will probably add in an option to curl the ball. The jQuery is below: $(football).animate({ left:ballFinishingPositionX, top:ballFinishingPositionY }, 500, "linear");
  5. First is powerBar() which moves the mask up and down and then waits for a click on the background ID. The arrowRotation(result) function is then called to rotate the arrow around a specified origin. Once another click on the background ID has been recognised, the trigonometryCalc(powerResult, arrowDeg, delay) which calculates the trigonometry. Finally, once the trigonometry has been calculated, ballMove() is called and this is where the problem occurs because if you leave the arrow moving for a few second, the ball just ends up on the goal line, without any animation. I've included
  6. Hi, I've changed the external source the URL above and updated the codepen below: http://codepen.io/anon/pen/nmocu Thanks!
  7. Hi all, I'm trying to built a penalty shootout game in JavaScript & basic HTML elements. I've run into a problem with a timeline running before the function gets called. Would someone please take a look at my code and let me know where I am going wrong please? I'm also not sure if I am calculating the trigonometry correctly as well.. So any help with that would also help http://codepen.io/anon/pen/HwIAj Thanks a lot!
  8. That's amazing! Thank you so much!
  9. Hi guys, I've scowered the forums and cannot actually find an answer to this (most likely extremely simple) issue I have. I am trying to make this mask reverse and repeat itself on complete. I've tried everything and cannot for the life of me get it to work. Would anyone be kind enough to explain to me how to use reverse and restart or resume if thats what I need to use? My code is below: var tl = new TimelineLite(); tl.fromTo(powerMask, 1, {height:250}, {height:0}) $('#background').one("click", function() { tl.stop(); arrowRotation(); }) Many thanks!
  10. Amazing! Thank you so much! I worked out that my Math.random() wasn't quite correct either as I had a max and min set but not a proper equation and also the randomNumber() function was now redundant. The updated code is below if anyone else has a similar issue. http://codepen.io/anon/pen/yKmfF Thanks a lot Carl!
  11. Hi all, Does anyone know of anyway I can either refresh or delete and recreate a timeline at all? I've created a duck shooter game and it works quite well, but when you click on the duck, the speed goes extremely slow and the duck doesn't make it all the way to the right before refreshing. I've created a codepen link below: http://codepen.io/anon/pen/dIAyx It may be something to do with the Math.floor bit as I don't really understand it too well. Thanks in advance!
  12. Hi Carl, Sorry I haven't updated this post over the weekend. It's been too nice to work on a computer I've created the code at the link below. I don't know if it has something to do with the fact that I am using tagline style twice (once in the first slide and again in the second)? http://codepen.io/anon/pen/hdonG Thanks!
  13. Thanks a lot for this information! It's already started to come together When you say I can add things onto the timeline, it seems to animate it in reverse for the second slide. I've pasted my code below, but not sure why this isn't working. Any ideas? Thanks! HTML: <div id="main-container"> <!-- FIRST SLIDE - START --> <div id="firstSlide"> <div id="logo"></div> <div id="timelinelite"></div> <div id="tagline"> <span>Welcome</span> <sp
  14. Hi all, First of all can I just say how amazing this engine is to use! I've only been using it half a day and I have to say it is really amazing. My boss introduced me to it as he uses greensock for actionscript, and seeing as I am no flash programmer, he asked me to talk a look at the javascript version and its amazing My question is probably more a javascript question rather than a question about the actual engine files.. I have 2 divs (but want to add more), the first one called firstSlide and the second one secondSlide and what I want to do is once the animations are compl