<?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>Kimkijeung.com &#187; ByteArray</title>
	<atom:link href="http://kimkijeung.com/tag/bytearray/feed/" rel="self" type="application/rss+xml" />
	<link>http://kimkijeung.com</link>
	<description>Interactive development,flash,Actionscript,Unity</description>
	<lastBuildDate>Sun, 24 Apr 2011 18:59:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Loading Zip files into Flash</title>
		<link>http://kimkijeung.com/2007/02/13/loading-zip-files-into-flash/</link>
		<comments>http://kimkijeung.com/2007/02/13/loading-zip-files-into-flash/#comments</comments>
		<pubDate>Tue, 13 Feb 2007 07:37:50 +0000</pubDate>
		<dc:creator>vkimone</dc:creator>
				<category><![CDATA[Flash-AS3.0]]></category>
		<category><![CDATA[ByteArray]]></category>
		<category><![CDATA[FZip]]></category>

		<guid isPermaLink="false">http://vkimone.inblog.kr/?p=410</guid>
		<description><![CDATA[As3.0 에서는 ByteArray Class 의 지원으로 bynary code 를 직접 플래시에서 읽고 쓸수가 있다. 플래시 외부로 data 를 export 할때나 불러들일때 압축된 bynary string 를 사용할 수 있어 기존에 할수 없었던 많은 작업들이 가능해졌다. 그중에 하나가 flash 안으로 zip 파일 형태를 로드할 수 있다는 것이다. 또한 그 스트리밍 데이타를 이용하여 zip 파일내에있는 이미지나 파일이 로드될 [...]]]></description>
			<content:encoded><![CDATA[<p>As3.0 에서는 ByteArray Class 의 지원으로 bynary code 를 직접 플래시에서 읽고 쓸수가 있다.<br />
플래시 외부로 data 를 export 할때나 불러들일때 압축된 bynary string 를 사용할 수 있어 기존에 할수 없었던 많은 작업들이 가능해졌다.</p>
<p>그중에 하나가 flash 안으로 zip 파일 형태를 로드할 수 있다는 것이다.<br />
또한 그 스트리밍 데이타를 이용하여 zip 파일내에있는 이미지나 파일이 로드될 때 가져와서 쓸 수 있다.<br />
단, 여기서 소개된 소스는 standard zip 파일 형식만 지원한다.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> loadZip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">var</span> request:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;your.zip&quot;</span><span style="color: #66cc66;">&#41;</span>;
   <span style="color: #000000; font-weight: bold;">var</span> zip:FZip = <span style="color: #000000; font-weight: bold;">new</span> FZip<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
   zip.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FZipEvent.<span style="color: #006600;">FILE_LOADED</span>, fileCompleteHandler<span style="color: #66cc66;">&#41;</span>;
   zip.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>request<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> fileCompleteHandler<span style="color: #66cc66;">&#40;</span>evt:FZipEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">var</span> file:FZipFile = evt.<span style="color: #006600;">file</span>;
   <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;File loaded: &quot;</span> + file.<span style="color: #006600;">filename</span><span style="color: #66cc66;">&#41;</span>
   <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;  &quot;</span> + file.<span style="color: #006600;">sizeCompressed</span><span style="color: #66cc66;">&#41;</span>;
   <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;  &quot;</span> + file.<span style="color: #006600;">sizeUncompressed</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><strong>관련사이트</strong><br />
(<a href="http://codeazur.com.br/lab/fzip/" target="_blank">http://codeazur.com.br/lab/fzip/</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://kimkijeung.com/2007/02/13/loading-zip-files-into-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

