Jump to content
Search Community

DynamicPinPoint attach problem

Gary Griswold test
Moderator Tag

Recommended Posts

I have DynamicPinPoint and liquid.update working well together so that I can position objects at the bottom right corner of other display objects that change in size.

 

But I am sometimes having a strange problem with DynamicPinPoint's attach method.  When the page first comes up some objects tied to a DynamicPinPoint will be in the wrong place.  As soon as I resize the page, they move into their correct positions.  So, the function used by DynamicPinPoint is returning the correct values.

 

The problem seems to be related to the attach call, because if I comment out the attach call, then the objects do come up in the correct initial location.

 

Any ideas?  The follow is one of the DynamicPinPoints that I have on the page.

 

addChild(ministryBtns);

var botCorner:Point = ministryGridCorner();// call DynamicPinPoint function

ministryBtns.x = botCorner.x - ministryBtns.buttonsWidth;

ministryBtns.y = botCorner.y + 5;

_ministryGridCornerPin = new DynamicPinPoint(this, ministryGridCorner);

_ministryGridCornerPin.attach(ministryBtns);

 

The following is my liquid stage constructor:

 

_liquid = new LiquidStage(stage, stage.stageWidth, stage.stageHeight, 500, 400, stage.fullScreenWidth, stage.fullScreenHeight);

Link to comment
Share on other sites

Hm, I wonder if it has to do with WHEN you're attaching it? Maybe the resize already happened? If you're still having trouble, please create a super simple FLA that demonstrates the issue and post it here (please zip it first). Click the "more reply options" to attach. 

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