actionscript 3 - Flash AS3: Resize SWF but keep elements the same size -



actionscript 3 - Flash AS3: Resize SWF but keep elements the same size -

i trying create fullscreen chat programme using flash as3, , far, going well, except when window resized, whole thing proportionally resized.

i resize chat text area, when resize done vertically, keeping controls same height consistently, buttons sending chat maintain size, input box increasing in width when size increased horizontally.

obviously swf resizing done javascript/jquery .onresize() , able set mimimum width , height swf, maintaining usability.

is there way this?

stage's resize event triggers every time swf changes size, don't need utilize externalinterface (it's less reliable , adds complexity). also, should set stage.scalemode "noscale" , stage.align "tl" elements won't scale (you manually) , aligned top left corner (to maintain consistency display list).

then, on each resize event can check new dimensions (stage.stagewidth , stage.stageheight) , resize/relocate elements individually (e.g. chatbox.height = stage.stageheight)

flash actionscript-3

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -