티스토리 뷰
반응형 해상도의 조건문
js
var _wide = 1024;
var _tablet = 768;
var _stageWidth = $(window).width();
if( _stageWidth >= _wide){
//wideMode
}else if(_stageWidth < _wide && _stageWidth >= _tablet ) {
//tablet
}else if(_stageWidth < _tablet){
//mobile
}
as3.0
public function resize(): void
{
var sw:int = _control.stage.stageWidth;
var sh:int = _control.stage.stageHeight;
if(1600 <= sw) {
}
if(1600 > sw && sw >= 1400) {
}
if(1400 > sw && sw >= 1280) {
}
if(1280 > sw && sw >= 1024) {
}
if(1024 > sw && sw >= 768) {
}
if(768 > sw && sw >= 320) {
}
}
'■ 개발관련 ■ > 산수와 알고리즘' 카테고리의 다른 글
| Grid형식 나타내기1 - 2중 for문 (0) | 2013.10.16 |
|---|---|
| s로 시작하는 헷갈리는 문자열, 배열메서드 (0) | 2013.10.16 |
| callback의 사용 (0) | 2013.10.16 |
| 배열검색 (0) | 2013.10.16 |
| 배열랜덤추첨 (0) | 2013.10.16 |
댓글