Jump to content
Search Community

instant position

alflasy test
Moderator Tag

Recommended Posts

Trying to set the y position with variables. It works without tweenlite but not while using tweenlite.

below is the code

 

for (var mb=0; mb<setAllMenuBtnNumArray.length; mb++) {
var getAllMenus = setAllMenuBtnNumArray[mb];
if (mb > 0) {
var getAllMenusPos = Math.round(setAllMenuBtnNumArray[mb - 1].y + setAllMenuBtnNumArray[mb - 1].height);
//TweenLite.to(getAllMenus, .5, {y:getAllMenusPos,ease:Circ.easeOut});
// THE ABOVE LINE NOT WORKING BUT BLOW WORKS
getAllMenus.y = getAllMenusPos;
}

 

Thanks

Link to comment
Share on other sites

Weird, it looks like it should work. Nothing is jumping out as being wrong.

 

Is it possible to make a very simple example fla that only includes the code and assets necessary to replicate the error?

Just zip up the fla and attach it by using the "more reply options" button.

 

Thanks

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