Jump to content
GreenSock

brantseibert

Child swf

Recommended Posts

Happy 4th!

 

I would like to adjust the x position of a child swf upon a navigation button event.

 

The child is sitting within the classic GAIA heirarchy index/nav/contact. Here is the relevant GAIA nav click event code in the parent AS file:

...

private function onNavClick(e:MouseEvent):void

{

switch(e.currentTarget) {

case homeBtn: Gaia.api.goto(Pages.HOME); break;

case contactBtn: TweenLite.to(childSWF, 1, { x: -500 } ); break;

case nav1: Gaia.api.goto(Pages.MARKETING); break;

...

I am trying to do what Smetna does on Bio click: http://smetana.net/

 

I see two steps required:

1. Determine the current child that is playing; (What is the syntax for doing this? All I found was this.getChildByName, but that is not what I want)

2. Tween the child: case contactBtn: TweenLite.to(childSWF, 1, { x: -500 } ); break;

 

Can you please help me with the syntax on step 1? Or is there a better way?

 

Thanks!

Link to comment
Share on other sites

Sounds like a question you should post in the Gaia forums (sorry, this forum is just for GreenSock-related questions). I'm not very familiar with Gaia (although I hear great things about it).

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.
×