<?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>GhostWire Studios &#187; Zinc</title>
	<atom:link href="http://www.ghostwire.com/blog/archives/tag/zinc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ghostwire.com/blog</link>
	<description>Flash UI Components</description>
	<lastBuildDate>Tue, 23 Aug 2011 03:51:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Using AspireUI Components with MDM Zinc 3.0</title>
		<link>http://www.ghostwire.com/blog/archives/using-aspireui-components-with-mdm-zinc-3-0/</link>
		<comments>http://www.ghostwire.com/blog/archives/using-aspireui-components-with-mdm-zinc-3-0/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 22:51:42 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Aspire UI]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[MDM]]></category>
		<category><![CDATA[Zinc]]></category>

		<guid isPermaLink="false">http://www.ghostwire.com/blog/?p=1714</guid>
		<description><![CDATA[MDM Zinc™ 3.0 is a feature-rich Rapid Application Development Tool for turning SWFs into stunning commercial cross-platform desktop applications, screensavers, widgets, CD roms, DVD’s, kiosks and more. The AspireUI AS3 library uses PNG image files for component skinning, and this ease of skinning is a good fit for Zinc™ 3.0 projects, especially if you would [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.multidmedia.com">MDM Zinc™ 3.0</a> is a feature-rich Rapid Application Development Tool for turning SWFs into stunning commercial cross-platform desktop applications, screensavers, widgets, CD roms, DVD’s, kiosks and more. The <a href="http://www.ghostwire.com/aspireui/">AspireUI AS3 library</a> uses PNG image files for component skinning, and this ease of skinning is a good fit for Zinc™ 3.0 projects, especially if you would like to create applications that look like native desktop applications.  The toolkit currently comes with four component themes &#8211; &#8220;classic&#8221;, &#8220;xp&#8221;, &#8220;vista&#8221; and &#8220;graylic&#8221;.  The first three aforementioned themes are Windows OS lookalike themes.  </p>
<p>In this short tutorial, we will look at how you can use the AspireUI library in Zinc™ 3.0 projects, and how you can easily swap component themes by simply changing one line of code.</p>
<p><span id="more-1714"></span></p>
<p><strong>mdm.Application.path</strong><br />
When using Zinc™ 3.0, it is important to remember that relative paths to external assets do not work well.  To ensure that your Zinc™ 3.0 compiled applications work as expected, you should always prefix paths with <code>mdm.Application.path</code> so that the application knows where to look for external assets (to be loaded during run-time).</p>
<p>When using the AspireUI library in a normal Flash AS3 project, we would usually initialize the uiSkins manager as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">uiSkins.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;default&quot;</span>, <span style="color: #ff0000;">&quot;assets/skins/&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #808080; font-style: italic;">// use &quot;default&quot; theme folder from the relative path &quot;assets/skins/&quot;</span></pre></div></div>

<p>When coding for Zinc™ 3.0 projects, the following will be used:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">uiSkins.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;default&quot;</span>, mdm.<span style="color: #006600;">Application</span>.<span style="color: #006600;">path</span> + <span style="color: #ff0000;">&quot;assets/skins/&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Likewise, in order for the uiImage class to work properly in Zinc™ 3.0 applications, the following path must be set:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">uiImage.<span style="color: #006600;">path</span> = mdm.<span style="color: #006600;">Application</span>.<span style="color: #006600;">path</span> + <span style="color: #ff0000;">&quot;assets/images/&quot;</span>;</pre></div></div>

<p>That will make it possible for <code>uiImage</code> instances to load from the &#8220;assets/images/&#8221; folder.  For example, the following will create a uiImage instance with image source loaded from &#8220;assets/images/icon.png&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> imgIcon:uiImage = <span style="color: #000000; font-weight: bold;">new</span> uiImage<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;icon.png&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><strong>MyZincApp Class</strong><br />
Let&#8217;s now look at a simple <code>MyZincApp</code> class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">containers</span>.<span style="color: #006600;">uiScrollPane</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">containers</span>.<span style="color: #006600;">uiWindow</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">controls</span>.<span style="color: #006600;">uiImage</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">enums</span>.<span style="color: #006600;">WINDOW</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">managers</span>.<span style="color: #006600;">uiCursors</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ghostwire</span>.<span style="color: #006600;">ui</span>.<span style="color: #006600;">managers</span>.<span style="color: #006600;">uiSkins</span>;
	<span style="color: #0066CC;">import</span> mdm.<span style="color: #66cc66;">*</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyZincApp <span style="color: #0066CC;">extends</span> Sprite 
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> MyZincApp<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> 
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span><span style="color: #66cc66;">&#41;</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">else</span> addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, init<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> init<span style="color: #66cc66;">&#40;</span>evt:Event = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> 
		<span style="color: #66cc66;">&#123;</span>
			removeEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, init<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// in order to work with Zinc, we need to specify</span>
			<span style="color: #808080; font-style: italic;">// correct paths to external assets</span>
			uiSkins.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;default&quot;</span>, mdm.<span style="color: #006600;">Application</span>.<span style="color: #006600;">path</span> + <span style="color: #ff0000;">&quot;assets/skins/&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			uiImage.<span style="color: #006600;">path</span> = mdm.<span style="color: #006600;">Application</span>.<span style="color: #006600;">path</span> + <span style="color: #ff0000;">&quot;assets/images/&quot;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// listen to uiSkins manager to get notified when</span>
			<span style="color: #808080; font-style: italic;">// theme assets have been fully loaded</span>
			uiSkins.<span style="color: #006600;">manager</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">INIT</span>, main<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> main<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// ** initializes uiCursors class **</span>
			uiCursors.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// ** initializes uiWindow class **</span>
			uiWindow.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// ** img window **</span>
			<span style="color: #000000; font-weight: bold;">var</span> img:uiImage = <span style="color: #000000; font-weight: bold;">new</span> uiImage<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;flower.jpg&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> imgsp:uiScrollPane	= <span style="color: #000000; font-weight: bold;">new</span> uiScrollPane<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			imgsp.<span style="color: #006600;">fillX</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			imgsp.<span style="color: #006600;">fillY</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			imgsp.<span style="color: #006600;">content</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>img<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> imgWin:uiWindow	= <span style="color: #000000; font-weight: bold;">new</span> uiWindow<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			imgWin.<span style="color: #006600;">title</span>		= <span style="color: #ff0000;">&quot;flower.jpg&quot;</span>;
			imgWin.<span style="color: #006600;">content</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>imgsp<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// ** end img window **</span>
&nbsp;
			imgWin.<span style="color: #006600;">open</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>After compiling the above class, you will get a SWF that you can then run through the Zinc Builder software to create a desktop application (for Windows, Mac or Linux).  If you run the compiled Zinc application, you will see something like the following:<br />
<a href="http://www.ghostwire.com/blog/wp-content/uploads/MyZincAppXP.png"><img src="http://www.ghostwire.com/blog/wp-content/uploads/MyZincAppXP.png" alt="" title="MyZincAppXP" width="606" height="260" class="alignleft size-full wp-image-1716" /></a></p>
<p><strong>Changing Theme I</strong><br />
Now, let&#8217;s see how we can easily change the component theme.  The themes are stored in their respective folders in the &#8220;assets/skins/&#8221; folder.  By changing one line of code, we can switch to using another theme:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">uiSkins.<span style="color: #006600;">initialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;vista&quot;</span>, mdm.<span style="color: #006600;">Application</span>.<span style="color: #006600;">path</span> + <span style="color: #ff0000;">&quot;assets/skins/&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>With that, we will now use the &#8220;vista&#8221; theme instead of the default &#8220;xp&#8221; theme.  After re-compiling the SWF and running the new SWF through the Zinc Builder software, we will see something like the following:<br />
<a href="http://www.ghostwire.com/blog/wp-content/uploads/MyZincAppVista.png"><img src="http://www.ghostwire.com/blog/wp-content/uploads/MyZincAppVista.png" alt="" title="MyZincAppVista" width="606" height="260" class="alignleft size-full wp-image-1717" /></a></p>
<p><strong>Changing Theme II</strong><br />
Next, we look at how we can change the theme without even changing any code, without re-compiling the SWF, and without re-building the Zinc application. We do this by swapping the contents of the &#8220;default&#8221; folder with the contents from the &#8220;classic&#8221; folder, and then run the Zinc application without re-building.  You will see something like the following:<br />
<a href="http://www.ghostwire.com/blog/wp-content/uploads/MyZincAppClassic.png"><img src="http://www.ghostwire.com/blog/wp-content/uploads/MyZincAppClassic.png" alt="" title="MyZincAppClassic" width="606" height="260" class="alignleft size-full wp-image-1718" /></a></p>
<p>The above is possible because by default, the AspireUI library uses run-time skin assets (and is what we are using in this introductory tutorial).  This means that by changing the PNG image assets in the &#8220;assets/skins/default&#8221; folder, you will change the look of your Zinc application.  The library also supports the option to embed the skin assets within the SWF, if so desired.  There is also a tool to package all the skin assets within a folder into one compressed binary file.</p>
<p><strong>Aspire UI Components</strong><br />
Aspire UI is a library of Actionscript 3.0 (AS3) classes for building flexible and lightweight UI elements in Adobe Flash applications. Key features of the components include easy skinning using PNG image files, automatic tab focus ordering, CSS text styles, and layout management. This is a pure AS3 library with no dependency on the Flex framework. You may experiment with the various features by <a href="http://www.ghostwire.com/aspireui/download">downloading the trial version</a>.</p>
<p><strong>MDM Zinc™ 3.0</strong><br />
MDM Zinc™ 3.0, available for Windows and Mac OSX, is the only development tool in its class to offer X-Platform, X-Compile™ to Windows, Mac OSX &#038; Linux Systems. Rapid Application Development for Adobe® Flash® and Flex®.  You may download MDM Zinc™ 3.0 Builder for Windows &#038; Mac OSX at:<br />
<a href="http://www.multidmedia.com/software/zinc/download/">http://www.multidmedia.com/software/zinc/download/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/using-aspireui-components-with-mdm-zinc-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>{mdm} 25% Holiday Sale On Zinc 3.0</title>
		<link>http://www.ghostwire.com/blog/archives/mdm-25-holiday-sale-on-zinc-3-0/</link>
		<comments>http://www.ghostwire.com/blog/archives/mdm-25-holiday-sale-on-zinc-3-0/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 11:53:06 +0000</pubDate>
		<dc:creator>sunny</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Others]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[MDM]]></category>
		<category><![CDATA[Zinc]]></category>

		<guid isPermaLink="false">http://www.ghostwire.com/blog/?p=1679</guid>
		<description><![CDATA[If you are looking to compile SWFs into cross-platform desktop applications, leveraging powerful desktop-only APIs, you may want to consider MDM Zinc 3.0. Available for Windows &#038; Mac OSX, Zinc™ 3.0 is the fastest, most powerful and most feature-rich Rapid Application Development Tool for Adobe® Flash® and Flex®. With Zinc 3.0, you can rapidly create [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.ghostwire.com/blog/wp-content/uploads/shop_Banner_HolidaySale.jpg" alt="shop_Banner_HolidaySale" title="shop_Banner_HolidaySale" width="570" height="104" class="aligncenter size-full wp-image-1680" /></p>
<p>If you are looking to compile SWFs into cross-platform desktop applications, leveraging powerful desktop-only APIs, you may want to consider MDM Zinc 3.0.  Available for Windows &#038; Mac OSX, Zinc™ 3.0 is the fastest, most powerful and most feature-rich Rapid Application Development Tool for Adobe® Flash® and Flex®.  With Zinc 3.0, you can rapidly create stunning commercial Applications, Screensavers, Widgets, CD Roms, DVD&#8217;s, Kiosks and More.</p>
<p><span id="more-1679"></span><img src="http://www.ghostwire.com/blog/wp-content/uploads/boxA_Zinc_Builder_Sml.jpg" alt="boxA_Zinc_Builder_Sml" title="boxA_Zinc_Builder_Sml" width="170" height="220" class="aligncenter size-full wp-image-1681" /></p>
<p>There is no better time than now to consider picking up Zinc 3.0 &#8211; MDM is currently offering a 25% discount for the following products:</p>
<ul>
<li>Zinc 3.0 Plug-In Windows</li>
<li>Zinc 3.0 Plug-In Mac OSX</li>
<li>Zinc 3.0 Plug-In Linux</li>
<li>Zinc 3.0 Development Suite (contains Windows/Mac OSX/Linux Plug-Ins)</li>
</ul>
<p>Promotion ends 23:59 GMT 30th December 2009.</p>
<p><a href="http://www.multidmedia.com/shop/">http://www.multidmedia.com/shop/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ghostwire.com/blog/archives/mdm-25-holiday-sale-on-zinc-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

