Jump to content
GreenSock

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

Search the Community

Showing results for tags 'object'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 11 results

  1. Hello guys, I'm totally new to JS. Trying to learn and improve. I'm trying to build a minimap and move an object that represents player movements on the map. You'll see 2 things in the code. One is a straight line the other one is a map. I was only able to find animated movements. So When the user wants to move the object on the straight line with the mouse, also this movement has to be reflected for the object on the map too. I just want to be able to move that point with the mouse. How can i do it? Best Regards
  2. Hi Everyone! I'm new here at GSAP and I'm trying to create an interactive infographic. (final goal) For now, I want to move the right image when the mouse hovers over it. When the mouse doesn't hover over it, the image should go back to the starting position. It's a quite easy movement but for one reason the code doesn't work. Can anyone tell me what I'm doing wrong? Thanks in advance
  3. Hi guys, Looking for just a quick yes or no, as its been a long day, and I can't find the energy to write a full demo/test. If I create a timeline like: var tl = new TimelineLite(); tl.to('.someClass', 3, {height: 100}); Then I save that timeline in a data attribute like: $('body').data('someTimeline', tl); Are these then referencing the same timeline, as an object? Or has it just copied over the values, as a variable? As it's instantiated, I'd assume it's being used by reference, but I can't be sure. In case I'm not clear enough, if I were to run the following: tl.seek(1); Would this change be represented within: $('body').data('someTimeline').play(); And vice versa? Thanks a lot!
  4. Hi all, Fairly new to the whole javascript tweening animation business. I've included a fairly complex svg file in a website I'm working on via an <object> tag and am using GSAP to animate it. //GSAP tweening/animation STUFF $(document).ready(function(){ var svg = document.getElementById("homeAnimation"); var svgDoc = svg.contentDocument; var homeSwitch = svgDoc.getElementById("homeSwitch"), homeSmallGear = svgDoc.getElementById('homeSmallGear'), homeBigCog = svgDoc.getElementById('homeBigCog'), homePipeBall1 = svgDoc.getElementById('homePipeBall1'), homePipeBall2 = svgDoc.getElementById('homePipeBall2'), homePipeBall3 = svgDoc.getElementById('homePipeBall3'), homePipeBall4 = svgDoc.getElementById('homePipeBall4'), homeBeltGearLeft = svgDoc.getElementById('homeBeltGearLeft'), homeBeltGearRight = svgDoc.getElementById('homeBeltGearRight'), homeChart = svgDoc.getElementById('homeChart'), phoneChart = svgDoc.getElementById('phoneChart'), phonePie = svgDoc.getElementById('phonePie'); var tmax_home_switch = new TimelineMax(); //Switch has separate timeline so it can pause the animation but still move. var tmax_home_chart = new TimelineMax({repeat:-1}); //Chart has separate timeline so it can repeat. var tmax_options = { }; //options config goes here var tmax_home_tl = new TimelineMax(tmax_options); //timeline takes options input and is declared var tmax_repeat_options = { }; //options config goes here var tmax_home_t2 = new TimelineMax( tmax_repeat_options); //timeline takes options input and is declared //Clear the stage tmax_home_tl.set([homePipeBall1, homePipeBall2, homePipeBall3, homePipeBall4], {opacity:0}); tmax_home_tl.set(homeChart, {x:-20}); tmax_home_tl.set(phoneChart, {scale:0, transformOrigin: "center center"}); tmax_home_tl.set(phonePie, {scale:0, transformOrigin: "center center"}); //starts off paused tmax_home_tl.pause(); tmax_home_t2.pause(); tmax_home_chart.pause(); // mouseover cursor change. homeSwitch.addEventListener("mouseover", funcover, false); function funcover() { homeSwitch.style.cursor = "pointer"; } homeSwitch.addEventListener("click", function() { tmax_home_switch.to(homeSwitch, 0.2, { rotation: 60, repeat:0, delay:0.2, transformOrigin: "center center"}) .to(homeSwitch, 0.1, { rotation: 0, repeat:0, delay:0, transformOrigin: "center center"}); tmax_home_tl.paused(!tmax_home_tl.paused()); tmax_home_t2.paused(!tmax_home_t2.paused()); tmax_home_chart.paused(!tmax_home_chart.paused()); if(tmax_home_tl.set([homePipeBall1, homePipeBall2, homePipeBall3, homePipeBall4], {opacity:1})) { TweenMax.set([homePipeBall1, homePipeBall2, homePipeBall3, homePipeBall4], {opacity:0}); } }); tmax_home_chart.to(homeChart, 0.25, { x:50, transformOrigin: "center center"}, 8) .to(homeChart, 0.5, { y:26, transformOrigin: "center center"}) .to(homeChart, 20, { x:500, transformOrigin: "center center"}); tmax_home_tl.staggerTo([homePipeBall1, homePipeBall2, homePipeBall3, homePipeBall4], 0.5, { opacity:1 }, 3.4) .staggerTo([phoneChart, phonePie], 0.5, { scale:1, transformOrigin: "center center"}, 0.5); tmax_home_t2.to(homeSmallGear, 4, { rotation: 360, repeat:-1, ease: Power0.easeNone, transformOrigin: "center center"}, "cogs") .to(homeBigCog, 8, { rotation: 360, repeat:-1, ease: Power0.easeNone, transformOrigin: "center center"}, "cogs") .to([homeBeltGearLeft, homeBeltGearRight], 8, { rotation: 360, repeat:-1, ease: Power0.easeNone, transformOrigin: "center center"}, "cogs+=4"); }); There is the code all the elements being selected are definitely in the SVG file that is being imported. It seems to randomly work and other times not. Any suggestions? I'm getting a "Uncaught Cannot tween a null target." in Chrome but it works fine in Firefox and sometimes IE. Here is the bones of the site: http://www.mulrooneydesign.com/apps/infov4/ I'm guessing that the GSAP code is firing before the SVG DOM is instantiated any way to avoid this happening? Also any critique of my code generally is more than welcome. B
  5. [sEE CODEPEN] I'm trying to make an easy way to implement multiple views on a single webpage using HTML5 GSAP animation. So I declare an object constructor "pageElement." Inside I have a method that triggers an animation based on object properties declared earlier in the constructor given if I want the object on or off screen. The code throws an error [sEE ATTACHMENT.] Essentially what the error tells me, is that within the GSAP declaration, it does not accept methods within methods (method-ception). I hope there's some error in my code... This would be awesome. Anyway, thanks for taking a look, and have an awesome day Jacob Alford @jacob_alford
  6. Hi, I am having trouble getting my animation to fire after I create new slides. I am trying to make a train board that updates from xml data every 20 seconds or so. 1. Create new slides 2. Animate new slides in from above the "slotXX" Futre steps: 3. Change div tag removing the "a" while changing z-index and removing hidden old slide 4. Repeat If anyone can set me on the right direction many thanks will ensue. I don't mind if you just point me to a tutorial that's almost identical or if you want to fork my codepen.
  7. I have created a SoundManager object which loads my sounds and has functions for playing them. Most of the time, they are various click-sounds attached to buttons, but in some cases, there are longer sounds associated with a TimelineLite animation. I am trying to trigger them with this: var tlboxBtn = new TimelineMax({onStart: $EV_SoundManager.playSFX, onStartParams: ["glitch020"], paused : true }); // other animation items added to the TimeLine... then... element.grpanimation = tlboxBtn; element.grpanimation.play(); The first thing in the "playSFX" function of $EV_SoundManager is a log to the console displaying the name of the soundfile to play. This is working for all calls triggered from button clicks, but not when this timeline runs. No sound and no log statement. I could just create an anonymous function, call that from the TimelineMax, and have it trigger the function in the $EV_SoundManager object, but that seems like a step too many. Is there a better way to do this? Any help is appreciated. --Kevin
  8. Reporting a bug here. On IE8 my animation complete kills the experience, throwing a runtime error popup. Works fine though on Chrome and proper browsers. I'm doing the following: animateInBars : function(callOnComplete){TweenMax.staggerFrom( dom_element.find('.barchart-bar'), 0.5,{height:"0%", ease:Elastic.easeOut}, 0.01, callOnComplete);}, The animation works fine, but when the onCompleteAll kicks in, it crashes. IE8 throws this at me: Object expected TweenMax.js, line 308 character 7 That corresponds to this code on line: onCompleteAll.apply(onCompleteAllScope, onCompleteAllParams); So I tried adding an empty array for the onCompleteAllParams: animateInBars : function(callOnComplete){TweenMax.staggerFrom( dom_element.find('.barchart-bar'), 0.5,{height:"0%", ease:Elastic.easeOut}, 0.01, callOnComplete, []);}, And that fixes it
  9. I'm trying to tween a custom object property with string values, but they are changed to NaN. Why are they been treated as number? .fromTo(_bg, 0.7, { currentBg:'bg1', curentBgType:'gradient', ratio:0 }, { currentBg:'bg2', curentBgType:'gdImg', ratio:1 },0.001 )
  10. Guest

    scale object size using mouse over

    How would I implement a slight object scale change on mouse over? Thanks! Zach
  11. Hello.! GreenSock _ _ _ I have two layers. On bottom layer, I have several buttons, on top layer, I have a shape inside "test" MovieClip import com.greensock.*; import com.greensock.easing.*; TweenMax.to(test, 0, {dropShadowFilter:{color:0x000000, alpha:0.6, blurX:5, blurY:5, strength:1, angle:135, distance:4, inner:true, hideObject:true}}); This code works very nice but I can't have access at the buttons of bottom layer. How to complete hide the "test"? - stay visible the inner shadow and access bottom layer buttons? I was testing various properties with no chance Hope there is a solution Thanks Sakar
×