Closed ericsala closed 11 years ago
Could you try rendering some standard Starling content (like a quad or something) and see if that also gets clipped?
The clipped content is only this.
var elastic:Shape = elastic.graphics.clear(); elastic.graphics.lineStyle(2, 0x000000); elastic.graphics.moveTo(150, screen_height-80); elastic.graphics.lineTo(screen_width-150, screen_height-80);
All the other content created throw Starling have no problems.
Thanks for the example code - I'll take a look tonight and see if I can see what's going wrong.
I wasn't able to reproduce your problem exactly. All starling content was getting clipped for me. However, I noticed that starling doesn't automatically re-scale it's Stage3D viewport when the stage size is changed. It's a little bit fiddly, but this seems to be the most reliable way of doing it.
public function Main()
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
starlingInstance = new Starling( SomeApp, stage );
stage.addEventListener(Event.RESIZE, onStageResize);
}
private function onStageResize(event:Event):void
{
starlingInstance.viewPort = new Rectangle(0,0,stage.stageWidth,stage.stageHeight);
starlingInstance.stage.stageWidth = stage.stageWidth;
starlingInstance.stage.stageHeight = stage.stageHeight;
}
Let me know if that solves it for you.
Any luck with this?
No, but I think the problem is in Starling. But only with Mobile.
If I don't set SWF metadata tag [SWF( width="480", height="800", backgroundColor="#FFFFFF", frameRate="60" )]
I cannot draw under y = 600.
If I set metadata I can't configure multiresolution for diferent devices.
Any solution?