<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.flasia.com &#187; Flash Lite</title>
	<atom:link href="http://blog.flasia.com/archives/category/flashlite/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.flasia.com</link>
	<description>[object MainTimeline]</description>
	<lastBuildDate>Thu, 02 Jun 2011 10:51:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[FlashLite 1.1] 외부파일과 통신할 때 알아둘 것.</title>
		<link>http://blog.flasia.com/archives/430</link>
		<comments>http://blog.flasia.com/archives/430#comments</comments>
		<pubDate>Fri, 23 Jan 2009 04:33:28 +0000</pubDate>
		<dc:creator>Siaa</dc:creator>
				<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://blog.flasia.com/?p=430</guid>
		<description><![CDATA[Flash Lite로 제작된 컨텐츠에서 외부파일과 통신을 하려고 할 경우, 키 또는 버튼에 의한 이벤트가 발생했을 때만 외부와의 통신이 가능하다. 이것은 사용자가 모르는 사이에 외부와의 통신을 통해 [...]]]></description>
			<content:encoded><![CDATA[<p>Flash Lite로 제작된 컨텐츠에서 외부파일과 통신을 하려고 할 경우, <em>키 또는 버튼에 의한 이벤트가 발생했을 때만</em> 외부와의 통신이 가능하다. 이것은 사용자가 모르는 사이에 외부와의 통신을 통해 통신요금을 부가하는 행위를 막기 위해서다.</p>
<p>대상이 되는 메소드는 getURL(), loadMovie(), loadVariables()등의 함수이다.<br />
이 함수들을 사용할 때는 <em>on핸들러(키 또는 버튼에 의한 이벤트) 안에서 사용</em>해야 한다.<br />
<span id="more-430"></span></p>
<pre class="brush:as3">on (press){
	getURL("http://www.domain.com/");
}</pre>
<p>그리고, <em>하나의 on핸들러(키 또는 버튼에 의한 이벤트)에서는 외부와의 통신이 한번만 가능</em>하다.<br />
아래와 같이 하나 이상의 통신처리를 실행하게 되면 먼저 실행된 통신만 처리된다.</p>
<pre class="brush:as3">on (press){
	loadMovie("a.swf");
	loadMovie("b.swf");
}</pre>
<p><em>loadMovie()에 대해서 잠깐&#8230;</em><br />
Flash Lite 1.1은 Flash 4에 해당하는 액션스크립트이기 때문에 <em>외부이미지는 로드하지 못한다. 오직, swf파일만 로드할 수가 있다.</em></p>
<p>그리고 <em>loadVariables()로 PHP나 CGI등과 연계해서 반환 값을 가져올 수 있다.</em><br />
하지만, loadVariables()를 사용할 때 주의해야 할 것이 있다. 먼저 loadVariables()을 사용할 때 HTTP메소드를 지정할 경우, au와 SoftBank의 일부 기종에서는 POST통신이 되지 않는 경우가 있기 때문에 <em>특별한 이유가 없는 한 GET통신을 하는 것이 좋다.</em></p>
<pre class="brush:as3">on (press) {
	loadVariables("db.php", _root, "GET");
}</pre>
<p>그리고, PHP에서 주의해야 할 것은 <em>헤더를 출력하지 않으면 au에서는 정상적으로 처리되지 않는다.</em></p>
<pre class="brush:php">&lt;?php
	header("Content-type:text/plain");
?&gt;</pre>
<p>그 외에, loadVariables()로 외부 텍스트를 불러올 수도 있다.<br />
단, XML형식은 지원되지 않기 때문에 아래와 같은 방법으로 사용한다.</p>
<pre class="brush:as3">변수1=값1&amp;변수2=값2&amp;변수3=값3&amp;……%eof=1</pre>
<p>위의 eof변수는 Flash Lite 1.1에서 외부 텍스트 파일을 어느 정도 불러왔는지에 대한 진행상황을 알 수 없어서, 반복처리를 통해 eof의 변수가 1이라면 로드가 완료되었다는 것을 알기 위한 변수이다.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flasia.com/archives/430/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[FlashLite 1.1] 1프레임에 꼭 넣어주는 스크립트</title>
		<link>http://blog.flasia.com/archives/415</link>
		<comments>http://blog.flasia.com/archives/415#comments</comments>
		<pubDate>Mon, 19 Jan 2009 09:58:40 +0000</pubDate>
		<dc:creator>Siaa</dc:creator>
				<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://blog.flasia.com/?p=415</guid>
		<description><![CDATA[Flash Lite 1.1으로 제작할 때, 1프레임에 항상 써 주는 스크립트가 있다. 초기화를 해 주는 스크립트라고 생각하면 될 듯.

fscommand2("FullScreen", true);
fs [...]]]></description>
			<content:encoded><![CDATA[<p>Flash Lite 1.1으로 제작할 때, 1프레임에 항상 써 주는 스크립트가 있다. 초기화를 해 주는 스크립트라고 생각하면 될 듯.</p>
<pre class="brush:as3">
fscommand2("FullScreen", true);
fscommand2("SetQuality", "high");
_focusrect = false;
</pre>
<p><span id="more-415"></span><br />
이렇게 3줄이다.</p>
<p>첫번째줄의 <em>fscommand2(&#8221;FullScreen&#8221;, true);</em>는, 컨텐츠의 표시영역을 전체화면으로 표시하게 한다.<br />
핸드폰에서는 기본적으로 전체화면으로 보여지도록 설정되어 있지만, 확실하게 해 두기 위해서 기술해준다.</p>
<p>두번째줄의 <em>fscommand2(&#8221;SetQuality&#8221;, &#8220;high&#8221;);</em>는 애니메이션의 렌더링품질을 설정한다.<br />
high, medium, low의 3단계가 있다. high로 설정하면 품질은 좋아지지만, 복잡한 애니메이션의 경우 부하가 걸리기 때문에 해당 무비의 성격에 따라 적당한 값을 선택하는 것이 좋다.</p>
<p>세번째줄의 <em>_focusrect = false;</em>는 버튼포커스의 설정이다.<br />
Flash Lite의 경우는 기본적으로 마우스가 없다. 대신 방향키(상,하)로 화면에 배치된 버튼을 선택하게 되는데, 버튼이 선택되면 해당 버튼의 테두리가 노란색으로 표시된다.<br />
하지만, 대부분의 경우 버튼을 만들게 되면 롤오버효과도 디자인해서 적용하기 때문에 노란색 테두리가 없어도 현재 선택되어진 버튼이 어떤 버튼인지 쉽게 알 수 있다. 따라서 이 기능이 필요없기 때문에 false 로 설정한다.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flasia.com/archives/415/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[FlashLite 1.1] 인라인재생과 인터랙티브재생</title>
		<link>http://blog.flasia.com/archives/222</link>
		<comments>http://blog.flasia.com/archives/222#comments</comments>
		<pubDate>Wed, 14 Jan 2009 07:16:19 +0000</pubDate>
		<dc:creator>Siaa</dc:creator>
				<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://blog.flasia.com/?p=222</guid>
		<description><![CDATA[Mobile기기에서의 FlashLite의 재생방법에는 &#8220;인라인재생&#8221;과 &#8220;인터랙티브재생&#8221;의 두가지 방법이 있다.
&#8220;인라인재생&#8221;은 PC사 [...]]]></description>
			<content:encoded><![CDATA[<p>Mobile기기에서의 FlashLite의 재생방법에는 <em>&#8220;인라인재생&#8221;</em>과 <em>&#8220;인터랙티브재생&#8221;</em>의 두가지 방법이 있다.</p>
<p><strong>&#8220;인라인재생&#8221;</strong>은 PC사이트에서와 같은 방법으로 HTML페이지에 swf파일을 표시하고 HTML페이지에 접속하는 방법이다.(예:http://mobilesite.com/flash.html)<br />
&#8220;인라인재생&#8221;을 사용하면 swf에서 키이벤트를 사용할 수 없다. 그렇기 때문에 애니메이션 위주로 제작된 swf를 보여줄 때 주로 사용한다.<span id="more-222"></span> 그리고, HTML페이지에 swf파일을 표시할 때 기본적으로 1개의 swf파일을 표시하는 것이 좋다. swf파일을 1개 이상 표시할 수 있는 기종도 있지만, 그 수가 그다지 많지 않기 때문이다.<br />
여기서 잠깐, 모바일에서는 HTML에 어떤 코드로 swf를 삽입하는지 알아보자.<br />
크게 다른 부분은 없고, 다른 부분은 src 를 data로 쓰는 정도이다.</p>
<pre class="brush:html">&lt;object width="180" height="50" type="application/x-shockwave-flash"&gt;
&lt;param name="bgcolor" value="ffffff" /&gt;
&lt;param name="loop" value="on" /&gt;
&lt;param name="quality" value="high" /&gt;
&lt;/object&gt;</pre>
<p>각 항목의 내용은 다음과 같습니다.</p>
<p>・data：swf파일의 경로와 파일명<br />
・width：가로사이즈<br />
・height：세로사이즈<br />
・bgcolor：swf파일의 배경색<br />
・loop：반복재생의 유무(on/off)<br />
・quality：화질의 설정(high/medium/low)의 3단계</p>
<p><strong>&#8220;인터랙티브재생&#8221;</strong>은 swf파일에 직접 접속하는 방법이다.<br />
(예:http://mobilesite.com/flash.swf)<br />
&#8220;인터랙티브재생&#8221;은 키이벤트를 사용할 수 있기 때문에 게임과 같은 인터렉티브한 컨텐츠 제작하여 표시할 때 주로 사용한다.<br />
키이벤트에는 다음의 종류가 있다.<br />
- 방향키(상/하)<br />
- 선택키<br />
- 다이얼키(0~9, #, *)<br />
참고로, 좌,우 방향키는 브라우저의 뒤로, 앞으로 의 기능으로 사용되고 있기 때문에 사용할 수 없다. (SoftBank의 기종에서는 모든 방향기(상,하,좌,우)를 사용할 수 있지만, 다른 기종을 고려해 볼 때 좌,우 방향키는 사용하지 않는것이 좋을 것이다.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flasia.com/archives/222/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[FlashLite 1.1] 요것만은 알아두자!!</title>
		<link>http://blog.flasia.com/archives/132</link>
		<comments>http://blog.flasia.com/archives/132#comments</comments>
		<pubDate>Mon, 12 Jan 2009 14:33:35 +0000</pubDate>
		<dc:creator>Siaa</dc:creator>
				<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://blog.flasia.com/?p=132</guid>
		<description><![CDATA[지난 한 해 회사일을 하면서 FlashLite를 많이 접하게 되었다.
처음엔 조금 우습게 봤지만&#8230; 결코 만만한 놈이 아니었다.
엄청 머리를 굴려야 했으며, 수많은 시행착오를 거쳐야 했고, [...]]]></description>
			<content:encoded><![CDATA[<p>지난 한 해 회사일을 하면서 FlashLite를 많이 접하게 되었다.<br />
처음엔 조금 우습게 봤지만&#8230; 결코 만만한 놈이 아니었다.<br />
엄청 머리를 굴려야 했으며, 수많은 시행착오를 거쳐야 했고, 핸드폰 3~4개를 붙들고 끝없는 테스트를 해야만 했다&#8230;<br />
뭐.. 그런 이유로 몇가지 메모.<span id="more-132"></span></p>
<h2>▶ 용랑은 100KB미만으로</h2>
<p>현재 대부분의 핸드폰이 swf파일의 용량을 100KB까지 지원하고 있다.<br />
그리고 모바일의 CPU는 일반PC의 CPU보다 처리 속도가 낮기 때문에 FPS를 10~12정도로 잡아주는 것이 좋다.</p>
<p>여기서 잠깐 참고 (FlashLite에서 용량을 줄이는 몇가지 팁을 소개하고 있다.)<br />
- <a href="http://taichistereo.sblo.jp/article/14671674.html">ケータイFlashコンテンツの容量を激減させ<br />
るチェックリスト</a> </p>
<h2>▶ 무비클립 접근방법</h2>
<pre class="brush:as3">
//AS2.0의 경우
_root.my_mc.sub_mc.gotoAndPlay("Start");

//FlashLite1.1의 경우
tellTarget("/my_mc/sub_mc"){
	gotoAndPlay("Start");
}</pre>
<h2>▶ 속성 접근방법</h2>
<pre class="brush:as3">
//AS2.0의 경우
_root.my_mc.sub_mc._x = 100;

//FlashLite1.1의 경우
/my_mc/sub_mc/:_x = 100;

//또는
tellTarget("/my_mc/sub_mc"){
	_x = 100;
}</pre>
<h2>▶ 변수 접근방법</h2>
<pre class="brush:as3">
//AS2.0의 경우
_root.my_mc.sub_mc.myVar = 100;

//FlashLite1.1의 경우
/my_mc/sub_mc/:myVar = 100;

//또는
tellTarget("/my_mc/sub_mc"){
	myVar  = 100;
}</pre>
<h2>▶ function() 은 call(frame) 으로</h2>
<p>FlashLite1.1 에서는 function을 사용할 수 없다. 그 대신 call()함수를 사용하면 OK<br />
먼저 함수를 적어놓을 타임라인의 프레임에 라벨을 적어준다.<br />
예를들어, callFunc 라는 라벨이 적힌 프레임에 아래와 같은 함수를 적어놓는다.</p>
<pre class="brush:as3">
trace("[call Function]");

j = 0;

for(i = 1; i <= 10; i++){
	j = j + i;
	trace(j);
}</pre>
<p>그리고 위의 함수를 호출하고 싶은 곳에서</p>
<pre class="brush:as3">
call("callFunc");</pre>
<p>결과는</p>
<pre class="brush:as3">
[call Function]
1
3
6
10
15
21
28
36
45
55</pre>
<h2>▶ 디바이스 폰트의 사이즈</h2>
<p>FlashLite1.1 에서 지원되는 디바이스 폰트의 사이즈는 12px, 16px, 20px, 24px이다.</p>
<h2>▶ eval() 함수를 많이 써먹자</h2>
<p>FlashLite1.1 에는 배열이 없다.<br />
하지만, eval()을 이용하면 배열 에뮬레이션이 가능하다.</p>
<p>좀 더 자세한 내용은 아래링크를...</p>
<p>eval() 함수 사용 - <a href="http://livedocs.adobe.com/flash/9.0_kr/main/00005695.html">http://livedocs.adobe.com/flash/9.0_kr/main/00005695.html</a><br />
배열 에뮬레이션 - <a href="http://livedocs.adobe.com/flash/9.0_kr/main/00005690.html">http://livedocs.adobe.com/flash/9.0_kr/main/00005690.html</a> </p>
<h2>▶ 이미지가 빨간색으로 보일 때</h2>
<p>이미지를 사용했을 경우 Flash나 Device Central에서는 정상으로 보이는데, 핸드폰으로 직접 확인하면 이미지가 빨간색으로 보일 때가 있다.<br />
주요 원인과 해결 방법은 다음과 같다.</p>
<p><em>- PNG파일을 사용했을 경우</em><br />
→ 라이브러리에서 해당 PNG파일의 압축을 lossless (PNG/GIF) 로 한다.</p>
<p><em>- SWF의 용량이 100KB를 넘거나 간당간당 할 경우.</em><br />
→ 용량을 줄여준다.</p>
<p><em>- 메모리를 점유율이 높을 때</em><br />
→ 비트맵 이미지 사용을 줄인다.<br />
→ trace()를 삭제한다.<br />
→ 선의 사용을 줄인다.<br />
→ 변수가 필요없게 되었을 경우 null을 대입한다.</p>
<p><em>- 그라데이션이 있는 투명PNG파일을 사용했을 경우</em><br />
→ 그라데이션을 없애준다.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flasia.com/archives/132/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[FlashLite] Omit trace actions</title>
		<link>http://blog.flasia.com/archives/129</link>
		<comments>http://blog.flasia.com/archives/129#comments</comments>
		<pubDate>Sat, 10 Jan 2009 14:23:19 +0000</pubDate>
		<dc:creator>Siaa</dc:creator>
				<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Omit]]></category>
		<category><![CDATA[trace]]></category>

		<guid isPermaLink="false">http://blog.flasia.com/?p=129</guid>
		<description><![CDATA[Omit trace actions 이란, 
Publish Settings 의 Flash 탭에 있는 옵션사항인데, 이 항목을 체크하면 Publish 할 때 trace() 구문을 지워준다.
실제로 플래 [...]]]></description>
			<content:encoded><![CDATA[<h2>Omit trace actions 이란, </h2>
<p>Publish Settings 의 Flash 탭에 있는 옵션사항인데, 이 항목을 체크하면 Publish 할 때 trace() 구문을 지워준다.<br />
실제로 플래시에서 작업하면서 이런저런 디버깅을 하기 위해 trace()를 사용하는데, 최종적으로 Publish할때는 필요없게 된다.<br />
이럴 때 요놈을 체크해주면 Publish 할 때 소스의 trace()구문들을 싹 지워준다. <span id="more-129"></span></p>
<p>뭐, 지워도 그만이고.. 안 지워도 그만이라면 상관없지만, 이 기능으로 추가적으로 얻을 수 있는 것이 바로 &#8220;용량&#8221;이다.<br />
trace()구문을 무지하게 사용한 경우(나의 경우 뭐 하나 생각대로 안 움직이면 trace()를 여기저기 찍어덴다;;),<br />
Omit trace actions 에 체크만 해 주면 꽤 짭짤한 용량을 절약할 수 있게 된다.</p>
<p>웹에서 사용하는 무비라면 크게 감동받을 정도는 아니지만,<br />
용량의 제한을 크게 받는 모바일이나 배너의 경우에는 큰 도움이 된다.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flasia.com/archives/129/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[FlashLite1.1] 중복없이 랜덤으로 데이터 가져오기</title>
		<link>http://blog.flasia.com/archives/18</link>
		<comments>http://blog.flasia.com/archives/18#comments</comments>
		<pubDate>Mon, 13 Oct 2008 01:46:18 +0000</pubDate>
		<dc:creator>Siaa</dc:creator>
				<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://blog.flasia.com/?p=18</guid>
		<description><![CDATA[다수의 데이터가 있고 그 데이터중에서 랜덤으로 몇개만 가져오고 싶을 경우~ 단, 중복되면 안 될 경우!!!
배열을 사용하면 간단히 해결되겠지만, FlashLite1.1 에서는 배열을 쓸 수 없다;; [...]]]></description>
			<content:encoded><![CDATA[<p>다수의 데이터가 있고 그 데이터중에서 랜덤으로 몇개만 가져오고 싶을 경우~ 단, 중복되면 안 될 경우!!!<br />
배열을 사용하면 간단히 해결되겠지만, FlashLite1.1 에서는 배열을 쓸 수 없다;;<br />
이럴 경우 아스키코드를 사용하면 조금은 복잡하지만 해결 할 수 있다.<br />
<span id="more-18"></span></p>
<pre class="brush:as3">random_num = 3;    //랜덤으로 가져올 데이터 수

text_1 = "TEXT-01";
text_2 = "TEXT-02";
text_3 = "TEXT-03";
text_4 = "TEXT-04";
text_5 = "TEXT-05";
text_6 = "TEXT-06";
text_7 = "TEXT-07";
text_8 = "TEXT-08";
text_9 = "TEXT-09";
text_10 = "TEXT-10";
text_11 = "TEXT-11";
text_12 = "TEXT-12";
text_13 = "TEXT-13";
text_14 = "TEXT-14";
text_15 = "TEXT-15";

order_num = "ABCDEFGHIJKLMNO";    //전체 데이터의 수(15개)

for (i = 1; i &lt;= _root.random_num; i++) {
    rn = random(length(order_num)) + 1;
    _root["n" add i] = substring(order_num, rn, 1);
    if (rn == 1) {
        order_num = substring(order_num, 2, length(order_num));
    }
    else {
        a_txt = substring(order_num, 1, rn - 1);
        b_txt = substring(order_num, rn + 1, length(order_num));
        order_num = a_txt add b_txt;
    }
    _root["n" add i] = ord(_root["n" add i]) - 64;
    textData = eval("text_" add _root["n" add i]);
    trace("textData = " add textData);
}</pre>
<p>아스키코드 표<br />
<img class="alignnone size-full wp-image-19" title="ascii" src="http://blog.flasia.com/wp-content/uploads/2009/01/ascii.gif" alt="ascii" width="429" height="611" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flasia.com/archives/18/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

