Jump to content
Search Community

Remi Turcotte

Members
  • Posts

    8
  • Joined

  • Last visited

About Remi Turcotte

  • Birthday 03/05/1969

Contact Methods

Remi Turcotte's Achievements

6

Reputation

  1. RockinFloppinAwesome. It works. I need to get meself a Greensock mug and some greensocks for xmas! Thanks a million! :)
  2. Hi everybody! Sorry I dont have a codepen to show, I know how to make a codepen, but this question relates to Iframe, I wouldnt know where to start!! ok I have the following line that works just fine, rotating an injected svg's element that has the .rotate class: animationA.to(".rotate",5, { rotation:44, transformOrigin:"50% 50%", repeat: -1, yoyo:true }, 0); I also have an iframe (id="blogPostIframe")in this page layout, that contains another svg, that also has an element with a .rotate class (it resides on the same server, just a folder away) I'm trying to make it rotate too, from my already existing main page code. So far Ive read online and tried to add postIframeElement = document.getElementById("postIframe"); contentWindow=postIframeElement.contentWindow; animationA.to(".rotate",5, { rotation:44, transformOrigin:"50% 50%", repeat: -1, yoyo:true }, 0); animationA.to("contentWindow.rotate",5, { rotation:44, transformOrigin:"50% 50%", repeat: -1, yoyo:true }, 0); but this throws "Uncaught TypeError: Cannot read property 'contentWindow' of null" in the console... anybody knows if this is feasable?
  3. 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
  4. i can use the "message" on your profile for this?
  5. 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?
  6. 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...
  7. 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...
  8. 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? }
×
×
  • Create New...