Jump to content
Search Community

t0m

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by t0m

  1. Ha not sure about hardcore but before TweenLite you had to, I remember Hooke's law being all the rage... Ok, so mathMedia looks awesome, I'd like to keep the styles in the CSS if poss but for a JS solution that looks really nice. My initial problem though must be elsewhere as making a minimal example it works fine. So what I thought was a clash between GSAP tweening the font-size direct on the element and the media query in CSS can't be the case. https://codepen.io/ch1mp/pen/XWwEdmR?editors=1111 There the media query under 1000px halves the font size and all works ok. I'm guessing it's not the timeline in the page where I have the problem. Anyway cheers, either matchMedia or me finding what else is happening will be the solution :)
  2. Yep, I used to work with Robert Penner's equations and roll my own tweening till TweenLite ;). It's absolutely the fact that GSAP is tweening font-size directly on the element, the tween code specifies "scale" which is becoming font-size on the heading element. I know directly setting a style property on an element beats a CSS file set one, apart from !important things. If "scale" applied to a div is abstraced to a transform then I guess nesting is the answer, I'll add a codepen tomorrow to be absolutely clear.
  3. Hi all, So, I'm separating my content, my presentation and my animation code like a good boy with HTML, CSS and Javascript all doing their respective jobs and leaving the others alone. My animation doe not deal with position or font-size (fontSize). It's all stuff like this... // animate in the first elements tl.to(title1, {alpha:1, letterSpacing:'.5rem', duration:.66, ease:'power3.out'}, '>1'); tl.to(sub1, {alpha:1, scale:1, duration:.4, ease:'power3.out', startAt:{scale:1.1}}, '>1'); // animate out the first elements tl.to(sub1, {alpha:0, duration:.3, ease:'power3.in'}, '>5'); tl.to(title1, {alpha:0, letterSpacing:'.25rem', duration:.3, ease:'power3.in'}, '<.2'); So I thought all would be cool if in some media queries I repositioned things and changed their font-size to fit available screen. However the media queries below only half work: @media screen and (max-width: 1000px) { #homepage-hero-row #homepage-hero h1.hero-title { font-size: 2.5rem; top: 50%; } #homepage-hero-row #homepage-hero h3.hero-sub { font-size: 1.25rem; top: 62%; } } Setting top works, the font-size however does not. It looks like GSAP is setting the font-size directly on the element in order to tween the scale. So what's the best practice way of doing things here? I like the idea of letting CSS handle the layout depending on how much screen real estate there is and the JS tweening things ignorant of what the CSS is doing. Should I wrap the heading elements in a div, and tween the div and set it's position with CSS and scale it with GSAP? Or should I have a scale factor in my JS that I change based on the available pixels? Although maybe that won't work once the timeline is running. Just getting back into this stuff after years away. Compliments on GSAP, I remember the first version of TweenLite Cheers, Tom.
  4. i knew i was missing something simple, i was to focused looking for "parent"!
  5. no idea why you want to do this, but if you add the com directory with the greensock folder inside it to your classpath then it should work as you described
  6. instead of x:+10 you want x:"10" anything in quotes is relative to the current position of the target.
  7. Hi, loving the timeline stuff. is there a way to get a reference to aq nested timelineMax instances parent timeline? i can't see a way to grab a reference and i need to do different stuff based on whether the parent timelien is running forwards or backwards. cheers, tom.
  8. actually i'm pretty sure you are right! i think i'm not destroying other sections where the images are being used properly, at least, doing an addChild somewhere else would have the effect of removing the image from it's current displayList right? sorry for the noise, just been going crazy trying to track down this bug! very close to finishing a prototype i have to demo tomorrow...
  9. hi, i've got a problem with grabage collection it seems... i have a whole bunch of image loaders, the content of which i need to use in different places at different times. i store a reference to the loader and to the ImageLoader.content as private class members, i'm even putting an Event.REMOVED_FROM_STAGE event listener on it and they keep getting garbage collected at random and so they disappear from the displayList. surely something with an event listener and a stored reference shouldn't be getting GC'd but they are, i'm not removing them from the display list at least. anyone got any idea what might be going on here? my removed from stage listener traces... "[object ContentDisplay]is being removed!!!" thanks in advance, tom.
  10. aha! i remebered that but couldn't find it in the online docs! should have tried it anyway (or opened up the as). thanks man, tom.
  11. title says it all really, there's a getAllTweens but no getAllDelayedCalls... do i have to manage an array of any functions with open/pending delayed calls to them and then kill them by hand? tia, tom.
  12. got it not a problem with TweenMax... http://www.bit-101.com/blog/?p=1426 must be too big to draw the container, i'll have to do a bunch of tweens on the clips inside the container instead.
  13. hmmm, just changed it to a movieClip and same error. it's odd because i have another motionBlur working in the same fla, although i am setting strength and quality there like so... TweenMax.to(thinger, .4, {x:targX - 3, motionBlur:{strength:diffX/800, quality:3}, ease:Sine.easeInOut, onUpdate:setNavBar, onUpdateParams:[navStrip, navSlides]}); EDIT: just tried it with the strength and quality set and same error
  14. Hi, I have a bunch of clips in a sprite container called slideStrip, if i do this... TweenMax.to(slideStrip, .4, {x:mainTarget + 90, ease:Sine.easeInOut}); everything is good with the world, but when i want to add some motion blur like so... TweenMax.to(slideStrip, .4, {x:mainTarget + 90, motionBlur:true, ease:Sine.easeInOut}); i get some grumpy output from flash like this... "ArgumentError: Error #2015: BitmapData non valido. at flash.display::BitmapData() at com.greensock.plugins::MotionBlurPlugin/onInitTween() at com.greensock::TweenLite/init() at com.greensock::TweenMax/init() at com.greensock::TweenMax/renderTime() at com.greensock.core::SimpleTimeline/renderTime() at com.greensock::TweenLite$/updateAll()" which mean invalid bitmapdata in english does slideStrip need to be a movieClip, i set cacheAsBitmap on slideStrip to be true but still no dice. thanks in advance, tom.
×
×
  • Create New...