# How can I detect my screen size...?

**URL:** <https://forum.kirupa.com/t/how-can-i-detect-my-screen-size/253913>\
**Category:** flash\
**Created:** [March 6, 2008, 1:04pm UTC](https://forum.kirupa.com/t/how-can-i-detect-my-screen-size/253913 "2008-03-06T13:04:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chethan](https://avatars.discourse-cdn.com/v4/letter/c/6bbea6/32.png) [@chethan](https://forum.kirupa.com/u/chethan)\
**Post date:** [March 6, 2008, 1:04pm UTC](https://forum.kirupa.com/t/how-can-i-detect-my-screen-size/253913/1 "2008-03-06T13:04:24Z")

</div>

Hi All,

Actaully I am running a cards game. While running the game in between if I change the style portrait to landscape… then how can I detect the screen size and run the game according the screen style (Portrait or Landscape).

Actaully I have written the code to detect the screen as portrait and landscape. But in between if I change the game portrait into landscape, no more it works.

Please let me know anyone solution for this.

Thanks for your efforts -

chethan.
