<?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>SWiSHzone.com Official Blog</title>
	<atom:link href="http://blog.swishzone.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.swishzone.com</link>
	<description>News, Resources and more!</description>
	<lastBuildDate>Wed, 18 Nov 2009 03:15:09 +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>Block-Buster text scroller</title>
		<link>http://blog.swishzone.com/?p=2062</link>
		<comments>http://blog.swishzone.com/?p=2062#comments</comments>
		<pubDate>Wed, 18 Nov 2009 03:15:09 +0000</pubDate>
		<dc:creator>jonh</dc:creator>
				<category><![CDATA[Max3]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[miniMax3]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[scroller]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=2062</guid>
		<description><![CDATA[Many users have asked how to do a 3-D scroll into the distance text effect as seen in some very popular science fiction movies. Although scrolling text is reasonably easy to achieve, it is far more difficult to give it the 3-D look as seen in the movies. We have done all the work for [...]]]></description>
			<content:encoded><![CDATA[<p>Many users have asked how to do a 3-D scroll into the distance text effect as seen in some very popular science fiction movies. Although scrolling text is reasonably easy to achieve, it is far more difficult to give it the 3-D look as seen in the movies. We have done all the work for you and produced a component that you can simply drag onto the stage.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="200" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blog.swishzone.com/wp-content/uploads/2009/11/bb_example.swf" /><embed type="application/x-shockwave-flash" width="300" height="200" src="http://blog.swishzone.com/wp-content/uploads/2009/11/bb_example.swf"></embed></object></p>
<p>This component will work with Max3 and MiniMax3 with build dates of 20090904 or later, and although the component is not included with the 20090904 build&#8217;s installer, it can be download <a href="http://blog.swishzone.com/wp-content/uploads/2009/11/BlockBusterScroll.zip">here</a>.</p>
<p><span id="more-2062"></span></p>
<p>After downloading it, extract both files within the zip file to:</p>
<p><strong>C:\Program Files\SWiSH Max3\Components\Text display</strong></p>
<p>Note that the exact location may be different depending on where you installed Max3, or MiniMax3.</p>
<p>The component will also be included with future versions of Max3 and MiniMax3 within the <strong>Text display</strong> component group. The component requires Flash 8 or later because of its use of filters.</p>
<p>As the component is authored almost entirely with scripting and it contains no images or complex shapes, it is quick to load and could be used as a preloader displaying introductory text while the main part of your movie continues to download. Personally, I would rather read something (almost anything) than watch a progress bar while waiting for a site to load.  Note that that this component does not wait for the full movie to be loaded before proceeding. If used in this way, it is recommended that it progresses to a standard preloader scene on completion.</p>
<p>The parameters available for this component are shown below.</p>
<table style="border-collapse: collapse;" border="1" cellspacing="0" cellpadding="1">
<tbody>
<tr style="height: 12.75pt;" height="17">
<td style="width: 131pt; height: 12.75pt;" width="174" height="17"><strong>Text</strong></td>
<td style="width: 208pt;" width="277">The text that is displayed. Note that the user is responsible for inserting line breaks at appropriate places.</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Properties</strong></td>
<td>Opens a Properties panel for the text that is displayed. Allows the font, font size and color to be altered.</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Height</strong></td>
<td>Height of the component area. Generally leave this value and resize the component using the Transform panel.</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Width</strong></td>
<td>Width of the text blocks. Alter this value to fit more text in the display, alternatively select a smaller font.</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Behavior</strong></td>
<td>Group</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Speed</strong></td>
<td>Speed of the scrolling</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Initial Pause</strong></td>
<td>Set this checkbox to initially pause the display. Use .gotoAndPlay(&#8221;ShowText&#8221;) to start the display.</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Repeat</strong></td>
<td>Set this checkbox to repeat display</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Final Scale (%)</strong></td>
<td>Force text from display when it reaches this size. A larger number will reduce CPU load, but this may cause earlier text items to disappear abruptly from the display.</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Event Notification</strong></td>
<td>Group</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Event Function</strong></td>
<td>User defined function (if defined) is called when the message display is complete</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Goto Scene</strong></td>
<td>Allows specification the next scene to play when the effect is complete. For this to work, the scene containing the component should be set to &#8220;Stop playing at end&#8221;.</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17"><strong>Goto Frame or Label</strong></td>
<td>Enter the frame number or label to goto within the nominated scene.</td>
</tr>
</tbody>
</table>
<p>The text that was entered in the example is shown below:</p>
<pre>"BLOCK BUSTER SCROLL"

Join the red carpet for
the Max3 premiere of
this new component.

Give your movies that
big screen feel with this
new Max3 component.

Simply drag it onto your
stage and alter the text
to your requirements. 

Colors as well as fonts
can be customised via
the parameters panel.

The effect can be
configured to repeat,
start automatically or
wait until started by
an event that occurs
within your movie.

Progress to a scene
or specific frame on
completion of the effect
can also be configured.</pre>
<p>Note that each line of text is placed into a fixed size text block. If the text block is not big enough to hold the entire line, the text will be truncated. It is possible to alter the width of the text block via the Width parameter. Alternatively, select a smaller font size. Note that the width of the text block will affect how much the characters slope in towards the center.</p>
<p>If the <strong>Initial Pause</strong> parameter is set causing the component not to automatically display the text, the display can be started using the script command:</p>
<p><strong><em>BlockBusterScroll</em>.gotoAndPlay(&#8221;ShowText&#8221;);</strong></p>
<p>Where <em><strong>BlockBusterScroll</strong></em> is the name of the component movie clip.</p>
<p>If an events function is defined by the <strong>Event Function</strong> parameter, then that function will be called with the parameters <em><strong>name, true</strong></em> when the scroll process is complete. <em><strong>Name </strong></em>is the movie clip name and <em><strong>true </strong></em>is a boolean value and will always be true. The 2nd parameter allows the same events function to be shared with other components that may assume a 2nd parameter.</p>
<p>Alternatively, a Scene can be defined by the <strong>Goto Scene</strong> parameter. If a scene is defined, then the movie will progress to the nominated scene / frame (or label) on completion of the scroll process.</p>
<p>Note that if a label is used, then the defined scene is ignored as labels are assumed to be unique within a movie (ie. progressing to a specified label can jump across scenes.)</p>
<p>I think that covers the major aspects of this new component. I hope you enjoy using it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=2062</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a new section to the HiFi Template</title>
		<link>http://blog.swishzone.com/?p=1999</link>
		<comments>http://blog.swishzone.com/?p=1999#comments</comments>
		<pubDate>Fri, 30 Oct 2009 00:03:13 +0000</pubDate>
		<dc:creator>jonh</dc:creator>
				<category><![CDATA[Max3]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Wizard]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=1999</guid>
		<description><![CDATA[The HiFi project template is one of the more popular free sample templates that is distributed with SWiSH Max3. Although feedback has been positive, we have received a number of requests to increase the number of sections. The discussion below shows how to edit the supplied template to add an additional section. You could repeat this [...]]]></description>
			<content:encoded><![CDATA[<p>The HiFi project template is one of the more popular free sample templates that is distributed with SWiSH Max3. Although feedback has been positive, we have received a number of requests to increase the number of sections. The discussion below shows how to edit the supplied template to add an additional section. You could repeat this process a number of times to add even more sections.</p>
<h2><span id="more-1999"></span><br />
Load the Project</h2>
<p>From the main menu go: <strong>File | New Project&#8230;</strong><br />
and select <strong>Sites | HiFi</strong><br />
For the destination project name enter something like &#8220;<strong>HiFiMoreSections</strong>&#8221; and press OK</p>
<p>This will copy the template files to a working area in the nominated folder under the destination project name and open the project files, main.swi, section1.swi &#8230; section5.swi</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/hifiproject.jpg"><img class="alignnone size-medium wp-image-2002" title="hifiproject" src="http://blog.swishzone.com/wp-content/uploads/2009/10/hifiproject-300x227.jpg" alt="hifiproject" width="300" height="227" /></a></p>
<h2>Edit main.swi</h2>
<p>In the Wizard panel, select main then press the manual edit button. <a href="http://blog.swishzone.com/wp-content/uploads/2009/10/manualedit.jpg"><img class="alignright size-full wp-image-2003" title="manualedit" src="http://blog.swishzone.com/wp-content/uploads/2009/10/manualedit.jpg" alt="manualedit" width="153" height="76" /></a></p>
<p>Max3 should now have a layout similar to the one shown below. (Note that the exact placement of panels may be different depending on your preferences. Panels that are not visible can be enabled using the <strong>Window</strong> menu item. )</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/manualedithifi.jpg"><img class="alignnone size-medium wp-image-2004" title="manualedithifi" src="http://blog.swishzone.com/wp-content/uploads/2009/10/manualedithifi-300x227.jpg" alt="manualedithifi" width="300" height="227" /></a></p>
<h2>Add a New Menu Item</h2>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/newmenu.jpg"><img class="alignleft size-full wp-image-2009" title="newmenu" src="http://blog.swishzone.com/wp-content/uploads/2009/10/newmenu.jpg" alt="newmenu" width="136" height="227" /></a>Expand MAIN.MENU then select MENU_5.</p>
<p><strong>Copy / Paste In Place</strong>, then rename the new object MENU_6 and move it to the bottom of the MENU items.</p>
<p>Alter the _y position from 89.45 to 109.45</p>
<p>The menu should now look like the image below:</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/newmenu2.jpg"><img class="alignnone size-full wp-image-2047" title="newmenu2" src="http://blog.swishzone.com/wp-content/uploads/2009/10/newmenu2.jpg" alt="newmenu2" width="169" height="126" /></a></p>
<h2>Add a new Content Movie Clip</h2>
<p>Expand <strong>MAIN.CONTENT.CONTENT<br />
</strong>Copy <strong>MAIN.CONTENT.CONTENT.CONTENT_5</strong> and paste in place back into <strong>MAIN.CONTENT.CONTENT</strong> then rename the copied item <strong>MAIN.CONTENT.CONTENT.CONTENT_6</strong> and move to the bottom of <strong>MAIN.CONTENT.CONTENT</strong>.</p>
<p>The tree should now look like the image below:</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/content.jpg"><img class="alignnone size-full wp-image-2029" title="content" src="http://blog.swishzone.com/wp-content/uploads/2009/10/content.jpg" alt="content" width="168" height="156" /></a></p>
<h2>Alter Script for MENU_6</h2>
<p>In the Outline panel, select <strong>MAIN.MENU.MENU_6</strong> then select the Script panel.</p>
<p>Change</p>
<pre>onSelfEvent (load) {
 var id: Number = 5;
}</pre>
<p>to</p>
<pre>onSelfEvent (load)  {
 var id: Number = 6;
}</pre>
<h2>Alter Script for siteSpecs</h2>
<p>In the Outline panel, select <strong>MAIN.siteSpecs</strong> and in the Script panel alter</p>
<pre>onSelfEvent (load) {
    _parent.n_sections = 5;
    _parent.current_id = 1;</pre>
<p>to</p>
<pre>onSelfEvent (load) {
    _parent.n_sections = _parent.parameters.SectionsCount;
    _parent.current_id = 1;</pre>
<p>In the working folder (the same folder that contains main.swi) copy section2.swi to section6.swi. This creates an initial template file for use by the wizard.</p>
<h2>Template / Wizard Changes</h2>
<p>To make the new section easily accessable the following wizard changes are needed. To enable wizard authoring, from the main menu go:<br />
<strong>Preferences / Editing</strong> and check the<br />
<strong>Enable Authoring Options for Components and Wizards</strong> check box.</p>
<p>Right click on the tab for <strong>main</strong> and then select <strong>Movie | Author Wizard</strong></p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/authorwizard.jpg"><img class="alignnone size-full wp-image-2033" title="authorwizard" src="http://blog.swishzone.com/wp-content/uploads/2009/10/authorwizard.jpg" alt="authorwizard" width="401" height="58" /></a></p>
<p>this will open the Author Wizard panel.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/authorwizard2.jpg"><img class="alignnone size-medium wp-image-2034" title="authorwizard2" src="http://blog.swishzone.com/wp-content/uploads/2009/10/authorwizard2-300x129.jpg" alt="authorwizard2" width="300" height="129" /></a></p>
<p>Personally I find it convenient to dock this panel with the Layout and Script panels.</p>
<h3>Parameter Changes</h3>
<p>It is necessary to modify and add parameters to support the new section.</p>
<p>In the Parameters section of the Author Wizard:</p>
<ul>
<li>Alter parameter <strong>SectionsCount </strong>so that <strong>ControlParameters </strong>is 1;2;3;4;5;6 instead of 1;2;3;4;5</li>
<li>Add a parameter after <strong>Section5Type </strong>called <strong>Section6Type </strong>then duplicate the other settings used for Section5Type changing 5 to 6 where appropriate.</li>
<li>Add a parameter, <strong>Menu6Text</strong>,<strong> </strong>so that it appears under <strong>Menu5Text</strong>. Again, duplicate the settings for Menu5Text changing 5 to 6 where appropriate. Pay specific attention to the <strong>Assoc Parameter</strong> field which must be <strong>MAIN.MENU.MENU_6.TEXT_FIELD.TEXT_FIELD.text</strong></li>
<li>Modify the parameter <strong>MenuProperties </strong>by appending <strong>;MAIN.MENU.MENU_6.TEXT_FIELD.TEXT_FIELD</strong> to the existing contents of the <strong>Assoc Parameter</strong> field.</li>
</ul>
<p>Press the Apply button to save the changes.</p>
<p>Alter the Value of the parameter <strong>Item 6</strong> in the Menu group to &#8220;Stuff&#8221; using the Wizard panel. Changing this value should cause the menu caption of the new section to change in the layout panel.</p>
<h3>Apply before script</h3>
<p>This script is executed when a parameter is altered. Alter the script at about line 16 as follows:</p>
<pre>if ("SectionsCount" == parameterChanged) {
    // enable or disable menu items depending on number of sections
    var i;
    var blEnabled;
    for (i=1;i&lt; =5;i++) {</pre>
<p>to</p>
<pre>if ("SectionsCount" == parameterChanged) {
    // enable or disable menu items depending on number of sections
    var i;
    var blEnabled;
    for (i=1;i&lt; =6;i++) {</pre>
<p>Press the apply button and resave main.</p>
<p>Well that&#8217;s about all that is required. Initially set <strong>Count </strong>to 6 in the Sections group then choose a different section type for section 6, then choose a different one again to be sure that the template gets copied over.  Now press preview or publish. You should now see a new section under the heading &#8220;Stuff&#8221; (Note: you can easily alter the heading name using the Menu group of the Wizard panel).</p>
<h2>Resave as a Template with a New Name</h2>
<p>If you want to save this template so that it can be used as the basis of future templates, do the following:</p>
<h3>Modify the .swp file</h3>
<p>Locate the file HiFi.swp. This should reside in the folder &#8220;HiFiMoreSections&#8221;.</p>
<p>Rename the file &#8220;HiFi More Sections.swp&#8221; then edit it using a text editor such as notepad and alter it so that it shows the information below:</p>
<pre>open=working\main.swi
project=HiFi6
preview=HiFi More Sections.jpg
descriptiontext=An example web site for your business or portfolio with 6 sections.
thumbborder=0</pre>
<p>Save the file.</p>
<p>Now rename the .jpg file from &#8220;HiFi.jpg&#8221; to &#8220;HiFi More Sections.jpg&#8221;. The jpg name must match the .swp file name.</p>
<h3>Copy the New Template back to the Templates folder.</h3>
<p>The site templates are normally located under:<br />
<strong>c:\Program Files\SWiSH Max3\ProjectTemplates\Sites</strong><br />
This area may be different if you have installed Max3 to a different drive or folder.</p>
<p>Simply copy the entire folder, &#8220;<strong>HiFiMoreSections</strong>&#8221; into the Sites area. The full path to the modified .swp file should now be:</p>
<pre>c:\Program Files\SWiSH Max3\ProjectTemplates\Sites\HiFiMoreSections\HiFiMoreSections.swp</pre>
<p>When you now open a new project, you should see the following:<br />
<a href="http://blog.swishzone.com/wp-content/uploads/2009/10/newproject.jpg"><img class="alignnone size-full wp-image-2038" title="newproject" src="http://blog.swishzone.com/wp-content/uploads/2009/10/newproject.jpg" alt="newproject" width="519" height="393" /></a></p>
<p>The modified main.swi file is <a href="http://blog.swishzone.com/wp-content/uploads/2009/10/main.zip">here</a>.</p>
<p><strong>Note:</strong> Other sample templates supplied with Max3 have been authored using different script. Consquently the modifications described here may not work with any site template other than HiFi.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=1999</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 Gadgets</title>
		<link>http://blog.swishzone.com/?p=1971</link>
		<comments>http://blog.swishzone.com/?p=1971#comments</comments>
		<pubDate>Tue, 27 Oct 2009 04:01:49 +0000</pubDate>
		<dc:creator>jonh</dc:creator>
				<category><![CDATA[Max2]]></category>
		<category><![CDATA[Max3]]></category>
		<category><![CDATA[miniMax2]]></category>
		<category><![CDATA[miniMax3]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[windows7]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=1971</guid>
		<description><![CDATA[The windows sidebar has been removed from Windows 7. However, Gadgets are still supported. Our earlier blog article &#8216;Make a Vista sidebar gadget&#8217; explained how to make a gadget for Vista, this followup article explains how to convert these previously described gadgets for use on Windows 7.

The path quoted in the previous article does not [...]]]></description>
			<content:encoded><![CDATA[<p>The windows sidebar has been removed from Windows 7. However, Gadgets are still supported. Our earlier blog article &#8216;<a href="http://blog.swishzone.com/?p=1095" target="_blank">Make a Vista sidebar gadget&#8217; </a>explained how to make a gadget for Vista, this followup article explains how to convert these previously described gadgets for use on Windows 7.</p>
<p><span id="more-1971"></span></p>
<p>The path quoted in the previous article does not exist in Windows 7. Simply create your gadget as described in any folder then package the gadget as described below.</p>
<p>The two sample gadgets <a href="http://blog.swishzone.com/wp-content/uploads/2009/03/clock.zip">clock</a> and <a href="http://blog.swishzone.com/wp-content/uploads/2009/03/calc.zip">calc</a> need to be repackaged as a gadget installation package for use on Windows 7.</p>
<p>In the case of calc.zip it contains the following files in a sub folder named Calc.gadget</p>
<pre>Calc.gadget\CalcGadget.html
Calc.gadget\CalcGadget.swf
Calc.gadget\CalcGadget.swi
Calc.gadget\gadget.png
Calc.gadget\gadget.xml</pre>
<p>Simply zip the files&#8230;</p>
<pre>CalcGadget.html
CalcGadget.swf
gadget.png
gadget.xml</pre>
<p>&#8230;into a new zip file (note that they are no longer in a sub folder) then rename the zip file &#8220;<strong>Calc.gadget&#8221;</strong>. The important thing is that the filename ends with &#8220;<strong>.gadget</strong>&#8221;</p>
<p>The icon should change to a gadget icon if you are using Vista or Windows7.</p>
<p>Now double click on the gadget icon. The installation prompt shown below will appear.<br />
<a href="http://blog.swishzone.com/wp-content/uploads/2009/10/Win7Install.jpg"><img class="alignnone size-medium wp-image-1975" title="Win7Install" src="http://blog.swishzone.com/wp-content/uploads/2009/10/Win7Install-300x205.jpg" alt="Win7Install" width="300" height="205" /></a></p>
<p>Pressing install will install the gadget onto the desktop and also into the desktop gadgets gallery. If you do not already have the flash player installed, you may be prompted to install that too.</p>
<p>When installation is complete, the gadget will appear on the desktop and also within the Gadget Gallery.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/Win7ViewGadget1.jpg"><img class="alignnone size-medium wp-image-1977" title="Win7ViewGadget" src="http://blog.swishzone.com/wp-content/uploads/2009/10/Win7ViewGadget1-300x256.jpg" alt="Win7ViewGadget" width="300" height="256" /></a></p>
<p>The gadget gallery is easily located by typing &#8220;gadget&#8221; into the Windows7 search area.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/findgadgetgallery.jpg"><img class="alignnone size-medium wp-image-1979" title="findgadgetgallery" src="http://blog.swishzone.com/wp-content/uploads/2009/10/findgadgetgallery-245x300.jpg" alt="findgadgetgallery" width="245" height="300" /></a></p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=1971</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Max3 Wizard</title>
		<link>http://blog.swishzone.com/?p=1936</link>
		<comments>http://blog.swishzone.com/?p=1936#comments</comments>
		<pubDate>Thu, 22 Oct 2009 00:16:28 +0000</pubDate>
		<dc:creator>jonh</dc:creator>
				<category><![CDATA[Max3]]></category>
		<category><![CDATA[Wizard]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=1936</guid>
		<description><![CDATA[SWiSH Max3 users that have used the New Project&#8230; feature will realize that Max3 is supplied with number of example projects that can be easily customized using the wizard interface. The projects, galleries, sites and banners available under the New Project dialog are all examples of Max3 Wizards. This tutorial gives an example of how [...]]]></description>
			<content:encoded><![CDATA[<p>SWiSH Max3 users that have used the <strong>New Project&#8230;</strong> feature will realize that Max3 is supplied with number of example projects that can be easily customized using the wizard interface. The projects, galleries, sites and banners available under the New Project dialog are all examples of Max3 Wizards. This tutorial gives an example of how to create a simple wizard to alter the text, shape color and background color of an object. </p>
<p><span id="more-1936"></span></p>
<p>The wizard concept is an extension of the components used in SWiSH Max2. A Component applies to a movie clip, a Wizard applies to an entire movie (or in some cases, multiple movies). Using Wizards you can create templates that present a simplified interface to users who will carry out the final customization. The items that are available for customization are determined by the Wizard author.</p>
<p>To enable Wizard and Component authoring, from the main menu go:<br />
<strong>Tools | Preferences | Editing</strong><br />
and check the <strong>&#8220;Enable Authoring Options for Components and Wizards&#8221;</strong> checkbox.</p>
<p>If the Author Wizard panel is not enabled, from the main menu go:<br />
<strong>Window | Author Wizard</strong> (set the checkbox)<br />
Personally, I find it convenient to dock the Author Wizard panel with the Layout and Script panels.</p>
<p>Create a new movie using the Blank Movie option.<br />
Add some text and some shapes to your movie.<br />
Wizard creation is simplified if each item within your movie is given a name. In my example movie, I have named the text &#8220;t1&#8243; and the shapes &#8220;s1&#8243; and &#8220;s2&#8243;.<br />
<a href="http://blog.swishzone.com/wp-content/uploads/2009/10/p1.jpg"><img class="alignnone size-medium wp-image-1941" title="p1" src="http://blog.swishzone.com/wp-content/uploads/2009/10/p1-300x136.jpg" alt="p1" width="300" height="136" /></a></p>
<p>The easiest way to set the color fill of shapes is via the content library. Please refer to the blog article <a title="Using Content Library" href="http://blog.swishzone.com/?p=1854" target="_blank">Using Content Library</a>.</p>
<p>I have set the fill color of both shapes to link to the content library color resource named <strong>&#8220;shapefill&#8221;</strong>. <a href="http://blog.swishzone.com/wp-content/uploads/2009/10/p2.jpg"><img class="alignleft size-full wp-image-1945" title="p2" src="http://blog.swishzone.com/wp-content/uploads/2009/10/p2.jpg" alt="p2" width="201" height="108" /></a>This item should be visible in the Content panel. As both shapes refer to the same color resource, changing the resource in the library will change the color for both shapes. This feature can be used to simplify configuration as color themes can be a applied to a number of objects simultaneously with the one color edit. In addition, it will reduce the number of wizard parameters that must be presented to the end user. Alternatively, if it is desired to give each shape a different color fill, then each shape could refer to its own individual color resource in the library.</p>
<p>Pressing the <strong>Author Selected</strong> button on the Author Wizard panel will open the panel with the currently selected movie as its target.<br />
<a href="http://blog.swishzone.com/wp-content/uploads/2009/10/p3.jpg"><img class="size-medium wp-image-1947 alignnone" title="p3" src="http://blog.swishzone.com/wp-content/uploads/2009/10/p3-300x197.jpg" alt="p3" width="300" height="197" /></a><br />
The Wizard parameters will be displayed by default. In this panel you can define the parameters that are presented to the user.<br />
Press the <strong>+ Add</strong> button<br />
Add items according to the table below:</p>
<table style="border-collapse: collapse; height: 154px;" border="0" cellspacing="0" cellpadding="0" width="398">
<colgroup span="1">
<col style="width: 125pt;" span="1" width="167"></col>
<col style="width: 293pt;" span="1" width="390"></col>
</colgroup>
<tbody>
<tr style="height: 12.75pt;" height="17">
<td style="width: 125pt; height: 12.75pt;" width="167" height="17"><strong>Parameter Field</strong></td>
<td style="width: 293pt;" width="390"><strong>Value</strong></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Name</td>
<td>Text</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Display Name</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Prompt</td>
<td>The text field text</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Type</td>
<td>String</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Control</td>
<td>edit</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Control Parameters</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Display Parameters</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Assoc Property</td>
<td>Scene_1.t1.text</td>
</tr>
</tbody>
</table>
<p>The above items have defined a parameter named <strong>Text </strong>of type <strong>String</strong>. When text is placed into the wizard edit box, it will be written to the associated property which is in this case <strong>Scene_1.t1.text</strong>. This will cause the text field to be updated with whatever the user types into the wizard edit box.</p>
<p>Press the <strong>+ Add</strong> button again and add the following items into the Parameters panel:</p>
<table style="width: 418pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0" width="557">
<colgroup span="1">
<col style="width: 125pt;" span="1" width="167"></col>
<col style="width: 293pt;" span="1" width="390"></col>
</colgroup>
<tbody>
<tr style="height: 12.75pt;" height="17">
<td style="width: 125pt; height: 12.75pt;" width="167" height="17"><strong>Parameter Field</strong></td>
<td style="width: 293pt;" width="390"><strong>Value</strong></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Name</td>
<td>TextProperties</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Display Name</td>
<td>Text Properties</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Prompt</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Type</td>
<td>Object Properties</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Control</td>
<td>Object Properties</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Control Parameters</td>
<td>-all+fontdetails</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Display Parameters</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Assoc Property</td>
<td>Scene_1.t1</td>
</tr>
</tbody>
</table>
<p>This parameter allows the user to alter some of the Text Properties of the text field. Note that the name entered is <strong>TextProperties </strong>- parameter names should not contain spaces. However the Display Name field (if defined) allows the user to dispaly a name that does contain spaces, ie. <strong>&#8220;Text Properties&#8221;</strong>.</p>
<p>The <strong>Type </strong>and <strong>Control fields</strong> are both set to <strong>Object Properties</strong>. This allows a properties panel to be presented to user so that they can modify specific properties associated with the text field. The <strong>Control Parameters</strong> field is set to <strong>&#8220;-all+fontdetails&#8221; -all</strong> means disable all user modifiable items in the properties panel,  <strong>+fontdetails</strong> means re-enable only the items that allow the font details to be modified. In this way the end user can be prevented from modifying items that they are not meant to, eg. the name of the text field. Finally the <strong>Assoc Property</strong> field is set to <strong>Scene_1.t1</strong> to associate the Properties panel with a specific object within the movie.</p>
<p>Press the <strong>+ Add</strong> button<br />
Add items according to the table below:</p>
<table style="width: 418pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0" width="557">
<colgroup span="1">
<col style="width: 125pt;" span="1" width="167"></col>
<col style="width: 293pt;" span="1" width="390"></col>
</colgroup>
<tbody>
<tr style="height: 12.75pt;" height="17">
<td style="width: 125pt; height: 12.75pt;" width="167" height="17"><strong>Parameter Field</strong></td>
<td style="width: 293pt;" width="390"><strong>Value</strong></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Name</td>
<td>ShapeColor</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Display Name</td>
<td>Shape Color</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Prompt</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Type</td>
<td>Color</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Control</td>
<td>Color+alpha</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Control Parameters</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Display Parameters</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Assoc Property</td>
<td>library.shapefill.color</td>
</tr>
</tbody>
</table>
<p>This parameter allows the color of the shapes to be modified. This is done via the <strong>Assoc Property</strong> field which associates the parameter with the library shapefill resource. This is done via the Property <strong>library.shapefill.color</strong></p>
<p>Finally, press the <strong>+ Add</strong> button<br />
Add items according to the table below:</p>
<table style="width: 418pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0" width="557">
<colgroup span="1">
<col style="width: 125pt;" span="1" width="167"></col>
<col style="width: 293pt;" span="1" width="390"></col>
</colgroup>
<tbody>
<tr style="height: 12.75pt;" height="17">
<td style="width: 125pt; height: 12.75pt;" width="167" height="17"><strong>Parameter Field</strong></td>
<td style="width: 293pt;" width="390"><strong>Value</strong></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Name</td>
<td>Background</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Display Name</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Prompt</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Type</td>
<td>Color</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Control</td>
<td>color</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Control Parameters</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Display Parameters</td>
<td> </td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">Assoc Property</td>
<td>backgroundColor</td>
</tr>
</tbody>
</table>
<p>This parameter sets the background color via the movie property <strong>&#8220;backgroundColor&#8221;</strong>. The control that was used is &#8220;color&#8221; as the backgroundColor property does not support alpha.</p>
<p>After adding the above parameters, press the <strong>Apply </strong>button in the Author wizard panel.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/p4.jpg"><img class="alignnone size-medium wp-image-1953" title="p4" src="http://blog.swishzone.com/wp-content/uploads/2009/10/p4-300x197.jpg" alt="p4" width="300" height="197" /></a></p>
<p>The Wizard panel should now show 4 parameters for the movie.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/10/p5.jpg"><img class="alignnone size-medium wp-image-1954" title="p5" src="http://blog.swishzone.com/wp-content/uploads/2009/10/p5-193x300.jpg" alt="p5" width="193" height="300" /></a></p>
<p>Using these parameters it is now possible to alter the text, shape color and background color.</p>
<p>This is just a simple example to demonstrate what is possible through the use of Wizard authoring. The example1.swi movie discussed in this article can be downloaded <a href="http://blog.swishzone.com/wp-content/uploads/2009/10/example1.zip">from here</a>.</p>
<p>More complex parameter modification is possible using the other views that are available in the Author Wizard panel.</p>
<p>The forum topic <a href="http://forums.swishzone.com/index.php?showtopic=66259" target="_blank">Authoring Wizards and Components</a> contains additional information as well as a link to the Authoring Wizards manual which lists the additional movie properties that are available to wizard authors.</p>
<p>There is also a screencast <a href="http://www.swishzone.com/tutorials/max3/authoring_simple_wizard/" target="_blank">Creating a Simple Wizard Project</a> which will help give an overview.</p>
<p>Good luck wizarding!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=1936</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Content Library</title>
		<link>http://blog.swishzone.com/?p=1854</link>
		<comments>http://blog.swishzone.com/?p=1854#comments</comments>
		<pubDate>Mon, 19 Oct 2009 01:32:18 +0000</pubDate>
		<dc:creator>jonh</dc:creator>
				<category><![CDATA[Max2]]></category>
		<category><![CDATA[Max3]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=1854</guid>
		<description><![CDATA[One of the more powerful features of SWiSH Max3 (and Max2) is the availability of the Content Library. (Sorry, the Library is not available in miniMax products.)  The Library allows various Resources to be shared across multiple objects in your movie. Not only does this reduce the size of your movie (i.e. it will load [...]]]></description>
			<content:encoded><![CDATA[<p>One of the more powerful features of SWiSH Max3 (and Max2) is the availability of the Content Library. (Sorry, the Library is not available in miniMax products.)  The Library allows various Resources to be shared across multiple objects in your movie. Not only does this reduce the size of your movie (i.e. it will load faster), it can also simplify editing changes to your movie since editing the single library resource will cause the change to be reflected in all of the objects that link to this common resource.</p>
<p><span id="more-1854"></span></p>
<p>For example, your movie may display a number of image thumbnails. When a thumbnail is selected, the full size image is displayed. If the images are stored in the library, then both the thumbnail and fullsize image can be linked to the same library reference. This removes the need to store the same image twice (once for the thumbnail, once for the fullsize image) as both objects refer (or link) to the same library reference. In a similar way, the blog article <a href="http://blog.swishzone.com/?p=1241" target="_blank">A Magnifying Glass</a> uses the library to provide two views of the same image. One with the image sized normally, and another in a magnified state for use with the magnifying glass.</p>
<p>The link icon  <a href="http://blog.swishzone.com/wp-content/uploads/2009/09/Link-icon.png"><img class="aligncenter size-full wp-image-1863" title="Link-icon" src="http://blog.swishzone.com/wp-content/uploads/2009/09/Link-icon.png" alt="Link-icon" width="23" height="23" /></a>indicates when an object is linked to a library reference. If desired, the link can be broken by pressing the button and selecting the break link icon.</p>
<p>To add an item to the library, press the <a href="http://blog.swishzone.com/wp-content/uploads/2009/09/Library_Addto.png"><img class="aligncenter size-full wp-image-1859" title="Library_Addto" src="http://blog.swishzone.com/wp-content/uploads/2009/09/Library_Addto.png" alt="Library_Addto" width="23" height="23" /></a> button in the Properties Panel. This will open a dialog that allows you to give the library item a name and choose if you add and link (<strong>Add to Library and create a link</strong>) or add and copy (<strong>Add a copy to the Library</strong>). Normally you would use the <strong>Add to Library and create a link</strong> option as this makes the most efficient use of storage.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/Panels-Content-Library.png"><img class="size-full wp-image-1862 alignright" title="Panels-Content-Library" src="http://blog.swishzone.com/wp-content/uploads/2009/09/Panels-Content-Library.png" alt="Panels-Content-Library" width="252" height="350" /></a>When the item has been added to the library, it can be seen in the content panel. The content is sorted according to its type with each type of content existing in its own folder.</p>
<p>It is also possible to import content directly into the library via the <strong>Import to Library</strong> Drop Down control.</p>
<p>Library content can be modified by double clicking on the item in the Content panel. Any modification will apply to all linked objects. This facility can be used to rapidly implement movie wide changes.</p>
<p>For example, you could define navigation buttons that use color and gradient resources defined in the library. Changing the color or gradient fill of the library reference will change the color of all of the buttons that are linked to it. This technique is often used with the supplied templates and galleries as it simplifies configuration.</p>
<p>In the example below, <strong>b1</strong> was made with 3 rectangles, <strong>press, over and norma</strong>l. The color fill in each of those rectangles is set to refer to a library element, <strong>press, colorover and colornormal</strong>. The button was then copied 3 times to make buttons <strong>b2</strong>, <strong>b3</strong> and <strong>b4</strong>.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/example1.jpg"><img class="alignnone size-medium wp-image-1867" title="example1" src="http://blog.swishzone.com/wp-content/uploads/2009/09/example1-300x183.jpg" alt="example1" width="300" height="183" /></a></p>
<p>If it is desired to change the color of all of the buttons, it is only necessary to alter the appropriate color fill in the content library.</p>
<p>This is shown in the screen capture below where the <strong>colornormal </strong>fill has been changed to light Grey.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/example2.jpg"><img class="alignnone size-medium wp-image-1868" title="example2" src="http://blog.swishzone.com/wp-content/uploads/2009/09/example2-300x185.jpg" alt="example2" width="300" height="185" /></a></p>
<p>In the case of Max3 and Wizards, the use of the library reduces the number of parameters that need be made available to the user via the wizard panel. The above example can have wizard control added by simply adding parameters for the three library color fills.</p>
<p>The three library fills are conveniently referenced via the Assoc Property field of the parameters table via <strong>library.<em>press</em>.color</strong>, <strong>library.<em>colorover</em>.color</strong> and <strong>library.<em>colornormal</em>.color</strong>. The names shown in <em>italics</em> must match the user chosen names of the library references. The .color extension means associate with the color properties of the library reference. This is needed when referring to color fills.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/wiz1.jpg"><img class="alignnone size-medium wp-image-1875" title="wiz1" src="http://blog.swishzone.com/wp-content/uploads/2009/09/wiz1-300x95.jpg" alt="wiz1" width="300" height="95" /></a></p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/wiz2.jpg"><img class="alignright size-full wp-image-1876" title="wiz2" src="http://blog.swishzone.com/wp-content/uploads/2009/09/wiz2.jpg" alt="wiz2" width="219" height="232" /></a>This results in the wizard panel which presents the three color options to the user. Any changes made via the wizard panel will be applied to all 4 buttons via the library linkages.</p>
<p>This Max3 wizard example is supplied in <a href="http://blog.swishzone.com/wp-content/uploads/2009/09/libarywizard.zip">librarywizard.zip</a>.</p>
<p>The library can also be used to simplify the editing of multiple text objects.</p>
<p>Text characteristics such as font, font size and color can also be manipulated by saving a single text object to the library and then making multiple links to that single library reference.</p>
<p>The use of text in this way is slightly more complex as the linked text objects will always show the same text unless dynamic text is used, and item specific text is loaded dynamically by script.</p>
<p>The example below (not playing), shows a movie with a shared library reference called headingtext. This reference is a dynamic text object. The linked items, t1, t2 and t3 are all linked to headingtext and hence share the same text style. When the movie is played, the onSelfEvent (load) script inserts different text into each of the dynamic text objects.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/example4.jpg"><img class="alignnone size-medium wp-image-1886" title="example4" src="http://blog.swishzone.com/wp-content/uploads/2009/09/example4-300x218.jpg" alt="example4" width="300" height="218" /></a></p>
<p>The same movie in preview mode:</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/example5.jpg"><img class="alignnone size-medium wp-image-1887" title="example5" src="http://blog.swishzone.com/wp-content/uploads/2009/09/example5-300x218.jpg" alt="example5" width="300" height="218" /></a></p>
<p>As stated previously, double clicking on the item in the Content Panel will allow the item to be edited / modified. In the case of the library item <strong>headingtext</strong>, you will see something like that shown below. However your layout may be slightly different because of your chosen panel layout.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/edittext.jpg"><img class="alignnone size-medium wp-image-1890" title="edittext" src="http://blog.swishzone.com/wp-content/uploads/2009/09/edittext-300x159.jpg" alt="edittext" width="300" height="159" /></a></p>
<p>In this state, the properties of the library item can be altered. For example the font color, size or type could be altered. This would change the style of t1, t2 and t3 in the main movie.</p>
<p>Note the red X symbol in the type left hand corner of the layout panel. This closes the symbol editor. Closing the symbol editor completes the edit process and returns the layout panel to its normal state. A movie cannot be saved while the symbol editor is open.</p>
<p>The text example shown above is contained in the <a href="http://blog.swishzone.com/wp-content/uploads/2009/09/librarytext.zip">librarytext.zip</a> file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=1854</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Countdown Timer</title>
		<link>http://blog.swishzone.com/?p=1797</link>
		<comments>http://blog.swishzone.com/?p=1797#comments</comments>
		<pubDate>Mon, 19 Oct 2009 01:17:21 +0000</pubDate>
		<dc:creator>jonh</dc:creator>
				<category><![CDATA[Max3]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[alarm]]></category>
		<category><![CDATA[countdown]]></category>
		<category><![CDATA[segment]]></category>
		<category><![CDATA[seven]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=1797</guid>
		<description><![CDATA[Have you ever wanted a countdown timer for your website, or wondered how long it is until 1st Jan 2012 (local time)? If so, then this component could be for you!  This new CountdownTimer component allows you to specify a countdown date (Year, Month, Day, Hour and minute) in either local time or GMT time. The [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted a countdown timer for your website, or wondered how long it is until 1st Jan 2012 (local time)? If so, then this component could be for you!  This new <strong>CountdownTimer </strong>component allows you to specify a countdown date (Year, Month, Day, Hour and minute) in either local time or GMT time. The display then shows the remaining days (max days is 999), hours, minutes and seconds. At the end of the countdown period it will display &#8220;End&#8221; in the seven segment display.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="320" height="70" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blog.swishzone.com/wp-content/uploads/2009/09/Countdown.swf" /><embed type="application/x-shockwave-flash" width="320" height="70" src="http://blog.swishzone.com/wp-content/uploads/2009/09/Countdown.swf"></embed></object></p>
<p><span id="more-1797"></span></p>
<p>The countdown component is based on the <strong>SevenSegmentCluster </strong>component. This new component allows a multiple digit display to be created. The Number of digits is chosen by the user via the Parameters Panel and can range from 1 to 16.</p>
<p>The SevenSegmentCluster component is based on the <strong>SevenSegment </strong>Data display component that is supplied with SWiSH Max3. However, the SevenSegment component has been modified in the following ways:<br />
1. Added the Colon segments and corresponding Method <strong>SetColon(value)</strong><br />
2. Modified the <strong>DisplayDigit(n,p)</strong> method so that &#8221; &#8221; and &#8220;-&#8221; are also recognized as valid display values. This allows a digit to be blanked (&#8221; &#8220;) or set to &#8220;-&#8221; (only the middle horizontal segment is lit).</p>
<p>The components will be shipped with future releases of SWiSH Max3, but are also available in <a href="http://blog.swishzone.com/wp-content/uploads/2009/09/CoundownTimer.zip">this .zip file</a>. Copy the contents to your <strong>Components\Data display</strong> folder. The components require Max3 build 20090904 or later.</p>
<h3>Configuration</h3>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/parameters.jpg"><img class="size-medium wp-image-1814 alignright" title="parameters" src="http://blog.swishzone.com/wp-content/uploads/2009/09/parameters-135x300.jpg" alt="parameters" width="135" height="300" /></a>To configure the <strong>CountdownTimer</strong>, simply enter the target date and time in the Parameters Panel.</p>
<p>If the parameters panel is not visible, use <strong>Menu | Window</strong> to display it.</p>
<p>The hours field is 24 hour format so enter a number 0 to 23 (0 = midnight, 23 =11pm). The Parameters Panel also allows the color of the digits and the other text to be altered.</p>
<p>If the GMT checkbox is checked, then the alarm time will be relative to GMT time. This allows users in different locations to see the same countdown indication (assuming their clocks are set correctly and their computer has the local time offset correctly configured).</p>
<h3>Technical Description</h3>
<p>For those interested, here is a brief description of how it works&#8230;</p>
<h4>Time Calculations</h4>
<p>The target countdown time is inserted into a date object using the setUTC methods in the <strong>onSelfEvent (load) </strong>script. This sets the target date according to GMT based on the parameters in the parameters panel. The getTime() method is then used to obtain the number of milliseconds since midnight January 1, 1970. This is saved the variable <strong>t1</strong>, which is used for all future offset calculations.</p>
<pre>onSelfEvent (load) {
 d = new Date();

 d.setUTCFullYear(parameters.Year, parameters.Month, parameters.Day);
 d.setUTCHours(parameters.Hour);
 d.setUTCMinutes(parameters.Minute);
 d.setUTCSeconds(0);
 d.setUTCMilliseconds(0);

 t1 = d.getTime();</pre>
<p>The <strong>SetCounter(t)</strong> function calculates the difference between the target time and the current time and then displays the result in the <strong>SevenSegmentCluster</strong> component.</p>
<p>If local time is being used then the users time zone offset is added to the calculations.</p>
<p>The time difference is then converted from milliseconds to seconds for display in the <strong>SevenSegmentCluster</strong>.</p>
<p>The time difference is broken into days, hours, minutes and seconds using division and remainder calculations. <strong>dd </strong>is the variable containing the time difference in seconds.</p>
<pre>// convert number of seconds into days, hours, minutes and seconds
 dday = Math.floor(dd / (24*3600));    // get number of days.
 dd -= dday * 24*3600; // calculate remainder
 dhour = Math.floor(dd / 3600);    // get number of hours
 dd -= dhour * 3600; // calculate remainder
 dmin = Math.floor(dd / 60);    // number of minutes
 dd -= dmin *60; // calculate remainder
 dd = Math.round(dd);    // number of seconds

// write out number of seconds
 SevenSegmentCluster.Digit_0.DisplayDigit(dd%10, false);
 SevenSegmentCluster.Digit_1.DisplayDigit(Math.floor(dd/10), false);

 // write out number of minutes
 SevenSegmentCluster.Digit_2.DisplayDigit(dmin%10, false);
 SevenSegmentCluster.Digit_3.DisplayDigit(Math.floor(dmin/10), false);

 // write out number of hours
 SevenSegmentCluster.Digit_4.DisplayDigit(dhour%10, false);
 SevenSegmentCluster.Digit_5.DisplayDigit(Math.floor(dhour/10), false);

 // write out number of days
 SevenSegmentCluster.Digit_7.DisplayDigit(dday%10, false);
 dday = Math.floor(dday/10);
 SevenSegmentCluster.Digit_8.DisplayDigit(dday%10, false);
 dday = Math.floor(dday/10);
 SevenSegmentCluster.Digit_9.DisplayDigit(dday%10, false);</pre>
<p>The configuration and use of each of the Digits within the SevenSegmentCluster is shown in the table below:</p>
<table style="width: 288pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0" width="384">
<tbody>
<tr style="height: 12.75pt;" height="17">
<td style="width: 144pt; height: 12.75pt;" width="192" height="17"><strong>Object Name</strong></td>
<td style="width: 48pt;" width="64"><strong>Use</strong></td>
<td style="width: 48pt;" width="64"><strong>Initial Digit</strong></td>
<td style="width: 48pt;" width="64"><strong>Colon</strong></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_0</td>
<td>Sec</td>
<td>-</td>
<td>false</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_1</td>
<td>Sec</td>
<td>-</td>
<td>false</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_2</td>
<td>Min</td>
<td>-</td>
<td>true</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_3</td>
<td>Min</td>
<td>-</td>
<td>false</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_4</td>
<td>Hour</td>
<td>-</td>
<td>true</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_5</td>
<td>Hour</td>
<td>-</td>
<td>false</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_6</td>
<td>-</td>
<td>-</td>
<td>false</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_7</td>
<td>Day</td>
<td>-</td>
<td>false</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_8</td>
<td>Day</td>
<td>-</td>
<td>false</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">SevenSegmentCluster.Digit_9</td>
<td>Day</td>
<td>-</td>
<td>false</td>
</tr>
</tbody>
</table>
<h4>Timer Routine</h4>
<p>The <strong>onSelfEvent (load)</strong> script also defines an interval function and then sets up an interval timer to call the function on a regular basis (1/4 second, 250mS). A smaller interval could be used to increase accuracy but this would also increase CPU load.</p>
<pre> function UpdateDisplay() {
  SetCounter(t1);
 }
 var intervalID = setInterval(UpdateDisplay, 250);</pre>
<h4>End Processing</h4>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/end.jpg"><img class="alignnone size-full wp-image-1826" title="end" src="http://blog.swishzone.com/wp-content/uploads/2009/09/end.jpg" alt="end" width="316" height="65" /></a></p>
<p>When the <strong>SetCounter(t)</strong> function calculates a negative time interval, the countdown has expired. When this happens, all digits are blanked, the colons on digits 2 and 4 are turned off, and digits 4, 5 and 6 are set to display the word &#8220;End&#8221; by setting specific segments. The interval timer is also stopped to reduce CPU load.</p>
<pre>if (dd &lt; 0) {
 // time has expired, display "End"
 // turn off all digits
 SevenSegmentCluster.Digit_0.DisplayDigit(" ", false);
 SevenSegmentCluster.Digit_1.DisplayDigit(" ", false);
 SevenSegmentCluster.Digit_2.DisplayDigit(" ", false);
 SevenSegmentCluster.Digit_3.DisplayDigit(" ", false);
 SevenSegmentCluster.Digit_4.DisplayDigit(" ", false);
 SevenSegmentCluster.Digit_5.DisplayDigit(" ", false);
 SevenSegmentCluster.Digit_6.DisplayDigit(" ", false);
 SevenSegmentCluster.Digit_7.DisplayDigit(" ", false);
 SevenSegmentCluster.Digit_8.DisplayDigit(" ", false);
 SevenSegmentCluster.Digit_9.DisplayDigit(" ", false);

 // turn off both colons
 SevenSegmentCluster.Digit_2.SetColon(false);
 SevenSegmentCluster.Digit_4.SetColon(false);

 // display End
 SevenSegmentCluster.Digit_4.SetSegments(false,true,true,false,true,true,true);
 SevenSegmentCluster.Digit_5.SetSegments(false,true,false,false,false,true,true);
 SevenSegmentCluster.Digit_6.SetSegments(true,true,true,true,false,true,false);
 clearInterval(intervalID);
 return;
 }</pre>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/segments.jpg"><img class="alignleft size-full wp-image-1824" title="segments" src="http://blog.swishzone.com/wp-content/uploads/2009/09/segments.jpg" alt="segments" width="120" height="182" /></a>The <strong>SetSegments(a,b,c,d,e,f,g)</strong> method allows each individual segment, a to g to be set individually. The segment codes are shown in the diagram to the left.</p>
<p>Unfortunately, the segment codes that are used by the <strong>SevenSegment</strong> component are not industry standard. We apologize for this error, but cannot correct it as correction would make the revised component incompatible with users that may have deployed the previous version.</p>
<p>The correspondence between the industry standard designation (A to G) and the Max3 designation (a to g) is as follows:</p>
<p>A=a, B=e, C=g, D=c, E=f, F=d, G=b.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=1797</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NEW SWiSH Max3/miniMax3</title>
		<link>http://blog.swishzone.com/?p=1786</link>
		<comments>http://blog.swishzone.com/?p=1786#comments</comments>
		<pubDate>Fri, 11 Sep 2009 01:25:47 +0000</pubDate>
		<dc:creator>hughb</dc:creator>
				<category><![CDATA[Max3]]></category>
		<category><![CDATA[miniMax3]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=1786</guid>
		<description><![CDATA[Edit: Sorry, this promotion ended Oct 16th, 09. We are excited to announce the release of SWiSH Max3 and miniMax3. Now with new Wizard Projects Templates, Knife Tool, Shape Operations, Component Tool and extra components. SWiSH Max3 cements it&#8217;s reputation as truly powerful Flash authoring tool at an amazing price of just $149.95! But wait&#8230;! [...]]]></description>
			<content:encoded><![CDATA[<p><span style="COLOR: red; font-style: italic">Edit: Sorry, this promotion ended Oct 16th, 09.</span> We are excited to announce the release of SWiSH Max3 and miniMax3. Now with new Wizard Projects Templates, Knife Tool, Shape Operations, Component Tool and extra components. SWiSH Max3 cements it&#8217;s reputation as truly powerful Flash authoring tool at an amazing price of just $149.95! <strong><em>But wait&#8230;! There&#8217;s more&#8230;.</em></strong> we&#8217;re offing a SUPER SALE to celebrate the release and we&#8217;ve cut $50 off the full price to $99.95, and there is an amazingly low upgrade price of only $16.95, but don&#8217;t miss out, the sale is only for a brief introductory period. Now that&#8217;s cause for celebration!</p>
<p><span id="more-1786"></span></p>
<p style="FONT-SIZE: 17px; FONT-WEIGHT: bold">SWiSH Max3</p>
<p><img src="http://www.swishzone.com/images/newsletter/import1.gif" alt="image" /> <a href="http://www.swishzone.com/index.php?area=products&amp;product=max&amp;tab=downloads" target="_blank">DOWNLOAD FREE TRIAL &#8211; SWiSH Max3</a></p>
<p><span style="COLOR: red"><strong>SUPER SALE &#8211; SUPER SALE &#8211; SUPER SALE</strong></span></p>
<p><a href="http://www.swishzone.com/index.php?area=products&amp;product=max&amp;tab=purchase" target="_blank">SWiSH Max3 &#8211; SALE $99.95!</a> <span style="COLOR: grey">(RRP $149.95)</span></p>
<p>UPGRADE OPTIONS:</p>
<ul>
<li style="LIST-STYLE-POSITION: inside; LIST-STYLE-TYPE: circle"><a href="http://www.swishzone.com/index.php?area=products&amp;product=max&amp;tab=upgrade" target="_blank">SWiSH Max2 to Max3 &#8211; SALE $16.95</a><span style="COLOR: grey">(RRP $24.95)</span></li>
<li style="LIST-STYLE-POSITION: inside; LIST-STYLE-TYPE: circle"><a href="http://www.swishzone.com/index.php?area=products&amp;product=max&amp;tab=upgrade" target="_blank">SWiSHminMax3 to Max3 &#8211; SALE $56.95</a><span style="COLOR: grey">(RRP $84.95)</span></li>
<li style="LIST-STYLE-POSITION: inside; LIST-STYLE-TYPE: circle"><a href="http://www.swishzone.com/index.php?area=products&amp;product=max&amp;tab=upgrade" target="_blank">SWiSH Max to Max3 &#8211; SALE $66.95</a><span style="COLOR: grey">(RRP $99.95)</span></li>
</ul>
<p><span style="FONT-STYLE: italic; COLOR: grey; FONT-SIZE: 10px; FONT-WEIGHT: bold">Note: These &#8216;Super Sale&#8217; discount prices are ONLY available until Oct 16, 2009.</span></p>
<p style="FONT-SIZE: 17px; FONT-WEIGHT: bold">SWiSH miniMax3</p>
<p>SWiSH miniMax3 suits the business user, student or anyone new to Flash who wants to get quick, professional results. New features include Project Tempaltes, improved drawing tools and more components including autoshapes. SWiSH miniMax3 is now at the new low price of only $69.95 &#8211; super value for a great Flash editor. Check out the product comparison between SWiSH miniMax3 and SWiSH Max3 <a href="http://www.swishzone.com/index.php?area=products&amp;product=max_mini&amp;tab=matrix" target="_blank">here</a>.</p>
<p><img src="http://www.swishzone.com/images/newsletter/import1.gif" alt="image" /> <a href="http://www.swishzone.com/index.php?area=products&amp;product=max_mini&amp;tab=downloads" target="_blank">DOWNLOAD FREE TRIAL &#8211; SWiSH miniMax3</a></p>
<p><span style="COLOR: red"><strong>SUPER SALE &#8211; SUPER SALE &#8211; SUPER SALE</strong></span></p>
<p><a href="http://www.swishzone.com/index.php?area=products&amp;product=max_mini&amp;tab=purchase" target="_blank">SWiSH miniMax3 &#8211; SALE $49.95!</a> <span style="COLOR: grey">(RRP $69.95)</span></p>
<p>UPGRADE OPTIONS:</p>
<ul>
<li style="LIST-STYLE-POSITION: inside; LIST-STYLE-TYPE: circle"><a href="http://www.swishzone.com/index.php?area=products&amp;product=max_mini&amp;tab=upgrade" target="_blank">SWiSH Max to miniMax3 &#8211; SALE $19.95</a> <span style="COLOR: grey">(RRP $29.95)</span></li>
</ul>
<p><span style="FONT-STYLE: italic; COLOR: grey; FONT-SIZE: 10px; FONT-WEIGHT: bold">Note: These &#8216;Super Sale&#8217; discount prices are ONLY available until Oct 16, 2009.</span></p>
<p><strong>What&#8217;s new in SWiSH Max3 and SWiSH miniMax3</strong></p>
<p>Here is a list of changes for SWiSH Max3 and miniMax3 from the previous version. You can also click here for <a href="http://www.swishzone.com/index.php?area=products&amp;product=max&amp;tab=upgrade" target="_blank">screencaps</a> of these features and <a href="http://www.swishzone.com/index.php?area=resources&amp;tab=screencast" target="_blank">screencast</a> demonstrations. Check out the product comparison between SWiSH miniMax3 and SWiSH Max3 <a href="http://www.swishzone.com/index.php?area=products&amp;product=max_mini&amp;tab=matrix" target="_blank">here</a>.</p>
<p><a href="http://www.swishzone.com/products/max/features/images/newproject.gif" target="_blank">Projects and Wizards </a><br />
Project templates can be opened to allow easy customization of multi-document templates from the &#8216;Wizard&#8217; panel.</p>
<p><a href="http://www.swishzone.com/products/max/features/images/shape_operations.gif" target="_blank">Shape Operations</a><span style="COLOR: grey"> (Max3 only)</span><br />
Select multiple objects and chose to add, subtract and perform other boolean operations on the group. E.g. use a circle to punch a hole in a square.</p>
<p><a href="http://www.swishzone.com/products/max/features/images/knife.gif" target="_blank">Knife Tool</a> <span style="COLOR: grey">(Max3 only)</span><br />
Cut any vector shape with a freehand curve. Smooth the curve before, or after, placement.</p>
<p><a href="http://www.swishzone.com/products/max/features/images/smoothing.gif" target="_blank">Smoothing options for Knife and Pencil Tool </a><br />
When drawing a freehand curve it is useful to smooth the results to reduce the number of vertices.</p>
<p><a href="http://www.swishzone.com/products/max/features/images/motionpath_bezier.gif" target="_blank">Motion Path bézier curves </a><br />
Motion paths now have bézier curves which can be edited with the Subselection tool just like the Pen Tool.</p>
<p><a href="http://www.swishzone.com/products/max/features/images/motionpath_convert.gif" target="_blank">Convert Shape to Motion Path</a><span style="COLOR: grey"> (Max3 only)</span><br />
Creating a motion path is now even easier. Select a shape and make it your new motion path.</p>
<p><a href="http://www.swishzone.com/products/max/features/images/components_more.gif" target="_blank">Even More Components </a><br />
Even more components, including several auto-shape components for enhanced drawing capability.</p>
<p><a href="http://www.swishzone.com/products/max/features/images/component-tool.gif" target="_blank">Component Tool</a><span style="COLOR: grey"> (Max3 only)</span><br />
Make your favourite components quick and easy to select using the new component tool.</p>
<p><a href="http://www.swishzone.com/index.php?area=products&amp;product=max&amp;tab=upgrade" target="_blank">Support for Flash AS2 Classes </a><span style="COLOR: grey">(Max3 only)</span><br />
Advanced scripting now includes support for Adobe Flash Actionscript 2 (AS2) Classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=1786</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create an Autoshape Comp</title>
		<link>http://blog.swishzone.com/?p=1709</link>
		<comments>http://blog.swishzone.com/?p=1709#comments</comments>
		<pubDate>Fri, 11 Sep 2009 01:15:22 +0000</pubDate>
		<dc:creator>jonh</dc:creator>
				<category><![CDATA[Max3]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[autoshape]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=1709</guid>
		<description><![CDATA[An autoshape component is similar to a regular component. The main difference is that it uses the new Max3 component method setContour() to dynamically redraw the shape after user changes to its width, height or associated handles.  This tutorial gives you quick steps on how to make a simple Autoshape component with handles.
A contour is [...]]]></description>
			<content:encoded><![CDATA[<p>An autoshape component is similar to a regular component. The main difference is that it uses the new Max3 component method setContour() to dynamically redraw the shape after user changes to its width, height or associated handles.  This tutorial gives you quick steps on how to make a simple Autoshape component with handles.</p>
<p>A contour is an array of edge definitions that form a shape. A shape may have multiple contours, although many simple shapes can be drawn with a single contour. A shape that contains a single contour can have it properties altered easily via the Properties panel. (ie. stroke and fill definitions).</p>
<p>An edge definition is an object and can consist of the following elements:</p>
<table style="width: 353pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0" width="471">
<colgroup span="1">
<col style="width: 84pt;" span="1" width="112"></col>
<col style="width: 269pt;" span="1" width="359"></col>
</colgroup>
<tbody>
<tr style="height: 12.75pt;" height="17">
<td style="width: 84pt; height: 12.75pt;" width="112" height="17"><strong>Element</strong></td>
<td style="width: 269pt;" width="359"><strong>Description</strong></td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">x<span> </span></td>
<td>x value</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">y<span> </span></td>
<td>y value</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">vertexType<span> </span></td>
<td>cusp, smooth, symmetrical</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">isline<span> </span></td>
<td>true if edge is a simple line</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">edgeType<span> </span></td>
<td>start, linear, quadratic, cubic</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">noStroke<span> </span></td>
<td>no stroke used</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">stroke<span> </span></td>
<td>stroke number</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">noFill<span> </span></td>
<td>no fill used</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">fill<span> </span></td>
<td>fill number</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">fillLeft<span> </span></td>
<td>fill number for LHS of edge</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">fillRight<span> </span></td>
<td>fill number for RHS of edge</td>
</tr>
<tr style="height: 12.75pt;" height="17">
<td style="height: 12.75pt;" height="17">controlPoints</td>
<td>array of {x,y} point objects for quadratic or cubic edges</td>
</tr>
</tbody>
</table>
<p>Although this may look complex, the state of many of the elements can be assumed depending on the context of the edge. For example, a simple rectangle could be drawn with the following contour definition:</p>
<pre>[{x:-20,y:-10,fill:0,stroke:0}, // top left hand corner
{x:20,y:-10}, // edge to top right hand corner
{x:20,y:10}, // right hand edge to bottom right hand corner
{x:-20,y:10}, // bottom edge to bottom left hand corner
{x:-20,y:-10}] // left hand edge to top left hand corner
// this last edge completes the rectangle</pre>
<p>This rectangle would have a fixed size of 40&#215;20. Because of the fixed size, this is not a particularly useful component. It would be more useful to substitute _widthOrignal/2 and _heightOriginal/2 for the constants 20 and 10. However, in this case, constants have been used here as they simplify the example. Note that a shape drawn with constants cannot be easily resized by moving the handles that surround the shape. The shape is simply redrawn the same size in a different location.</p>
<h3>A Simple Shape</h3>
<p>The contour described above can be used as the basis of an autoshape component. For example, an autoshape rectangle with a user configurable hole.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/rectanglewithhole.jpg"><img class="alignleft size-full wp-image-1724" title="rectanglewithhole" src="http://blog.swishzone.com/wp-content/uploads/2009/09/rectanglewithhole.jpg" alt="rectanglewithhole" width="101" height="119" /></a>To create this component, in a new movie, draw a rectangle.</p>
<p>Name the rectangle <strong>rectanglewithhole</strong>.</p>
<p>In the outline panel, right click on the shape then select <strong>Author Component</strong>.</p>
<p>If this option is not visible, enable Authoring using:<strong><br />
Tools | Preferences | Editing</strong> and check <strong>Enable Authoring Options for Components and Wizards</strong>. (This option is not available in miniMax3.)</p>
<p>In the Author Component dialog, add a handle as shown in the image below:</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/rectanglehandle.jpg"><img class="alignnone size-medium wp-image-1736" title="rectanglehandle" src="http://blog.swishzone.com/wp-content/uploads/2009/09/rectanglehandle-300x129.jpg" alt="rectanglehandle" width="300" height="129" /></a></p>
<p>The handle <strong>h1</strong> is of type <strong>In Rectangle</strong> and has its boundary set as <strong>Top Right</strong>.</p>
<p>Paste the script below into the Apply (after) script area of a component. Then press the apply button. The script will draw a rectangle with a hole. The resulting hole is size is set according to handles.h1.x, handles.h1.y.</p>
<pre>// w and h are shorthand for outsize width and height
w = _widthOriginal/2;
h = _heightOriginal/2;

// w2 and h2 are the inner width and height
// these are defined by the handle position
w2 = handles.h1.x;    // inner width
h2 = -handles.h1.y;    // inner height

// draw the shape
this.setContour(
    [{x:-w,y:-h,fill:0,stroke:0}, // top left hand corner
    {x:w,y:-h}, // edge to top right hand corner
    {x:w,y:h}, // right hand edge to bottom right hand corner
    {x:-w,y:h}, // bottom edge to bottom left hand corner
    {x:-w,y:-h}, // left hand edge to top left hand corner
    {x:-w2,y:-h2,edgeType:"start"}, // inner top left hand corner
    {x:w2,y:-h2}, //  inner edge to top right hand corner
    {x:w2,y:h2}, //  inner right hand edge to bottom right hand corner
    {x:-w2,y:h2}, //  inner bottom edge to bottom left hand corner
    {x:-w2,y:-h2}]
);</pre>
<p>Note that the edgeType:&#8221;start&#8221; is implied when the outer rectangle is drawn, but must be specified when the inner rectangle is drawn to prevent a line being drawn from -w,-h to -w2, -h2.</p>
<h3>Drawing Curves</h3>
<p>Flash draws its curves using <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve" target="_blank">Bezier Curves</a>.  You may have noticed the different possible edge types: <strong>quadratic </strong>and <strong>cubic</strong>. <strong>quadratic </strong>and <strong>cubic </strong>refer to the types of curves that can be supported via the edge definition.</p>
<p>For Example, the contour:</p>
<pre>[{x:0,y:50,fill:0,stroke:0},
{x:-50,y:0,edgeType:"quadratic",controlPoints:[{x:0,y:0}]}]</pre>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/quadratic.jpg"><img class="alignleft size-full wp-image-1743" title="quadratic" src="http://blog.swishzone.com/wp-content/uploads/2009/09/quadratic.jpg" alt="quadratic" width="80" height="77" /></a>Draws a quadratic bezier curve from 0,50 to -50,0 with a control point of 0,0.</p>
<p>By extension, it is possible to draw various shapes with combination of curved and straight sides.</p>
<pre>[{x:0,y:50,fill:0,stroke:0},
{x:-50,y:0,edgeType:"quadratic",controlPoints:[{x:0,y:0}]},
{x:-50,y:-50},
{x:0,y:-50},
{x:50,y:0,edgeType:"quadratic",controlPoints:[{x:0,y:0}]},
{x:50,y:50},
{x:0,y:50}]</pre>
<p>Draws:<br />
<a href="http://blog.swishzone.com/wp-content/uploads/2009/09/quadratic2.jpg"><img class="size-full wp-image-1744 alignnone" title="quadratic2" src="http://blog.swishzone.com/wp-content/uploads/2009/09/quadratic2.jpg" alt="quadratic2" width="116" height="115" /></a></p>
<p>As with the first example, it is possible to add handles to allow user configuration of various aspects of the shape. eg. the curve control points or the length of the straight sections. The counter option associated with the handle could be used to change some configuration aspect of the shape. eg. In the case of a star, the count could be used to define the number of points.</p>
<h3>Asymetric Shapes</h3>
<p>When a shape is drawn using the setContour() method, the bounding rectangle is redrawn around the shape and the reference and transform points are set according to the previously selected setting (center, top left, top right, etc). If this shape has been drawn in an asymmetrical manner, this may cause the previously defined reference point to become altered. For example, the supplied CircleSegment and Toroid_segment autoshapes.</p>
<p><strong>centerX, </strong><strong>centerY, originX and originY </strong>are predefined properties that specify the offset of the center with respect to the center before the drawing process commenced.</p>
<p>Handle positions can be transformed to their original co-ordinate system by adding the centerX, centerY offsets.</p>
<p>If it is desired to return the transform points to the original origin then this can be achieved as follows:</p>
<pre>transformPosition = "custom";
transformX = -centerX;
transformY = -centerY;</pre>
<p>Alternatively</p>
<pre>transformPosition = "custom";
transformX = originX;
transformY = originY;</pre>
<p>could be used.</p>
<h3>Example Autoshapes</h3>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/09/example_autoshape.jpg"><img class="alignnone size-medium wp-image-1762" title="example_autoshape" src="http://blog.swishzone.com/wp-content/uploads/2009/09/example_autoshape-300x121.jpg" alt="example_autoshape" width="300" height="121" /></a></p>
<p>The autoshapes contained in <a href="http://blog.swishzone.com/wp-content/uploads/2009/09/autoshape_examples.zip">this .zip file</a>, demonstrate simple shapes based on a single quadratic and cubic curve. The shape is made complete by closing the shape using linear lines through the curve control points. The handles can be used to alter the position of the curve end points as well as the position of the control point(s). As these shapes can be asymmetrical, correction is made to the handle position by adding centerX and centerY. Please examine the Apply after script in each of the components.</p>
<p>The <a href="http://www.swishzone.com/downloads/SwishMax3AuthoringGuide.zip">SWiSH Max3 Authoring Guide</a> gives a description of the available wizard and component scripting methods for your reference.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=1709</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Max3 Autoshape Components</title>
		<link>http://blog.swishzone.com/?p=1658</link>
		<comments>http://blog.swishzone.com/?p=1658#comments</comments>
		<pubDate>Tue, 01 Sep 2009 04:56:32 +0000</pubDate>
		<dc:creator>jonh</dc:creator>
				<category><![CDATA[Max3]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[miniMax3]]></category>
		<category><![CDATA[autoshape]]></category>
		<category><![CDATA[spiral]]></category>
		<category><![CDATA[splat]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=1658</guid>
		<description><![CDATA[One of the new features of SWiSH Max3 is extensions to the component scripting that allow shapes to be drawn dynamically. This means that autoshapes can be supplied via the component interface. As this greatly simplifies the creation of autoshapes you&#8217;ll find new autoshapes will be added in future releases of Max3.

User created autoshapes are now [...]]]></description>
			<content:encoded><![CDATA[<p>One of the new features of SWiSH Max3 is extensions to the component scripting that allow shapes to be drawn dynamically. This means that autoshapes can be supplied via the component interface. As this greatly simplifies the creation of autoshapes you&#8217;ll find new autoshapes will be added in future releases of Max3.</p>
<p><span id="more-1658"></span></p>
<p>User created autoshapes are now possible, however advanced scripting knowledge is required. As with all of the currently supplied components, it is possible to view the component scripting by altering the component object attributes once it has been placed on the stage. In this way, it is possible to use the existing components as an example for user authored components.</p>
<p>Some interesting new autoshape components that have been added to Max3 include:</p>
<ul>
<li>Various arrows: 2 way <em>(a)</em>, 4 way <em>(b)</em>, L <em>(c)</em> and T shape <em>(d)</em></li>
<li>Circle Segment <em>(e)</em></li>
<li>Cookie Cutter <em>(f)</em></li>
<li>Connector Line <em>(i)</em></li>
<li>Cross <em>(g)</em></li>
<li>Lshape <em>(h)</em></li>
<li>Various rectangles: beveled <em>(j)</em>, champher <em>(k)</em> and rounded <em>(l)</em></li>
<li>Spiral <em>(m)</em></li>
<li>Splat <em>(n)</em></li>
<li>Toroid <em>(o)</em></li>
<li>Toroid Segment <em>(p)</em></li>
<li>Triangle <em>(q)</em></li>
</ul>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/08/autoshapes.jpg"><img class="alignnone size-full wp-image-1660" title="autoshapes" src="http://blog.swishzone.com/wp-content/uploads/2009/08/autoshapes.jpg" alt="autoshapes" width="302" height="423" /></a></p>
<p>Of the new components, I think that Splat (<em>n</em>), Cookie Cutter (<em>f</em>) and Spiral (<em>m</em>) are my personal favorites.</p>
<p><a href="http://www.swishzone.com/tutorials/max3/autoshape_splat/" target="_blank">This Screen cast</a> shows how to use the Splat autoshape.</p>
<p><a href="http://blog.swishzone.com/wp-content/uploads/2009/08/Splat_Frame.jpg"><img class="size-full wp-image-1675 alignleft" title="Splat_Frame" src="http://blog.swishzone.com/wp-content/uploads/2009/08/Splat_Frame.jpg" alt="Splat_Frame" width="181" height="134" /></a></p>
<p>The Splat autoshape (as well as the Cookie Cutter autoshape) can be used to create interesting frames for photographs. The Splat autoshape provides an easy way to draw irregular closed shapes with smooth edges. eg. a cartoon face profile.</p>
<p>The <a href="http://www.swishzone.com/tutorials/max3/autoshape_cookiecutter/" target="_blank">Cookie Cutter autoshape</a> allows regular shapes to be created that have a fixed number of segments.<a href="http://blog.swishzone.com/wp-content/uploads/2009/08/Cookie_Frame.jpg"><img class="alignright size-full wp-image-1673" title="Cookie_Frame" src="http://blog.swishzone.com/wp-content/uploads/2009/08/Cookie_Frame.jpg" alt="Cookie_Frame" width="157" height="148" /></a> The handles can be dragged to change the position of the inner and outer points. Both handles are also counter handles. Clicking on the outside handle cycles through the various corner modes (smooth-smooth, sharp-smooth, and sharp-sharp). Clicking on the inner handle increments (or decrements if right click is used). This autoshape can be used to create star, flower and curvy star type shapes with any number of points.</p>
<p>The Spiral autoshape is interesting as it can be used as the basis of a motion path. <a href="http://www.swishzone.com/tutorials/max3/autoshape_spiral/" target="_blank">This screen cast</a> gives more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=1658</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Studio2 quick tip: Use the Dependencies Palette</title>
		<link>http://blog.swishzone.com/?p=660</link>
		<comments>http://blog.swishzone.com/?p=660#comments</comments>
		<pubDate>Mon, 03 Aug 2009 03:19:37 +0000</pubDate>
		<dc:creator>jonh</dc:creator>
				<category><![CDATA[Studio2]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[dependencies palette]]></category>

		<guid isPermaLink="false">http://blog.swishzone.com/?p=660</guid>
		<description><![CDATA[If your .swf movie loads external movies or files, those files can be added to the dependencies palette so that they are added to the .exe and are available when the movie is played. For more information, see the help file.
]]></description>
			<content:encoded><![CDATA[<p>If your .swf movie loads external movies or files, those files can be added to the dependencies palette so that they are added to the .exe and are available when the movie is played. For more information, see the help file.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.swishzone.com/?feed=rss2&amp;p=660</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.204 seconds -->
<!-- Cached page served by WP-Cache -->
