<?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>Web Style Press, Best Practices from all the Web, Build Better Websites &#187; Control</title>
	<atom:link href="http://www.webstylepress.com/tag/control/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webstylepress.com</link>
	<description>Web VS Style</description>
	<lastBuildDate>Mon, 26 Dec 2011 10:35:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How to Control Font Size in Percentage</title>
		<link>http://www.webstylepress.com/how-to-control-font-size-in-percentage/</link>
		<comments>http://www.webstylepress.com/how-to-control-font-size-in-percentage/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 21:17:45 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[fonts]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Control]]></category>

		<guid isPermaLink="false">http://www.webstylepress.com/?p=526</guid>
		<description><![CDATA[To control fonts in percentage is the easiest method which we can choose while playing with the fluid layouts, or perhaps while working with widgets and web 2.0 elements. It is recommended while working with layouts that we define a standard font size for html and body. In the beginning there were loose style for [...]<p><a href="http://www.webstylepress.com/how-to-control-font-size-in-percentage/">How to Control Font Size in Percentage</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.webstylepress.com/wp-content/uploads/2009/04/font-percentages.jpg" alt="font-percentages" title="font-percentages" width="200" height="283" class="alignright size-full wp-image-527" />To control fonts in percentage is the easiest method which we can choose while playing with the fluid layouts, or perhaps while working with widgets and web 2.0 elements. </p>
<p>It is recommended while working with layouts that we define a standard font size for html and body. In the beginning there were loose style for fonts. Nobody used to care about styling fonts. Then in the design era of computer age, designers developed and adopted techniques to control different design aspects of websites and usually most popular standard was to choose 11px to 12 px font for HTML. Many years this technique prevailed until web 2.0 arrived and some web architects decides that fonts must be clear and bold. So now designers and developers adopt a technique to display large font sizes. Font size, color, face are also a part of the design. Here is how we can control font by percentage as a unit for font size. </p>
<p><span id="more-526"></span></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div style=&quot;font-size: 100%;&quot;&gt;100 %&lt;/div&gt;
&lt;div style=&quot;font-size: 150%;&quot;&gt;150 %&lt;/div&gt;
&lt;div style=&quot;font-size: 300%;&quot;&gt;300 %&lt;/div&gt;
&lt;div style=&quot;font-size: 400%;&quot;&gt;400 %&lt;/div&gt;
&lt;div style=&quot;font-size: 500%;&quot;&gt;500 %&lt;/div&gt;
&lt;div style=&quot;font-size: 600%;&quot;&gt;600 %&lt;/div&gt;</pre></div></div>

<p>There are other font size units too e.g. pixels, points, inches, cm, mm etc. Percentage is one of these. Widely used as a standard is em unit for font size, which is considered to be the same for all browsers if browser compatibility is in mind.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div style=&quot;font-size: 12px;&quot;&gt;12 px&lt;/div&gt;
&lt;div style=&quot;font-size: 12pt;&quot;&gt;12 pt&lt;/div&gt;
&lt;div style=&quot;font-size: 0.5in;&quot;&gt;0.5 in&lt;/div&gt;
&lt;div style=&quot;font-size: 1cm;&quot;&gt;1 cm&lt;/div&gt;
&lt;div style=&quot;font-size: 12mm;&quot;&gt;12 mm&lt;/div&gt;
&lt;div style=&quot;font-size: 2pc;&quot;&gt;2 pc&lt;/div&gt;
&lt;div style=&quot;font-size: 2em;&quot;&gt;2 em&lt;/div&gt;
&lt;div style=&quot;font-size: 6ex;&quot;&gt;12 ex&lt;/div&gt;</pre></div></div>

<p><a href="http://www.webstylepress.com/how-to-control-font-size-in-percentage/">How to Control Font Size in Percentage</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.webstylepress.com/use-any-font-in-webpages-as-text/" title="Use Any Font in Webpages As Text">Use Any Font in Webpages As Text</a></li><li><a href="http://www.webstylepress.com/modern-font-styles-for-websites/" title="Modern Font Styles For Websites">Modern Font Styles For Websites</a></li><li><a href="http://www.webstylepress.com/sound-control-in-flash/" title="Sound Control In Flash &#8211; Tutorial and Downloads">Sound Control In Flash &#8211; Tutorial and Downloads</a></li><li><a href="http://www.webstylepress.com/transition-between-sections-of-a-flash-movie/" title="Transition Between Sections of a Flash Movie">Transition Between Sections of a Flash Movie</a></li><li><a href="http://www.webstylepress.com/load-external-swfs-with-smooth-transition/" title="Load External SWFs With Smooth Transition">Load External SWFs With Smooth Transition</a></li><li><a href="http://www.webstylepress.com/buttons-control-in-flash/" title="Buttons Control In Flash">Buttons Control In Flash</a></li><li><a href="http://www.webstylepress.com/fonts-for-web-using-nice-and-clean-fonts-in-web-page/" title="Fonts For Web &#8211; Using Nice and Clean Fonts in Web Page">Fonts For Web &#8211; Using Nice and Clean Fonts in Web Page</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.webstylepress.com/how-to-control-font-size-in-percentage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sound Control In Flash &#8211; Tutorial and Downloads</title>
		<link>http://www.webstylepress.com/sound-control-in-flash/</link>
		<comments>http://www.webstylepress.com/sound-control-in-flash/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 08:44:51 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[loop]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.webstylepress.com/?p=182</guid>
		<description><![CDATA[We can import any sound of supported format into flash (Shortcut: Ctrl+R). After importing, you can find sound in Library panel and by dragging that at stage it will be added in timeline of movie. Other way is to click at timeline which will give you sounds panel in movie properties panel, if you have [...]<p><a href="http://www.webstylepress.com/sound-control-in-flash/">Sound Control In Flash &#8211; Tutorial and Downloads</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
]]></description>
			<content:encoded><![CDATA[<p>We can import any sound of supported format into flash (Shortcut: Ctrl+R). After importing, you can find sound in Library panel and by dragging that at stage it will be added in timeline of movie. Other way is to click at timeline which will give you sounds panel in movie properties panel, if you have imported sounds into your movie. You can select any sound from there and add into your movie. By selecting any sound it further provides some options of Effects and Sync. By effects you can select left or right channel sound or sound fade in, fade out effect. By Sync you can select event, start, stop, stream options for selected sound and loop option or repeat times . Event sound is normal while stream sound is streamed when movie is played, if the movie is paused then stream sound will be paused also. Stream sound option is for synchronizing sound with visual animation where you need sound along with animation effects. If you need a loop sound, and you have a music loop and you want it to be played again and again then select event or play and select repeat and put value of 999 in repeat times. If you select stream sound, you will have to add frames to the sound till it ends and also we do not give repeat times to a streaming sound usually.</p>
<p><span id="more-182"></span></p>
<p>Now lets get started. I have some cool sound implementation examples here.</p>
<h5>Simple Sound Control On/Off</h5>
<p>For simple sound control we need two buttons and two frames.<br />
One frame containing sound and second one empty with a blank keyframe.<br />
Now when we want to start a sound we need to click the button which will have a simple action<br />
i.e.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">gotoAndStop</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>While at frame 2 sound is placed and suppose that the loop and it will repeat on until it is stopped.</p>
<p>Now if we need to stop that sound then we need a button with the following actionscript</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">gotoAndStop</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">stopAllSounds</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>While frame number 3 is blank key frame. And we can implement this by creating a movie clip and these two frames, sound and buttons in that movie clip and that can be always available for whole movie and whenever we can trigger sound to be stopped or played.</p>
<p>This example is very basic and does not deals with advanced issues relating to sound. We can control sound by fancy bars, We can gradually decrease and increase sound level. Examples below explain  advanced control of sounds.</p>
<h5>Fade in Out, On/Off Single Sound</h5>
<p>- Single Sound<br />
- Sound exported from library<br />
- On/Off &#8211; Fade in out<br />
- Sound starts again at the point from where it was stopped before after fade out to fade in.</p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/fadeinoutsingle.rar'>Download Example</a></span></p>
<h5>Buttons Bar Rollover Sound Control</h5>
<p>- Exported from library<br />
- Fade in out<br />
- Plays from where it was stopped<br />
- Buttons rollover volume control</p>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/sound-buttons-on-off.jpg" alt="" title="sound-buttons-on-off" width="115" height="30" class="alignnone size-full wp-image-186" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/rolloverbuttonssound.rar'>Download Example</a></span></p>
<h5>Slider Sound Control With Button</h5>
<p>- Exported from library<br />
- Fade in out<br />
- Plays from where it was stopped<br />
- Sliderbar Control</p>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/slidervolumectrl.jpg" alt="" title="slidervolumectrl" width="90" height="36" class="alignnone size-full wp-image-190" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/slider1.rar'>Download Slider Volume Control</a></span></p>
<h5>On Off Text &#8211; Internal Sound &#8211; Cross Fade</h5>
<p>- Fades in out<br />
- Plays from where it was stopped<br />
- On Off text display<br />
- Single Button on off control</p>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/onoffcrossfadeflashsoundctr.jpg" alt="" title="onoffcrossfadeflashsoundctr" width="65" height="21" class="alignnone size-full wp-image-192" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/so1.rar'>Download Example</a></span></p>
<h5>Single Sound &#8211; Internal Sound &#8211; Cross Fade &#8211; Moving Bars</h5>
<p>- Fade in out<br />
- Plays from where it was stopped<br />
- Moving Bars<br />
- Single Button on off control</p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/so2.rar'>Download Example</a></span></p>
<h5>Single Sound &#8211; Internal Sound &#8211; Cross Fade &#8211; Static Bars</h5>
<p>- Fade in out<br />
- Plays from where it was stopped<br />
- Static Bars<br />
- Single Button on off control</p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/so3.rar'>Download Example</a></span></p>
<h5>Single Sound &#8211; Internal Sound &#8211; Vertical Bar Control</h5>
<p>- Vertical Bar control<br />
- Internal Sound</p>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/vbar.gif" alt="" title="vbar" width="373" height="197" class="alignnone size-full wp-image-197" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/vbar.rar'>Download Example</a></span></p>
<h5>Single Sound &#8211; Vertical Bar Control/On Off Button &#8211; Cross Fade &#8211; Moving Bars on off</h5>
<p>- Vertical Bar control + Button Control<br />
- Moving bars which behave with on off<br />
- Cross Fadeing Sound</p>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/advancedsoundctrl.gif" alt="" title="advancedsoundctrl" width="124" height="200" class="alignnone size-full wp-image-200" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/so4.rar'>Download Example</a></span></p>
<h5>Play External MP3 Sound Without Loading</h5>
<p>This Player has On, Off, Next, Forward buttons and can play many MP3 sounds from outside but it will not preload these sounds.</p>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/mp3externalload.gif" alt="" title="mp3externalload" width="274" height="31" class="alignnone size-full wp-image-201" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/playexternalmp3.rar'>Download Example</a></span></p>
<h5>Multiple Sounds CrossFade</h5>
<p>Multiple Sounds &#8211; Crossfade &#8211; Slider Bars &#8211; On Off Button</p>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/4-sounds.gif" alt="" title="4-sounds" width="200" height="121" class="alignnone size-full wp-image-203" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/4-sounds-crossfade.rar'>Download Example</a></span></p>
<h6>Sounds Tutorials Resources</h6>
<p><a rel="nofollow" target="_blank" href="http://kennybellew.cowfly.com/tutorial/index.html" target="_blank">http://kennybellew.cowfly.com/tutorial/index.html</a></p>
<h6>Equalizer Bars For Sound</h6>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/eq-bars-1.jpg" alt="" title="eq-bars-1" width="120" height="97" class="alignnone size-full wp-image-207" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/eq.rar'>Download Files</a></span></p>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/eq-bars-2.jpg" alt="" title="eq-bars-2" width="51" height="29" class="alignnone size-full wp-image-208" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/eq2.rar'>Download Files</a></span></p>
<p><a href="http://www.webstylepress.com/sound-control-in-flash/">Sound Control In Flash &#8211; Tutorial and Downloads</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.webstylepress.com/how-to-control-font-size-in-percentage/" title="How to Control Font Size in Percentage">How to Control Font Size in Percentage</a></li><li><a href="http://www.webstylepress.com/transition-between-sections-of-a-flash-movie/" title="Transition Between Sections of a Flash Movie">Transition Between Sections of a Flash Movie</a></li><li><a href="http://www.webstylepress.com/load-external-swfs-with-smooth-transition/" title="Load External SWFs With Smooth Transition">Load External SWFs With Smooth Transition</a></li><li><a href="http://www.webstylepress.com/buttons-control-in-flash/" title="Buttons Control In Flash">Buttons Control In Flash</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.webstylepress.com/sound-control-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transition Between Sections of a Flash Movie</title>
		<link>http://www.webstylepress.com/transition-between-sections-of-a-flash-movie/</link>
		<comments>http://www.webstylepress.com/transition-between-sections-of-a-flash-movie/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 06:36:25 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Control]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[smooth]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://www.webstylepress.com/?p=178</guid>
		<description><![CDATA[By just looking at the image, I think you will not get the whole idea about the function. You will have to download it to see working example. This is an explanation of how to animate different sections of a movie smoothly. When some button is clicked, the previous animation restores its original state or [...]<p><a href="http://www.webstylepress.com/transition-between-sections-of-a-flash-movie/">Transition Between Sections of a Flash Movie</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/trans-sections.jpg" alt="" title="trans-sections" width="300" height="133" class="alignnone size-full wp-image-179" /></p>
<p>By just looking at the image, I think you will not get the whole idea about the function. You will have to download it to see working example. This is an explanation of how to animate different sections of a movie smoothly. When some button is clicked, the previous animation restores its original state or disappears in a smooth way and after that new movie appears or gains the new position.</p>
<p><span id="more-178"></span></p>
<p>For example we have two movies, lets say a and b.<br />
these are at states 1.<br />
When we click at button a for movie a, it animate in some way and goes to state 2.<br />
When we click now at button b for movie b, then two actions are performed.<br />
Firstly animation state of movie a which is 2, will be back to 1.<br />
Secondly after first move, animation state of movie b which is 1, will be changed to 2.</p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/smooth.rar'>Download Smooth Transition Example</a></span></p>
<p><a href="http://www.webstylepress.com/transition-between-sections-of-a-flash-movie/">Transition Between Sections of a Flash Movie</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.webstylepress.com/load-external-swfs-with-smooth-transition/" title="Load External SWFs With Smooth Transition">Load External SWFs With Smooth Transition</a></li><li><a href="http://www.webstylepress.com/buttons-control-in-flash/" title="Buttons Control In Flash">Buttons Control In Flash</a></li><li><a href="http://www.webstylepress.com/how-to-control-font-size-in-percentage/" title="How to Control Font Size in Percentage">How to Control Font Size in Percentage</a></li><li><a href="http://www.webstylepress.com/random-bubble-animation-in-flash/" title="Create Random Bubble Animation In Flash">Create Random Bubble Animation In Flash</a></li><li><a href="http://www.webstylepress.com/flash-random-text-animation/" title="Create Flash Random 3D Text Animation">Create Flash Random 3D Text Animation</a></li><li><a href="http://www.webstylepress.com/flash-resources-and-tutorials/" title="Flash Resources and Tutorials">Flash Resources and Tutorials</a></li><li><a href="http://www.webstylepress.com/scrollbars-in-flash-flash-content-scroll/" title="Scrollbars In flash &#8211; Flash Content Scroll">Scrollbars In flash &#8211; Flash Content Scroll</a></li><li><a href="http://www.webstylepress.com/flash-mouse-effects/" title="Flash Mouse Effects">Flash Mouse Effects</a></li><li><a href="http://www.webstylepress.com/google-search-from-flash/" title="Google Search From Flash Using ActionScript">Google Search From Flash Using ActionScript</a></li><li><a href="http://www.webstylepress.com/flash-hit-counter/" title="Flash Hit Counter Using ActionScript and PHP">Flash Hit Counter Using ActionScript and PHP</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.webstylepress.com/transition-between-sections-of-a-flash-movie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Load External SWFs With Smooth Transition</title>
		<link>http://www.webstylepress.com/load-external-swfs-with-smooth-transition/</link>
		<comments>http://www.webstylepress.com/load-external-swfs-with-smooth-transition/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 06:20:31 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Control]]></category>
		<category><![CDATA[External Load]]></category>
		<category><![CDATA[external]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[load]]></category>
		<category><![CDATA[smooth]]></category>
		<category><![CDATA[transition]]></category>
		<category><![CDATA[unload]]></category>

		<guid isPermaLink="false">http://www.webstylepress.com/?p=174</guid>
		<description><![CDATA[In the following example I have taken two external swf movies which are called when buttons are clicked. The idea is to create a smooth transition effect between loading and unloading of flash external movies. I mean no jerks, no sudden appearance or disappearance of movie or any part of animation. When we click at [...]<p><a href="http://www.webstylepress.com/load-external-swfs-with-smooth-transition/">Load External SWFs With Smooth Transition</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/loadunloadmovie1.jpg" alt="" title="loadunloadmovie1" width="400" height="241" class="alignnone size-full wp-image-175" /></p>
<p>In the following example I have taken two external swf movies which are called when buttons are clicked. The idea is to create a smooth transition effect between loading and unloading of flash external movies. </p>
<p><span id="more-174"></span></p>
<p>I mean no jerks, no sudden appearance or disappearance of movie or any part of animation. When we click at button for other movie, previous movie will be closed after a transition effect and unload and then the new movie will appear after transition has been done.</p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/load1.rar'>Download Example</a></span></p>
<p><a href="http://www.webstylepress.com/load-external-swfs-with-smooth-transition/">Load External SWFs With Smooth Transition</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.webstylepress.com/transition-between-sections-of-a-flash-movie/" title="Transition Between Sections of a Flash Movie">Transition Between Sections of a Flash Movie</a></li><li><a href="http://www.webstylepress.com/load-external-files-into-flash/" title="Load External Files Into Flash">Load External Files Into Flash</a></li><li><a href="http://www.webstylepress.com/buttons-control-in-flash/" title="Buttons Control In Flash">Buttons Control In Flash</a></li><li><a href="http://www.webstylepress.com/how-to-control-font-size-in-percentage/" title="How to Control Font Size in Percentage">How to Control Font Size in Percentage</a></li><li><a href="http://www.webstylepress.com/random-bubble-animation-in-flash/" title="Create Random Bubble Animation In Flash">Create Random Bubble Animation In Flash</a></li><li><a href="http://www.webstylepress.com/flash-random-text-animation/" title="Create Flash Random 3D Text Animation">Create Flash Random 3D Text Animation</a></li><li><a href="http://www.webstylepress.com/flash-resources-and-tutorials/" title="Flash Resources and Tutorials">Flash Resources and Tutorials</a></li><li><a href="http://www.webstylepress.com/scrollbars-in-flash-flash-content-scroll/" title="Scrollbars In flash &#8211; Flash Content Scroll">Scrollbars In flash &#8211; Flash Content Scroll</a></li><li><a href="http://www.webstylepress.com/flash-mouse-effects/" title="Flash Mouse Effects">Flash Mouse Effects</a></li><li><a href="http://www.webstylepress.com/google-search-from-flash/" title="Google Search From Flash Using ActionScript">Google Search From Flash Using ActionScript</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.webstylepress.com/load-external-swfs-with-smooth-transition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buttons Control In Flash</title>
		<link>http://www.webstylepress.com/buttons-control-in-flash/</link>
		<comments>http://www.webstylepress.com/buttons-control-in-flash/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 19:38:59 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.webstylepress.com/?p=155</guid>
		<description><![CDATA[In Adobe Flash buttons are essential part and play specific role in control and animation of movie. I will explain here about how to animate the button or trigger a smooth animation by movie clip onmouseover of a button and onmouseout. We create an invisible button mostly and give it a target movie clip which [...]<p><a href="http://www.webstylepress.com/buttons-control-in-flash/">Buttons Control In Flash</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
]]></description>
			<content:encoded><![CDATA[<p>In Adobe Flash buttons are essential part and play specific role in control and animation of movie. I will explain here about how to animate the button or trigger a smooth animation by movie clip onmouseover of a button and onmouseout. We create an invisible button mostly and give it a target movie clip which is visible part of a button. When someone mouseover or mouseout from button then button trigger some animation into movie clip.</p>
<p>Button has four states; up, over, down, hit.<br />
Go inside the button by double clicking it and there you will find these states. When you place actual object (i.e. rectangle) at hit state, then it will not be visible. That&#8217;s how we create an invisible working button by placing its content at just hit state. Download example below for explanation.</p>
<p><span id="more-155"></span></p>
<h5>Target Animation Onmouseover and Onmouseout Event By Button</h5>
<h6>ActionScript</h6>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>rollOver<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">tellTarget</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;_root.movie&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">gotoAndPlay</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>rollOut<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">tellTarget</span> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;_root.movie&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">gotoAndPlay</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/btnexample.rar'>Download Button Example</a></span></p>
<h5>Events of a Button</h5>
<p>Following are some events of button on which we can trigger some animation.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>press, release, releaseOutside, rollOver, rollOut, dragOver, dragOut, keyPress <span style="color: #ff0000;">&quot;&lt;Enter&gt;&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h5>Button On Off Control &#8211; When One Button Is On (active), Others Are Off</h5>
<p>This is a complex bit of example. We mouse over a button and it goes down and we mouse out a button it goes up. What about on clicking button and it remains in down position? I mean what if we want to show the active state of a button and current state of navigation? On clicking any other button, previously pressed button gains normal state and newly clicked button goes down, in active state. Now that&#8217;s the control which a navigation must have. In following example I have used two buttons. On clicking one it remains in clicked state. When we click other, first one gains normal position and second one goes in clicked state.</p>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/btns-on-off.gif" alt="" title="btns-on-off" width="202" height="46" class="alignnone size-full wp-image-163" /></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/button-control-on-off.rar'>Download Button On Off Control Example</a></span></p>
<h5>MovieClip Moves With Button Click or Mouse Move Over Buttons</h5>
<p><img src="http://www.webstylepress.com/wp-content/uploads/2008/10/btn-moves.gif" alt="" title="btn-moves" width="178" height="40" class="alignnone size-full wp-image-165" /></p>
<p>Consider the image above. The current active button is about button. That black background is a movie clip behind the button. We can move this movie clip as we move mouse over different buttons or when we click at single button that black background will be dragged to the position behind that clicked button. Below are both examples in downloadable form.</p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/moviescroll-with-mouse_rolloverover.rar'>Download Button Roll over Example</a></span></p>
<p><span class="downloadfile"><a href='http://www.webstylepress.com/wp-content/uploads/2008/10/movie-scroll-with-btn-click.rar'>Download Button Clicked Example</a></span></p>
<p><a href="http://www.webstylepress.com/buttons-control-in-flash/">Buttons Control In Flash</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.webstylepress.com/flash-random-text-animation/" title="Create Flash Random 3D Text Animation">Create Flash Random 3D Text Animation</a></li><li><a href="http://www.webstylepress.com/flash-mouse-effects/" title="Flash Mouse Effects">Flash Mouse Effects</a></li><li><a href="http://www.webstylepress.com/flash-slide-shows/" title="Create Flash Slide Shows Using ActionScript &#8211; Example Downloads">Create Flash Slide Shows Using ActionScript &#8211; Example Downloads</a></li><li><a href="http://www.webstylepress.com/flash-window-or-movie-move-dragable-content/" title="Flash Window or Movie Move &#8211; Dragable Content Using ActionScript">Flash Window or Movie Move &#8211; Dragable Content Using ActionScript</a></li><li><a href="http://www.webstylepress.com/flash-login-system/" title="Create Flash Login System using ActionScript">Create Flash Login System using ActionScript</a></li><li><a href="http://www.webstylepress.com/counting-in-flash-flash-counter/" title="Counting In Flash &#8211; Flash Counter">Counting In Flash &#8211; Flash Counter</a></li><li><a href="http://www.webstylepress.com/flash-go-to-frame-actionscript/" title="Flash &#8211; Go To Frame ActionScript">Flash &#8211; Go To Frame ActionScript</a></li><li><a href="http://www.webstylepress.com/date-and-time-in-flash/" title="Date and Time In Flash">Date and Time In Flash</a></li><li><a href="http://www.webstylepress.com/image-transitions-effects-and-particle-systems-in-adobe-flash/" title="Image Transitions &#8211; Effects and Particle Systems In Adobe Flash">Image Transitions &#8211; Effects and Particle Systems In Adobe Flash</a></li><li><a href="http://www.webstylepress.com/flash-tooltips/" title="Flash Tooltips &#8211; Tutorial and Example Download">Flash Tooltips &#8211; Tutorial and Example Download</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.webstylepress.com/buttons-control-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

