Jump to content
Search Community

LiquidStage - How to pin objects across several frames

derschreck test
Moderator Tag

Recommended Posts

I want to make a website the old school way so that every page has its own frame. Navigation is just - gotoAndPlay(2); . When i pin an mc in every frame, it doesnt stay at its pinned position when jump to another frame. With every frame change the mc make a little step downwards. The only solution I found was to change the mc's instance name in every frame but I assume there is another way around.

 

// --- Frame 1---
stop();

import com.greensock.*;
import com.greensock.layout.*;

var ls:LiquidStage = new LiquidStage(this.stage, 1600, 1200, 800, 600);
ls.attach(mc, ls.TOP_CENTER);

btn_next.addEventListener(MouseEvent.CLICK, goNext);

function goNext(evt:MouseEvent){
					  	gotoAndPlay(2);

//--- Frame 2 ---
stop();

ls.attach(mc, ls.TOP_CENTER);

btn_prev.addEventListener(MouseEvent.CLICK, 
					  function(evt:MouseEvent){
					  	gotoAndPlay(1);
					  });

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.
×
×
  • Create New...