Jump to content
GreenSock

coolhackin

how to target inside movieclip?

Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi Guys,

 

How's it going? I can't seem to figure out how to target inside movieclip on my banner. Basically i want to play the background once my timelime reaches the button - also how I'm i suppose to make the slideshow in code-based? please find attached.

 

http://chriswebstage.com/html5/pcf-rental-bnr-300x250-html5-v2.fla

 

Thank alot,

Chris R

Archive.zip

Link to comment
Share on other sites

Sorry, I don't understand the questions at all.

I looked at the file and a few things seemed to be animating fine.

 

What does "play the background" mean? I see a layer named bg which has a blue movieclip on it called blackMC.

I didn't see anything on the timeline that looked like a slideshow.

We really have to keep our support focused on the GSAP API. Perhaps you can re-phrase the question or provide a file that only has the necessary code and assets necessary to illustrate the problem. RIght now I'm a bit lost.

 

thanks

Link to comment
Share on other sites

Sorry for the confusion, if you look closely at my code there's a bldgMC which needs playing when it reach, but i don't know how to target it to play. Inside of this bldg.MC is a timeline slideshow I put a stop() on the first frame, so basically I want to play this after the cta done executing - hope that makes sense, also is there away you can the provide how to do this in codebased? thanks a mil

 

tl = new TimelineMax();
tl.from(root.blackMC, .7, {alpha:0, ease:Power2.easeOut}, "-=.9");
tl.from(root.barMC, .7, {alpha:0, y:300, ease:Power1.easeOut});
tl.from(root.logoMC, .7, {alpha:0, ease:Power2.easeOut}, "-=.3");

tl.from(root.rentMC, .7, {alpha:0, ease:Power2.easeOut}, "-=.3");
tl.from(root.fromMC, .7, {alpha:0, ease:Power2.easeOut}, "-=.3");
tl.from(root.cta_mc, .7, {alpha:0, ease:Expo.easeOut}, "-=.3");


tl.from(root.bldgMC, .7, {alpha:0, ease:Power2.easeOut}, "-=.1");
tl.to(root.cta_mc, .75, {scaleX:.40, scaleY:.40, repeat:-1, yoyo:true, repeatDelay:0.25, ease:Expo.easeInOut});

 

----------------------------------

animate cc html5 canvas - source file

http://chriswebstage.com/html5/pcf-rental-bnr-300x250-html5-v2.fla

----------------------------------

Link to comment
Share on other sites

Thanks for the instructions. Makes more sense now.

 

To tell a movieclip to play from a GSAP timeline you can call a function. Add this to your timeline where you want the slideshow to play

 

tl.call(playBuilding);

 

add this function somewhere

 

function playBuilding() {
    root.bldgMC.play();
}

 

 

Sorry, but I just don't have the time at the moment to explain how to build the slideshow with GSAP in animateCC.

Since its just a a few images fading in on top of each other, you could probably put all the images in an Array and use TimelineLite.staggerFrom()

 

call-function.fla.zip

  • Thanks 1
Link to comment
Share on other sites

this is so cool! and helps me alot, thanks again

Link to comment
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.
×