Jump to content
Search Community

wave

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by wave

  1. Thanks - since asking the question I found a different way that seems to work, but your version looks better. Here's my one:

     

    for (i = 1; i < 5; i++) {
    			TweenMax.set(page1["hotSpot" + i], {
    				alpha: 0.2
    			});
    		}

     

    • Like 1
  2. Hi,

     

    I have a set of objects i want to tween in a similar way. I have given them names like obj1 obj 2, ob3 obj4. There might be more than that.

     

    So I want to be able to say something like:

     

    var i;
    var xDist = 100;
    
    for (i = 0; i = 4; i++) {
      
      gsap.to(obj(???), {
      duration: 1,
      x:xDist
    });
    
    xDist+=100;
              
    }

    I don't know how to deal with the code for 

     

    gsap.to(obj(???)

     

    Is there a way I could write this so it applies the tween to all 4 of my objects?

  3. Hi,

     

    I am in the middle of an Adobe Animate for canvas project, and have just started introducing GSAP tweens to it.

     

    I want to change the opacity of an object with gsap, but it's not happening. Just to test, I also tweened its x position and that worked fine. So I have:

     

    TweenMax.to(screen1.hotSpot1, 1, {
                opacity:0.2,
                x:0
            });

    ... the change to x works fine, but the opacity stays at 1.

     

    In Chrome console it reports a problem "Invalid property opacity set to 0.2 Missing plugin? gsap.registerPlugin()"

     

    I added gsap using the cdn link from gsap website - https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.4/gsap.min.js

     

    I also tried adding a few of the plugins but that made no difference.

     

     

     

  4. Is it possible in the JS version of gsap to rotate or enlarge an image about its centre rather than from a top corner? I think you can do this with the TransformAroundCenter plugin in AS but can't find it for JS.

    • Like 1
×
×
  • Create New...