Jump to content

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

Remi Turcotte

  • Content Count

  • Joined

  • Last visited

Community Reputation

3 Newbie

About Remi Turcotte

  • Rank
  • Birthday 03/05/1969

Contact Methods

Profile Information

  • Gender
  1. SOLVED. Thanks to OSUBlake, he figured that indeed his suggested code works. It's a chair problem, i'm causing it. somewhere in my code there is a delay, and that is preventing the code to work properly. infinite thanks to everybody, gotta go BACKUP that working example and clean up my act
  2. i can use the "message" on your profile for this?
  3. oh. you dont want to see that OSUblake, i'm an artist, not a coder (lol) but seriously would posting you the url in private work?
  4. Hi (thanks for helpin!) yeah, i noticed, actually thats not me thats the proposed solution... noticed that, and tried "as suggested" AND the other way around, which made sense to me too (after) both dont work, sadly...
  5. Thanks for the quick response ! See the thing is, in the codepen, I can see your example working, and the explanation makes sense to me, but when i try this here... it doesn't work??? It's just like one of the many many many different ways I tried before. I'm SO baffled. this is so basic... What is it i'm not understanding? function loopedTweenMax(){ TweenMax.to(".daclass",0.2, {rotation:15, transformOrigin:"left 50%", repeat:1,yoyo:true,onComplete:loopedTweenMax}); } loopedTweenMax(); works, it rotates, but your example: var myAnimation = loopedTweenMax(); function loopedTweenMax(){ return TweenMax.to(".daclass",0.2, { rotation:15, transformOrigin:"left 50%", repeat: -1, yoyo:true }); } myAnimation.play(); doesnt. It doesnt rotate. the way my project is organized is as follow: index.html loads animations.js (where the function is working, or not when i edit it to yours) that function in animation.js is rotating (or fails to rotate) an svg file injected in the index file. (I know (i think at least) that my injection works and my files are loaded in the proper order because I can see my initial function work and rotate the .daclass element) i'm SO lost... UPDATE: might be getting near here. tried adding console.log("burpA"); and console.log("burpB"); in both functions ways, they both print to the console! so both function...works, but in the suggested myAnimation way the class isn't reached anymore? Still fighting...
  6. Hi all! I have played with javascript for a long time now, and like 10 years ago had a lot of fun with Tweenlite... But i'm an artist ... brain has a very hard time thinking like a programmer hehehe I reproduced my issue with a codepen, if anyone is generous enough to help me pass that little wall of mine, I was always very bad with scope, and I'm pretty sure that's my issue: ive read around and sweared at this for a few hours: https://codepen.io/RemiTurcotte/pen/orKzvr Working on a new site here, I dont know why, but I can only tweenmax my svg when I'm in a function (???) all the other ways i see online and try like var=something fail. ALL the examples i see for pause() and restart() are like myAnimation.pause(); I dont care if my tweenmax is in a function, i can live with that, but how do i pause & restart it then? anyone? (10000000 thanks in advance) (its my first time in codepen too, and im not sure the link works so im copy pasting my js code under here in case...) function loopedTweenMax(){ TweenMax.to(".daclass",0.2, {rotation:15, transformOrigin:"left 50%", repeat:1,yoyo:true,onComplete:loopedTweenMax}); } loopedTweenMax(); function pauseLTM(){ console.log("paused"); // how can i reach my tweenmax to pause it? } function restartLTM(){ console.log("restarted"); // how can i reach my tweenmax to pause it? }