Jump to content
GreenSock

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

triggering a x cord movement using liquid stage

Recommended Posts

This is something that I have been working on for some time, and I just can't seem to wrap my head around about how to get it working.

I have a moveclip that is pinned to the Top_Right of my screen. This works just fine, the problem is how ever when I roll over that movieclip and attempt to change it's x(by 165 pixels) postion and then when you roll out, to change it back to where it came from. It uses the x cord of the flash stage size, so when you roll over it it it zooms towards the center of the screen.

 

Here is the code I am working with:

//set the LS and attach it

var ls:LiquidStage = new LiquidStage(this.stage,1024,1300,1000,800);

ls.attach(contactSection, ls.TOP_RIGHT);

 

//this is from my class file for the movieclip that I am trying to move:

 

this.addEventListener(MouseEvent.MOUSE_OVER,moveBgOut,false,0,true);

 

public function moveBgOut(event:MouseEvent):void

{

//fade out envelope

TweenLite.to(envelope,.5,{alpha:0,x:250});

//moves all the content

TweenLite.to(this,1,{x:"-165",ease:Expo.easeOut});

TweenLite.to(this.cc,1,{alpha:1});

this.removeEventListener(MouseEvent.MOUSE_OVER,moveBgOut);

ccBG.addEventListener(MouseEvent.MOUSE_OVER,moveBgIn,false,0,true);

addContent();

TweenLite.to(copyRight,.5,{x:85});

}

public function moveBgIn(event:MouseEvent):void

{

//moves content back

TweenLite.to(this,1,{x:"165",ease:Expo.easeOut,onComplete:removeContent});

TweenLite.to(this.cc,.5,{alpha:0});

TweenLite.to(empty_3,.5,{alpha:0});

ccBG.removeEventListener(MouseEvent.MOUSE_OVER,moveBgIn);

TweenLite.to(copyRight,.5,{x:0});

}

 

I need to some how use the x cords of the actual screen of the browser and not just the stage of the flash....is the correct in the way of thinking?

Thanks so much!

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