<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Web Design Tutorials &#187; Flash CS4 Tutorial</title>
	<atom:link href="http://bestwebdesignz.com/tips/category/flash-cs4-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://bestwebdesignz.com/tips</link>
	<description></description>
	<lastBuildDate>Fri, 30 Jul 2010 09:47:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Load External swf as2</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/load-external-swf-as2/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/load-external-swf-as2/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 07:17:29 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=2308</guid>
		<description><![CDATA[This entry is part 31 of 31 in the series Flash CS4 TutorialsIn this tutorial you will learn how to load an external swf file in Flash using Action Script 2.0 (AS2).
We will create a button on the main timeline, clicking which will load up the external swf file as well as a close button. [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 31 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>In this tutorial you will learn how to load an external swf file in Flash using Action Script 2.0 (AS2).</p>
<p>We will create a button on the main timeline, clicking which will load up the external swf file as well as a close button. Clicking the close button will unload the external swf file and cause the close button to disappear.</p>
<p>Let&#8217;s begin!</p>
<p>Let&#8217;s assume the external swf file is named &#8216;external.swf&#8217;</p>
<p>1. In the main timeline create a button. You can put the text &#8216;Click Me&#8217; on this button.</p>
<p>2. On the &#8216;Click Me&#8217; button put the following AS2 code:</p>
<p>on (Release) {<br />
_root.mymc._visible = true;<br />
_level0.mymc.holder_mc.loadMovie(&#8220;external.swf&#8221;);<br />
}</p>
<p>2. In the main timeline create a movie clip called &#8216;mymc&#8217;</p>
<p>3. Within &#8216;mymc&#8217; create another movie clip called &#8216;holder_mc&#8217; and a button. You can put the text &#8216;close&#8217; on this button.</p>
<p>4. On the close button put the following AS2 code:</p>
<p>on (Release) {<br />
_root.mymc._visible = false;<br />
_level0.mymc.holder_mc.unloadMovie(&#8220;external.swf&#8221;);<br />
}</p>
<p>That&#8217;s it!</p>
<p><a href="/tutorials/LoadExternalSWF.zip" target="_blank">You can download the .fla file for this tutorial here</a></p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/load-external-swf-as2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
		<item>
		<title>How to load pictures in flash CS4 dynamically using the loader component</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-load-pictures-in-flash-cs4-dynamically-using-the-loader-component/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-load-pictures-in-flash-cs4-dynamically-using-the-loader-component/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 07:27:57 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>
		<category><![CDATA[How to load pictures in flash CS4 dynamically using the loader component]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=1986</guid>
		<description><![CDATA[This entry is part 30 of 31 in the series Flash CS4 TutorialsHow to load pictures in flash CS4 dynamically using the loader component.
In this tutorial we will learn how to load your pictures into flash dynamically using the loader component.  The pictures I am going to work with is 500 pixels wide and [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 30 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>How to load pictures in flash CS4 dynamically using the loader component.</p>
<p>In this tutorial we will learn how to load your pictures into flash dynamically using the loader component.  The pictures I am going to work with is 500 pixels wide and 375 pixels height, so I am going to make the stage the same size. So click on the stage and go to properties panel and click on the size and change the size to 500&#215;375 width and height as shown below.</p>
<p><img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/04/image0022-300x114.jpg" alt="How to load pictures in flash CS4 dynamically using the loader component" title="How to load pictures in flash CS4 dynamically using the loader component" width="300" height="114" class="alignnone size-medium wp-image-1987" /></p>
<p>Now I am going to drag the loader component to the stage, so click on the windows in the main menu -> components -> loader, and drag it on stage as shown below.</p>
<p><img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/04/image0033-300x291.png" alt="How to load pictures in flash CS4 dynamically using the loader component" title="How to load pictures in flash CS4 dynamically using the loader component" width="300" height="291" class="alignnone size-medium wp-image-1988" /> </p>
<p>I am going to make it the same size as the stage and images ie:500&#215;375, so click on the loader component and in your properties panel adjust the size to 500&#215;375 with the ‘x’ and ‘y’ axis positioned at zero, so that it covers the entire stage, and give the loader an instance name and call it “myloader” as shown below.</p>
<p><img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/04/image0052.png" alt="How to load pictures in flash CS4 dynamically using the loader component" title="How to load pictures in flash CS4 dynamically using the loader component" width="287" height="215" class="alignnone size-full wp-image-1989" /></p>
<p>And we are going to call this layer pictures.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/04/image0071.png" alt="How to load pictures in flash CS4 dynamically using the loader component" title="How to load pictures in flash CS4 dynamically using the loader component" width="253" height="232" class="alignnone size-full wp-image-1990" /></p>
<p>Now your swf and the fla files have to be in the same directory as where your images are, so save your files in the directory where your images are stored. The advantage of doing this is, you are not loading your images along with your entire website, it is being called for externally, this way your flash loader takes less time to load.<br />
Now create two buttons, name the first one as “1” and the second one as “2”, so lock the pictures layer and create another layer and call it buttons, make a round shape with the number “1” in it, and make another round shaped button with the number “2” in it. And bring it to either side of the stage, ie; one on the left extreme and the other on the right extreme. </p>
<p><img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/04/image0091-300x68.png" alt="How to load pictures in flash CS4 dynamically using the loader component" title="How to load pictures in flash CS4 dynamically using the loader component" width="300" height="68" class="alignnone size-medium wp-image-1991" /></p>
<p>Now click F8 and convert the symbol into button and call it btn_1 and btn_2 respectively as shown below.</p>
<p><img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/04/image011-300x82.png" alt="How to load pictures in flash CS4 dynamically using the loader component" title="How to load pictures in flash CS4 dynamically using the loader component" width="300" height="82" class="alignnone size-medium wp-image-1992" /></p>
<p>Now we are going to add codes to these buttons, so that when number ‘1’ button is clicked the image1 loads and when the button ‘2’ is clicked the image2 loads. This way the flash does not take a long time to load, it loads first and then calls for the images when clicked on buttons.</p>
<p><img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/04/image013-300x79.png" alt="How to load pictures in flash CS4 dynamically using the loader component" title="How to load pictures in flash CS4 dynamically using the loader component" width="300" height="79" class="alignnone size-medium wp-image-1993" /></p>
<p>In the action script, you are basically commanding that on release of the button, it calls for the instance name ie: myloader in this instance and the contentPath you defined is the image you are calling for as shown above.</p>
<p>Test your movie and you will notice that the flash CS4 loads faster, and only on clicking the buttons, it will display the image you have defined in your action script.<br />
You now know how to load pictures in flash CS4 dynamically using the loader component.</p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-load-pictures-in-flash-cs4-dynamically-using-the-loader-component/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
		<item>
		<title>How to create a basic layout in Flash CS4</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-create-a-basic-layout-in-flash-cs4/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-create-a-basic-layout-in-flash-cs4/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 09:59:54 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>
		<category><![CDATA[How to create a basic layout in Flash CS4]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=1928</guid>
		<description><![CDATA[This entry is part 29 of 31 in the series Flash CS4 TutorialsTo create a layout in flash CS4, first you need flash CS4 software, ideally I would recommend that you make a layout of what is in your mind on a white paper, as to the size, the color, the font, the navigation links [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 29 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>To create a layout in flash CS4, first you need flash CS4 software, ideally I would recommend that you make a layout of what is in your mind on a white paper, as to the size, the color, the font, the navigation links you want, where to place them etc.,</p>
<p>Open the flash CS4 ->File -> New (shortcut key is Ctrl+N)<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image001.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="171" height="78" class="alignnone size-full wp-image-1929" /></p>
<p>You will see a white stage, you can change the size and color by clicking on Modify on the main menu and clicking on Document (shortcut key is Ctrl+J)<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image003-300x72.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="72" class="alignnone size-medium wp-image-1930" /></p>
<p>You can choose the size of your flash CS4 website, here in this example I have chosen 700 pixels width and 500 pixels height and chosen #FFD7BB (beige color as background) with frame rate 30 fps as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image006-300x169.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="169" class="alignnone size-medium wp-image-1931" /></p>
<p>Let us create a background rectangle for the site, so turn on the fill color and turn of the stroke color like this one below and choose one color from the color panel. I have chosen white color #FFFFFF.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image007.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="55" height="52" class="alignnone size-full wp-image-1932" /><br />
Now choose the rectangle tool<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image009.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="34" height="22" class="alignnone size-full wp-image-1933" /><br />
and create a rectangle with 650 pixel width  and 500 pixel height as shown below.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image011-300x265.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="265" class="alignnone size-medium wp-image-1934" /></p>
<p>Now let us create a movie clip, click on the white banner on stage and press F8 and name the movie clip “main” and select movie clip and press OK like this one below:<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image013-300x110.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="110" class="alignnone size-medium wp-image-1935" /></p>
<p>Having created the main movie-clip, double click on the main movie-clip and create another movie-clip and call it “background” and press OK like this one below.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image015-300x116.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="116" class="alignnone size-medium wp-image-1936" /></p>
<p>Having done this, double click on background movie-clip and using your selection tool<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image017.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="37" height="26" class="alignnone size-full wp-image-1937" /><br />
Drag over 75 percent of the stage downwards like this one below:<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image019-300x218.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="218" class="alignnone size-medium wp-image-1938" /><br />
Click on the highlighted portion of the stage and click on the fill color and choose any color of your choice. I have chosen (#333333) a dark grey color.</p>
<p>Now having created the background movie-clip,<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image021.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="246" height="68" class="alignnone size-full wp-image-1939" /><br />
go back on the main movie-clip by clicking on “main” circled in red as shown above and name the layer which has the background movie-clip as background and add two more layers and call one “content” and another one “buttons”. To add layers you have to click on the icon circled in red below.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image023.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="193" height="224" class="alignnone size-full wp-image-1940" /></p>
<p>Let us add some content by using the text tool<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image025.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="27" height="24" class="alignnone size-full wp-image-1941" /><br />
Choose the font style I have chosen Ariel Black with font size as 20 as shown below:<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image027.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="252" height="150" class="alignnone size-full wp-image-1942" /> </p>
<p>Type “ABOUT US” and convert it into a symbol by pressing F8 and call it “Content” as shown below.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image030-300x160.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="160" class="alignnone size-medium wp-image-1943" /><br />
Now double click on “ABOUT US” you will enter the content movie-clip and rename that layer as sections as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image032-295x300.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="295" height="300" class="alignnone size-medium wp-image-1944" /><br />
Add a sub-heading if you want, below “ABOUT US” in a smaller font say 16 pixels and call “CEO”. Then add some content under the CEO with the fonts and sizes that I have selected from the character properties.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image033.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="254" height="144" class="alignnone size-full wp-image-1945" /><br />
Now let us go ahead and add an image and optimize it. When importing images (File > Import > Import to Stage) into flash you have the ability to optimize them, It&#8217;s good to optimize your images from within flash, because you can tweak their quality whenever you want, without having to open them up again in an image editing program. So the file extension  usually use for images is PNG, which provides a high quality image. So below you can see an image, that I have imported, as the featured item of the Flash site.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image036-300x135.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="135" class="alignnone size-medium wp-image-1946" /></p>
<p>Now that we have imported the image on stage and optimized it, let us convert the image into a button, that opens up a browser window, now convert the flower image into a movie clip symbol and call it flowerMC, so press F8 and name it flowerMC and check on movie clip  and click on OK.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image038-300x166.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="166" class="alignnone size-medium wp-image-1947" /> </p>
<p>Now you can give the movie clip an instance name, call it flower from the properties panel as shown below.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image039.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="279" height="81" class="alignnone size-full wp-image-1948" /></p>
<p>The image can now be given some functionality by referring to the instance name. In the content movie clip, create a new layer called script and click on the 1st frame of the layer. </p>
<p>Open up the actions panel and enter the code shown below. </p>
<p>Flower.onRelease = function(){<br />
	getURL(http://www.bestwebdesignz.com, “blank”)<br />
}</p>
<p>This code refers to the image, using the instance name &#8216;flower&#8217;, giving it an onRelease function. So when ever the image is pressed and release, it can be told to do something. In this case, it is  told to open up a browser window (getURL), using the address bestwebdesignz. We also have to add a stop action, because we are about to create more frames in the content movie clip<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image042-300x55.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="55" class="alignnone size-medium wp-image-1949" /></p>
<p>Now go ahead and add the rest of the content. We will be creating some buttons later, which. when clicked, will display the corresponding section. In the content MC we are  going to create each section at a different frame. So when one of the buttons is clicked, the content MC will go to the frame with the respective content on. To do this, we are going to give each section a label that we can tell the content MC to go to. So, create a new layer called &#8216;labels&#8217;, in-between the script and section layer. Click on the first frame of the labels layer and, at the properties panel, enter &#8216;about&#8217; under &#8216;frame&#8217; circled in red as shown below:<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image044-232x300.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="232" height="300" class="alignnone size-medium wp-image-1950" /><br />
Select the 10th frame of all the layers and then insert key frames for each layer press F6 or right click and select insert key frames as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image045-300x149.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="149" class="alignnone size-medium wp-image-1951" /><br />
On the 10th frame, of the labels layer, add another label called &#8220;portfolio&#8221;. You can add more frames, extending them to frame 20, by using f5 while layer 10 of all frames is selected.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image047-300x118.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="118" class="alignnone size-medium wp-image-1952" /><br />
Change all the text to suit this section and add the first thumbnail for your portfolio as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image050-300x151.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="151" class="alignnone size-medium wp-image-1953" /><br />
Convert the image to an MC called &#8216;thumbnail2&#8242;<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image052-300x100.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="100" class="alignnone size-medium wp-image-1954" /><br />
You can add as many thumbnails you want, also converting them to Movie clip s called thumbnail1, thumbnail2, thumbnail3 and so on. Then give the thumbnail2 movie clip  the same instance name, which we will use to give some functionality. Do the same with each of the other thumbnails, giving thumbnail3 movie clip  the instance name &#8216;thumbnail3&#8242; etc.</p>
<p>Click on frame 10 of the script layer and open up the Actions panel. As we did with the featured image, add the code show below, this time swapping the URL address for what ever you want the thumbnails to open up as shown below.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image054-300x100.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="100" class="alignnone size-medium wp-image-1955" /> </p>
<p>Thumbnail2.onRelease =  function() {<br />
	getURL(“http://www.bestwebdesignz.com/tips/fireworks/fireworks-website-templates”,”_blank”)<br />
}</p>
<p>Thumbnail3.onRelease =  function() {<br />
	getURL(“http://wwwbestwebdesignz.com/tips/oscommerce/best-oscommerce-templates/”,”_blank”)<br />
}</p>
<p>Thumbnail4.onRelease =  function() {<br />
	getURL(“http://www.bestwebdesignz.com/tips/wordpress/best-wordpress-templates/”,”_blank”)<br />
}</p>
<p>Thumbnail5.onRelease =  function() {<br />
	getURL(“http://www.bestwebdesignz.com/tips/zen-cart-tutorials/best-zen-cart-e-store-template-themes/”,”_blank”)<br />
}</p>
<p>Add another section, create another key frame by pressing F6 at frame 20 of all the layers. Create a label for the 3rd section. As you can see we have called it &#8217;services&#8217;<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image055-300x98.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="98" class="alignnone size-medium wp-image-1956" /><br />
Now that we have all the sections in the content movie clip , go back to the main movie clip  and give the content movie clip  an instance name. We can then use the instance name to control the content movie clip.</p>
<p>Now we are going to create some buttons to tell the content movie clip how to go to the corresponding label. On the button layer, select the rectangle tool and draw a rectangle on stage using the same color as the background.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image057-300x172.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="172" class="alignnone size-medium wp-image-1957" /><br />
Convert the rectangle into a movie clip by pressing F8  and call it “BT background”.<br />
We can now use the instance of BT background movie clip for each button. So copy and paste it besides the first one, do it for 3 times, since we have created 3 web pages (About, Portfolio, Services) then convert the first movie clip into another button symbol by pressing F8 and call it “about”,  this button will be used to tell the content movie clip to go to the &#8216;about&#8217; label, repeat the same process for the portfolio page as well as the services page as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image059-300x73.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4." width="300" height="73" class="alignnone size-medium wp-image-1958" /><br />
Double click on the first button symbol and create a new layer and add the text &#8216;about&#8217; , repeat the same procedure for portfolio and services button, as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image062-300x125.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4" width="300" height="125" class="alignnone size-medium wp-image-1959" /><br />
Now create a layer called &#8220;script&#8221;, above the buttons layer in the main movie clip. Open up the Actions panel and add the action script as shown below. This script gives each button functionality, so that when they are pressed, the content movie clip goes to the corresponding pages.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image063-300x124.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4" width="300" height="124" class="alignnone size-medium wp-image-1960" /></p>
<p>And now for the  final stage of the tutorial to create a basic Flash website, we are going to create a pre-loader for the website, go back to root of the time, where the &#8216;Main&#8217; movie clip is, and move the first frame, to frame 2 as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image066.jpg" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4" width="264" height="255" class="alignnone size-full wp-image-1961" /><br />
Now make a text field on the first frame, with the text &#8220;loading&#8221;, and convert the text field by pressing F8 to a movie clip called &#8216;loader&#8217;. Double click on the &#8216;loader&#8217; movie clip  and create a second text field on the right, with the text &#8220;99%&#8221;. From the properties panel the text has been made &#8220;dynamic&#8221;, and a var (variable) has been given to it called &#8220;percent&#8221;. When the website is preloading, this variable will hold the percent value that is loaded so far, and it will be displayed in the dynamic text field.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image067-300x251.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4" width="300" height="251" class="alignnone size-medium wp-image-1962" /><br />
Now go back to the root timeline, instead of placing the code on a frame in the timeline, put it on the loader movie clip by clicking on it, opening up the Actions Panel, and then entering the code, shown below. This block of action script will check to see how much of the website has loaded and display the percentage in the text, using the variable. Once all of it is loaded, the timeline will go to frame 2, and the site will be displayed.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image069-300x189.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4" width="300" height="189" class="alignnone size-medium wp-image-1963" /><br />
Last but not the least, on the first frame of the root timeline (Scene1) insert a layer called script and place a stop() action in the action script as shown below.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/03/image071-300x214.png" alt="How to create a basic layout in Flash CS4" title="How to create a basic layout in Flash CS4" width="300" height="214" class="alignnone size-medium wp-image-1964" /><br />
That’s it, you now know how to create a basic website in flash CS4. </p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-create-a-basic-layout-in-flash-cs4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
		<item>
		<title>How to create a scroll bar in Flash CS4</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-create-a-scroll-bar-in-flash-cs4/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-create-a-scroll-bar-in-flash-cs4/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 08:24:24 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>
		<category><![CDATA[How to create a scroll bar in Flash CS4]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=1923</guid>
		<description><![CDATA[This entry is part 28 of 31 in the series Flash CS4 TutorialsHow to create a scroll bar in Flash CS4.
When you want to create a scroll bar in flash CS4, first go to the place where you want the scroll bar to show, click on that item and you can create one by clicking [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 28 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>How to create a scroll bar in Flash CS4.</p>
<p>When you want to create a scroll bar in flash CS4, first go to the place where you want the scroll bar to show, click on that item and you can create one by clicking on windows in the main menu-> Components-> UIScrollBar as shown below:<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image002-300x38.jpg" alt="How to create a scroll bar in Flash CS4" title="How to create a scroll bar in Flash CS4" width="300" height="38" class="alignnone size-medium wp-image-1926" /><br />
You can resize the scroll bar by clicking on the properties window and increasing or decreasing the height and width of it.</p>
<p>That’s it, you now know how to create a scroll bar in Flash CS4.</p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-create-a-scroll-bar-in-flash-cs4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
		<item>
		<title>How to make an image big on rollover in flash CS4</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-make-an-image-big-on-rollover-in-flash-cs4/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-make-an-image-big-on-rollover-in-flash-cs4/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 07:57:55 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>
		<category><![CDATA[How to make an image big on rollover in flash CS4]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=1910</guid>
		<description><![CDATA[This entry is part 10 of 31 in the series Flash CS4 TutorialsHow to make an image big on rollover in flash CS4.
First of all you need to have the same image of two different sizes and save it in your directory.
Open  flash CS4, and import an image on the centre stage, by going [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 10 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>How to make an image big on rollover in flash CS4.</p>
<p>First of all you need to have the same image of two different sizes and save it in your directory.</p>
<p>Open  flash CS4, and import an image on the centre stage, by going to the main menu file-> Import -> Import to Stage, as shown below,<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image0011-300x63.png" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="300" height="63" class="alignnone size-medium wp-image-1911" /></p>
<p>In this case I have imported the smaller sized image to the stage. You can save your file, in this case I have saved it as rollover and it will by-default be saved as a .fla file.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image0041.jpg" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="300" height="212" class="alignnone size-full wp-image-1912" /><br />
Now click on the image and Press F8 to create a button, call it a name and press ok!<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image005-300x113.png" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="300" height="113" class="alignnone size-medium wp-image-1913" /></p>
<p>You will see a blue outlined with a small circle in the middle of the image as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image008-300x186.jpg" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="300" height="186" class="alignnone size-medium wp-image-1914" /><br />
Double click on the button, you will enter the button mode as shown below.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image009.png" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="187" height="49" class="alignnone size-full wp-image-1915" /> </p>
<p>Your button mode will have something like this shown below, your layer will be called by-default Layer1, and you will have an up, over, down and hit area in the button.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image011-300x193.png" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="300" height="193" class="alignnone size-medium wp-image-1916" /></p>
<p>Click on the over and right click your mouse and create a blank keyframe like this shown below<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image013-300x76.png" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="300" height="76" class="alignnone size-medium wp-image-1917" /><br />
Repeat the same for the hit area also, now as you scrub the timeline over all the four modes you will be able to see the orange tag moving with it.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image015-300x58.png" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="300" height="58" class="alignnone size-medium wp-image-1918" /></p>
<p>Now click on the hit area and draw a rectangle in the centre of stage as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image017.png" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="263" height="243" class="alignnone size-full wp-image-1919" /></p>
<p>Now click on the Over area and import the bigger image to the centre of stage as shown below.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image019-300x58.png" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="300" height="58" class="alignnone size-medium wp-image-1920" /><br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image022-300x215.jpg" alt="How to make an image big on rollover in flash CS4" title="How to make an image big on rollover in flash CS4" width="300" height="215" class="alignnone size-medium wp-image-1921" /></p>
<p>Now test the movie by going to the control menu on the main menu and selecting the test movie or you can also press Ctrl+Enter, a .swf file will be created, in this case rollover.swf will be created and you will notice that the image becomes larger on rollover.</p>
<p>That’s it, you now know how to make an image big on rollover in flash CS4.</p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-make-an-image-big-on-rollover-in-flash-cs4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
		<item>
		<title>How to put your favorite icon in the browser</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-put-your-favorite-icon-in-the-browser/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-put-your-favorite-icon-in-the-browser/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 08:44:52 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>
		<category><![CDATA[How to put your favorite icon in the browser]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=1899</guid>
		<description><![CDATA[This entry is part 27 of 31 in the series Flash CS4 TutorialsHow to put your favorite icon in the browser.
First of all you need to have an icon for your website to put in your browser.
Then go to this site below:
http://www.favicon.cc/
On your left side you will see Create New Favicon, click on the Import [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 27 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>How to put your favorite icon in the browser.</p>
<p>First of all you need to have an icon for your website to put in your browser.<br />
Then go to this site below:</p>
<p>http://www.favicon.cc/</p>
<p>On your left side you will see Create New Favicon, click on the Import Image button.<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image001.png" alt="How to put your favorite icon in the browser" title="How to put your favorite icon in the browser" width="230" height="231" class="alignnone size-full wp-image-1903" /></p>
<p>Then browse to where your file is, it could be a jpg, gif or a png, it could be any size. After you select your image, check on keep dimensions and click on upload, as shown below:<br />
 <img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image004-300x188.jpg" alt="How to put your favorite icon in the browser" title="How to put your favorite icon in the browser" width="300" height="188" class="alignnone size-medium wp-image-1904" /><br />
After your image has been uploaded, just below the Import Image, you will find Preview, now click on the Download Favicon button and save it. By default it will be saved as favicon.ico, you can call it any name you want, now go to ftp and upload the favicon.ico.<br />
<img src="http://bestwebdesignz.com/tips/wp-content/uploads/2010/02/image006.jpg" alt="How to put your favorite icon in the browser" title="How to put your favorite icon in the browser" width="240" height="219" class="alignnone size-full wp-image-1905" /> </p>
<p>That’s it, you now know how to create a favorite icon on your browser.</p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-put-your-favorite-icon-in-the-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
		<item>
		<title>How to get an url in a blank window in an xml file</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-get-an-url-in-a-blank-window-in-an-xml-file/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-get-an-url-in-a-blank-window-in-an-xml-file/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 05:37:35 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=1890</guid>
		<description><![CDATA[This entry is part 26 of 31 in the series Flash CS4 TutorialsHow to get an url in a blank window in a xml file
Open the XML file in Notepad or Dreamweaver CS4, I prefer to open in Dreamweaver CS4
Save the XML file and run the index.html in your browser, you will notice that the [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 26 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>How to get an url in a blank window in a xml file</p>
<p>Open the XML file in Notepad or Dreamweaver CS4, I prefer to open in Dreamweaver CS4</p>
<p>Save the XML file and run the index.html in your browser, you will notice that the url ie;bestwebdesignz.com will open in a new window.</p>
<p>Put down the following code inside &#8220;<>&#8220;:<br />
a href=&#8221;http://www.bestwebdesignz.com/&#8221; target=&#8221;_blank&#8221;<u>BESTWEBDESIGNZ.COM</u></p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-get-an-url-in-a-blank-window-in-an-xml-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
		<item>
		<title>How to get an url in a blank window in a flash CS4 action script</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-get-an-url-in-a-blank-window-in-a-flash-cs4-action-script/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-get-an-url-in-a-blank-window-in-a-flash-cs4-action-script/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 04:51:34 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=1867</guid>
		<description><![CDATA[This entry is part 25 of 31 in the series Flash CS4 TutorialsYou will have to create an button by pressing F8 and put the action script in the actions frame.
on (release) {
                  getURL(&#8220;http://www.bestwebdesignz.com&#8221;,&#8221;_blank&#8221;);
}
Run movie clip and test [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 25 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>You will have to create an button by pressing F8 and put the action script in the actions frame.</p>
<p>on (release) {<br />
                  getURL(&#8220;http://www.bestwebdesignz.com&#8221;,&#8221;_blank&#8221;);<br />
}</p>
<p>Run movie clip and test it, when you click on the button you will be directed to the website described in the getURL function ie; bestwebdesignz.com which opens in a blank window.</p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-get-an-url-in-a-blank-window-in-a-flash-cs4-action-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
		<item>
		<title>How to create a pop up window in flash CS4 using javascript</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-create-a-pop-up-window-in-flash-cs4-using-javascript/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-create-a-pop-up-window-in-flash-cs4-using-javascript/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 08:29:33 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>
		<category><![CDATA[How to create a pop up window in flash CS4 using javascript]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=1570</guid>
		<description><![CDATA[This entry is part 24 of 31 in the series Flash CS4 TutorialsHow to create a pop up window in flash CS4 using javascript
We are not going to focus on the simple pop-up window in flash, there is a way in your action script that you can watch a very simple pop-up window but you [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 24 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>How to create a pop up window in flash CS4 using javascript</p>
<p>We are not going to focus on the simple pop-up window in flash, there is a way in your action script that you can watch a very simple pop-up window but you don’t have any control over the properties of that window, you can’t adjust the width and height, you can’t turn off the scroll bars or the menu bar.<br />
So using flash CS4 let us draw a simple button as shown below.<br />
<img class="alignnone size-full wp-image-1571" title="How to create a pop up window in flash CS4 using javascript" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/08/image001.png" alt="How to create a pop up window in flash CS4 using javascript" width="246" height="74" /><br />
and let us call the instances of the button click_btn as shown below.<br />
<img class="alignnone size-full wp-image-1572" title="How to create a pop up window in flash CS4 using javascript" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/08/image003.png" alt="How to create a pop up window in flash CS4 using javascript" width="277" height="80" /></p>
<p>on one layer and call that layer button,<br />
<img class="alignnone size-full wp-image-1573" title="How to create a pop up window in flash CS4 using javascript" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/08/image005.png" alt="How to create a pop up window in flash CS4 using javascript" width="188" height="66" /></p>
<p>Now go to our actions layers and click on frame1 and press F9 to open up our actions we have this code written<br />
<img class="alignnone size-full wp-image-1574" title="How to create a pop up window in flash CS4 using javascript" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/08/image007.png" alt="How to create a pop up window in flash CS4 using javascript" width="483" height="131" /></p>
<p>As you can see the click_btn is the instance of the button and then onRelease means that when you click on it, you will run this function ie;  geturl http://bestwebdesignz.com.</p>
<p>In simple words, anything within the curly bracket {} is going to be executed when clicked on the button.<br />
Well if you want bestwebdesignz.com to open up in a different window, you have to write it with a coma after the bestwebdesignz.com and in quotes “_blank” like you see above. This would open up the bestwebdesignz.com in a brand new pop-up window.</p>
<p>But as we told you before  you don’t have any control over the properties of that window, you can’t adjust the width and height, you can’t turn off the scroll bars, location bar or the menu bar etc.,</p>
<p>So to do all of this we have to use JavaScript, unfortunately you cant do it in flash cs4 along, so we have to use flash cs4 in conjunction with JavaScript, so we will rewrite our action script, instead of writing the http://bestwebdesignz.com, _blank etc.,</p>
<p>So we are using the same url function, but in-between our quotation marks we are not typing in just the url, but we are typing in a JavaScript function and later on we are going to publish the swf file and the html file and in that html file we are going to write a java script function and in that getURL function we are going to call the JavaScript function  the name of our function click, and we are going to send our function to an url which is bestwebdesignz.com<br />
<img class="alignnone size-full wp-image-1575" title="How to create a pop up window in flash CS4 using javascript" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/08/image009.png" alt="How to create a pop up window in flash CS4 using javascript" width="617" height="139" /></p>
<p>Before we go further let us go ahead and save this file and lets us call this popup.fla<br />
Now go to file on the main menu in flash cs4 and select the publish settings and check on flash and html boxes and click on publish and ok.<br />
<img class="alignnone size-full wp-image-1576" title="How to create a pop up window in flash CS4 using javascript" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/08/image011.png" alt="How to create a pop up window in flash CS4 using javascript" width="369" height="198" /><br />
Now we need to go to our html function, so open up notepad and go to the directory, you will see a swf, fla and html files and open selecting all files and click on the popup.html file, you will see codes written.</p>
<p>Go to the code where the title ends and the head starts and insert some blank spaces and insert our function, so in order to type in your JavaScript into your html, we first need a script tag and language=JavaScript, write JavaScript in quotation marks and skip a couple of lines and close the script tag. Now inside the script tags we will write our functions, it is pretty much similar to the way you declare a function in action script, so type in function and write the name of your function, in this instance it is click and inside the click function, we are going to create a variable, because this click function is receiving a variable, we will call  the variable page.</p>
<p>Now just like action script any function should be within a curly bracket so we are going to create a java script to open up in a new window, so we will create another variable and call it openwin and set this equal to this open which is used to open a new window and in corenthesis you must call for the url ( ie: bestwebdesignz.com) so type in page first, then type in the title of the page in quotation, and then a list of all the properties that the new window we are opening up in quotations. Then lets us say we want to turn off the tool bar, so type in toolbar=no, then turn off the menu bar, so type in menubar=no, you also want to turn off the scroll bar, to type in scrollbars=no, if you want to turn off the location bar, type locationbar=no, and now type in your width and height, to type in width=550 and lets say you want the height=250, and also if you want to specify where you want your popup to appear on your screen you can type top=250 and left=250.</p>
<p>So remember the open function is expecting three things, first is the page variable which is the url, secondly the title of your url, and finally our properties variable.<br />
<img class="alignnone size-full wp-image-1577" title="How to create a pop up window in flash CS4 using javascript" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/08/image013.png" alt="How to create a pop up window in flash CS4 using javascript" width="644" height="272" /></p>
<p>After this you need to upload this file to your server and test this movie clip, we need to upload this because of security sense in flash, that is why we cannot test it locally.</p>
<p>So save the popup.html file, and upload the html file and swf file to your server, having uploaded, switch to your browser window and type in your url, you will see the page there. You will see the button there, when you click on it, your url will be called for, like in this case, bestwebdesignz.com will popup. That’s it.</p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/how-to-create-a-pop-up-window-in-flash-cs4-using-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
		<item>
		<title>Learn to create a customizable pop-up window using Flash CS4.</title>
		<link>http://bestwebdesignz.com/tips/flash-cs4-tutorial/learn-to-create-a-customizable-pop-up-window-using-flash-cs4/</link>
		<comments>http://bestwebdesignz.com/tips/flash-cs4-tutorial/learn-to-create-a-customizable-pop-up-window-using-flash-cs4/#comments</comments>
		<pubDate>Wed, 27 May 2009 10:01:16 +0000</pubDate>
		<dc:creator>clement</dc:creator>
				<category><![CDATA[Flash CS4 Tutorial]]></category>
		<category><![CDATA[Learn to create a customizable pop-up window using Flash CS4.]]></category>

		<guid isPermaLink="false">http://bestwebdesignz.com/tips/?p=863</guid>
		<description><![CDATA[This entry is part 23 of 31 in the series Flash CS4 TutorialsWe are going to learn how to create pop-up windows in Flash CS4 using Action Script 2.0.
Create a new Flash AS 2.0 document:
File &#62; New &#62; Flash File (ActionScript 2.0)
If you have already created a Flash AS 3.0 file you will need change [...]]]></description>
			<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 23 of 31 in the series <a href="http://bestwebdesignz.com/tips/series/flash-cs4-tutorials/" title="series-63">Flash CS4 Tutorials</a></div><p>We are going to learn how to create pop-up windows in Flash CS4 using Action Script 2.0.</p>
<p>Create a new Flash AS 2.0 document:<br />
File &gt; New &gt; Flash File (ActionScript 2.0)</p>
<p>If you have already created a Flash AS 3.0 file you will need change your publish settings to AS 2.0:<br />
File &gt; Publish Settings &gt; Flash &gt; Script: ActionScript 2.0</p>
<p>Step 1: Create a button symbol and place it on the stage like the one below.<br />
<img class="alignnone size-full wp-image-864" title="Learn to create a customizable pop-up window using Flash CS4" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/05/image252.png" alt="Learn to create a customizable pop-up window using Flash CS4" width="288" height="76" /><br />
Step 2: Name the instance of the button &#8220;launch.btn&#8221;, as seen here<br />
<img class="alignnone size-full wp-image-865" title="Learn to create a customizable pop-up window using Flash CS4" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/05/image254.png" alt="Learn to create a customizable pop-up window using Flash CS4" width="172" height="59" /></p>
<p>Step 3: Now we need to create the action script, </p>
<p>Create another layer and call it actions, your timeline will look like this below<br />
<img class="alignnone size-full wp-image-866" title="Learn to create a customizable pop-up window using Flash CS4" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/05/image256.png" alt="Learn to create a customizable pop-up window using Flash CS4" width="200" height="71" /><br />
Let’s now write the action script, so go to actions layer in frame1 and press F9</p>
<p>We will write launch_btn (which is the instance name of the button).onRelease (which on release is going to perform a function as defined).</p>
<p>In the next line getURL (“ “). Now in-between these quotes we are going to call a java script that will publish the swf file and the html file.</p>
<p>In the html file we are going to write a javascript function. So in the getURL function we are going to call the java script function, so in-between the quotes we are going to call a java script function</p>
<p>So type javascript; and type the function we are going to call, lets go and call this function launch, and in brackets we are going to send this function to an URL that its going to take us to, so type bestwebdesignz.com in single quotes, so your action script will look like this below.<br />
<img class="alignnone size-full wp-image-867" title="Learn to create a customizable pop-up window using Flash CS4" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/05/image258.png" alt="Learn to create a customizable pop-up window using Flash CS4" width="600" height="115" /></p>
<p>Now save the file by going to the main menu File&gt; Save As&gt;call it popup.fla.<br />
At this point we have finished all that we need to do in flash, we now need to publish the file, so go to the main menu File &gt; Publish Settings, and make sure that the flash (.swf) and the html(.html) boxes are checked and click on publish and click ok like this below.<br />
<img class="alignnone size-full wp-image-869" title="Learn to create a customizable pop-up window using Flash CS4" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/05/image261.jpg" alt="Learn to create a customizable pop-up window using Flash CS4" width="420" height="196" /></p>
<p>Step 4: Now we need to go into our html file and need to add that javascript function. So open the notepad and open the popup.txt file and you need to add a function in between the title and the head as shown below,<br />
<img class="alignnone size-full wp-image-870" title="Learn to create a customizable pop-up window using Flash CS4" src="http://bestwebdesignz.com/tips/wp-content/uploads/2009/05/image262.png" alt="Learn to create a customizable pop-up window using Flash CS4" width="769" height="478" /></p>
<p>In this script you  are basically calling a function called launch in a new page and this will open an URL as defined in the page function with no toolbars, no menubar, no scrollbars, no location, with width =550 pixels and height =250 pixels and to show from the top=250 and from the left =250 .<br />
Now we need to upload the files to the server and test your movie, so go and save your file and  upload the .swf and html files to the bestwebdesignz server. Having uploaded the swf files and html files, switch to the browser window and type in the name here “bestwebdesignz.com, you will see that button which we designed earlier and when you click on the button, it will call the java script and load the bestwebdesignz.com site for you.</p>
<script type="text/javascript"><!--
                    google_ad_client = "pub-7099335855422733";
                    google_ad_slot = "4729128935";
                    google_ad_width = 336;
                    google_ad_height = 280;
                    //-->
                    </script>
                    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
                    ]]></content:encoded>
			<wfw:commentRss>http://bestwebdesignz.com/tips/flash-cs4-tutorial/learn-to-create-a-customizable-pop-up-window-using-flash-cs4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[Flash CS4 Tutorials]]></series:name>
	</item>
	</channel>
</rss>
