Jump to content
GreenSock

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

Animate CC - Animate all movie clips inside of MC

Recommended Posts

I have a movie clip that contains a lot of other MCs inside and actually too much to put them all in array.

 

In old SWF times (AS2) I would just Export this movie clip as - Export for Acton Script with a Linkage to my .AS file (see the code that is now in .AS file). And then all of the inside movie clips (items) would animate as shown below.

import com.greensock.*;
import com.greensock.easing.*;

class animate extends MovieClip {
    
public function onLoad():Void {
var item;
for (item in this) {
var mc = this[item];
TweenLite.from(mc, 1, {_alpha:0, _x:mc._x + 30, _xscale:5, delay: mc._x * 3/1000, ease:Circ.easeOut});
}
}
}

Today, in HTML5 this linkage is not possible anymore. I'm trying to put this code into timeline to achieve the same effect.

Is this even possible in for HTML5 ?

 

I know that the tweenMax code needs to be adjust for AS3 usage, but that is not the issue here.

Link to post
Share on other sites

Hi and welcome to the GreenSock forums,

 

I really think this is more of a question about how to code things with CreateJS... specifically EaselJS which is the JS library that Animate CC supports.

EaselJS containers haver a children property that gives an Array of all child elements. I suspect you could just loop through that array of children and animate as you need.

 

http://createjs.com/docs/easeljs/classes/Container.html#property_children

 

I've moved this topic to our banner forum where more AnimateCC users will see it.

For questions about CreateJS / EaselJS the Adobe forums may be better.

 

Let us know if you have any questions about the GSAP API.

 

Happy Tweening.

  • Like 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×