Share Posted August 7, 2010 Hi everyone, I'm trying to use liquid stage with a custom pin point however it's not working this is what I'm doing var ipadPinPoint:PinPoint = new PinPoint(-850, 250, mainNav.navButtons); ls.attach(ipad, ipadPinPoint); Does anyone have any ideas? Quick overview of my code on stage added - inti ls = new LiquidStage(this.stage,1000,665,1000,665); ls.addEventListener(Event.RESIZE, onLiquidStageUpdate); onLiquidStageUpdate(null); removeEventListener(Event.ADDED_TO_STAGE, init); main liquid stage function private function onLiquidStageUpdate(event:Event):void { //trace("Stage Height = " + stage.stageHeight,"Stage Width = " + stage.stageWidth); var _sw:Number = stage.stageWidth; var _sh:Number = stage.stageHeight; ls.attach(login, ls.CENTER); ls.attach(mainNav, ls.TOP_LEFT); var ipadPinPoint:PinPoint = new PinPoint(-850, 250, mainNav.navButtons); ls.attach(ipad, ipadPinPoint); Link to comment Share on other sites More sharing options...
Share Posted August 8, 2010 Almog and I connected off-thread and worked this out. The problem had to do with the fact that he was attaching the same objects over and over again every time the stage resized which wasn't necessary (LiquidStage handles all that automatically). In fact, it caused an endless loop because when an object first gets attached, LiquidStage must run an update cycle which temporarily resizes the stage (when reconcile is true), causing the resize handler to get called, which was attaching things again, etc. Link to comment Share on other sites More sharing options...
Author Share Posted August 8, 2010 Thanks for the great support. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now