<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<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/"
	>

<channel>
	<title>Creatively sharing Flash Creations, News, and Tutorials</title>
	<link>http://www.flashmaxed.com</link>
	<description>The Magic is in The Code</description>
	<pubDate>Mon, 01 Sep 2008 16:09:20 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<item>
		<title>Flash W3C intro for Beginners</title>
		<link>http://www.flashmaxed.com/?p=34</link>
		<comments>http://www.flashmaxed.com/?p=34#comments</comments>
		<pubDate>Mon, 01 Sep 2008 16:09:20 +0000</pubDate>
		<dc:creator>t. m.</dc:creator>
		
		<guid isPermaLink="false"></guid>
		<description><![CDATA[The following link points to the W3C schools resource section for flash:  Intro to Flash W3schools is known the web over for encompassing all the most important web programming languages, standards, and innovations in one large encyclopedic style website. The intro to Flash covers all the basics a beginner would need: html knowledge, flash [...]]]></description>
			<content:encoded><![CDATA[<p>The following link points to the W3C schools resource section for flash: <a href="http://www.w3schools.com/Flash/flash_intro.asp"> Intro to Flash</a> W3schools is known the web over for encompassing all the most important web programming languages, standards, and innovations in one large encyclopedic style website. The intro to Flash covers all the basics a beginner would need: html knowledge, flash editing platform, web browser, server, etc. After reading the intro, W3Schools also has a wealth of Flash information for the intermediate and advanced developer, including animations tips, techniques, and methods. W3Schools is also very helpful for other programming languages, most notably HTML, XML, PHP, and many others. Enjoy! <img src='http://www.flashmaxed.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashmaxed.com/?feed=rss2&amp;p=34</wfw:commentRss>
		</item>
		<item>
		<title>Flash Tutorial - Boom Boom effect</title>
		<link>http://www.flashmaxed.com/?p=33</link>
		<comments>http://www.flashmaxed.com/?p=33#comments</comments>
		<pubDate>Thu, 28 Aug 2008 16:08:41 +0000</pubDate>
		<dc:creator>t. m.</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[In this easy tutorial made for Flash 8 I will show you how to create very attractive boom boom effect using the picture. You don&#8221;t have to use action script code to make this tutorial. You just have to use some special flash tips and tricks and mask. Let&#8221;s go!  Step 1First of all, [...]]]></description>
			<content:encoded><![CDATA[<p><P>In this easy tutorial made for Flash 8 I will show you how to create very attractive boom boom effect using the picture. You don&#8221;t have to use action script code to make this tutorial. You just have to use some special flash tips and tricks and mask. Let&#8221;s go!  <BR><BR><EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=graphics/20084303_BoomBoomEffect.swf width=250 height=192 type=application/x-shockwave-flash quality="high"></EMBED><BR><BR><STRONG>Step 1</STRONG><BR><BR>First of all, find any picture which you like to use for this tutorial. You can also if you like, save my picture.  <BR><BR><img   src="graphics/200843050_picture.jpg"><BR><BR><STRONG>Step 2</STRONG><BR><BR>Open a new flash document. Select Modify > Document (shortcut key: Ctrl+J ). Set the dimensions of your document as the dimension of picture. Select white as background color and set your Flash movie&#8221;s frame rate to 45 fps. Then, click ok.  <BR><BR><img   src="graphics/200843051_img1.gif"><BR><BR><STRONG>Step 3</STRONG><BR><BR>Choose file > Import > Import to stage (Shortcut key: Ctrl+R) and import any picture into a flash stage.   <BR><BR><STRONG>Step 4</STRONG><BR><BR>While the picture is still selected, press F8 key (Convert to Symbol) to convert this picture into a Movie Clip Symbol.   <BR><BR><img   src="graphics/200843052_img2.gif"><BR><BR><STRONG>Step 5</STRONG><BR><BR>While the new made movie clip is still selected, go to the Align Panel (Ctrl+K) and do the following:   <BR><BR>1. Make sure that the Align/Distribute to Stage button is turned on,   <BR>2. Click on the Align horizontal center button and   <BR>3. Click the Align vertical center button.  <BR><BR><img   src="graphics/200843053_img3.gif"><BR><BR><STRONG>Step 6</STRONG><BR><BR>Double click on layer 1 to rename its name into a picture1. Afte that, click on frame 10 and press F6 key.  <BR><BR><STRONG>Step 7</STRONG><BR><BR>Go back on the first frame. take the Selection Tool (V) and click once on the picture (movie clip) to select it. fter that, go to the Properties Panel (Ctrl+F3) below the stage. On the right, you will see the Color menu. Select Advanced on it, click on Settings button set the following options and click ok.  <BR><BR><img   src="graphics/200843053_img4.gif"><BR><BR><STRONG>Step 8</STRONG><BR><BR>Right-click anywhere on the gray area between frame 1 and frame 10 on the timeline and choose Create Motion Tween from the menu that appears.See the picture below.  <BR><BR><img   src="graphics/200843055_img7.gif"><BR><BR><STRONG>Step 9</STRONG><BR><BR>Create a new layer above the layer picture1 and name it mask1  <BR><BR><STRONG>Step 10</STRONG><BR><BR>After that, take the Oval Tool (O) and draw a little circle like it is shown on the picture below.  <BR><BR><img   src="graphics/200843055_img5.gif"><BR><BR>While the circle is still selected, repeat step 5 to aligned it with the background.  <BR><BR><STRONG>Step 11</STRONG><BR><BR>After that, while the circle is still selected, press Ctrl+G key (Group) to group a circle.  <BR><BR><STRONG>Step 12</STRONG><BR><BR>Click on frame 10 of layer mask1 and press F6 key. After that, take the Free Transform Tool (Q) and enlarge the circle a little. See the picture below.  <BR><BR><img   src="graphics/200843056_img6.gif"><BR><BR><STRONG>Step 13</STRONG><BR><BR>Repeat step 8.  <BR><BR><STRONG>Step 14</STRONG><BR><BR>Select mask1 area layer and convert it to a mask by right-clicking on the mask1 area layer and selecting Mask. See the picture below.  <BR><BR><img   src="graphics/200843056_img8.gif"><BR><BR><STRONG>Step 15</STRONG><BR><BR>Create a new layer above the layer mask 1 and name it picture2.  <BR><BR><STRONG>Step 16</STRONG><BR><BR>After that, go on the first frame of layer picture 1 and press Ctrl+C key on the keyboard (Copy). Then, select frame 5 of layer picture2, press F6 key and after that Ctrl+Shift+V key (Paste in place).  <BR><BR><STRONG>Step 17</STRONG><BR><BR>Select frame 15 of layer picture 2 and press again F6 key. Then, take the Selection Tool (V) and click once on the picture to select it. After that, go to the Properties Panel, and for Color menu choose None. See the picture below.  <BR><BR><img   src="graphics/200843058_img9.gif"><BR><BR><STRONG>Step 18</STRONG><BR><BR>Choose again right-click anywhere on the gray area between frame 5 and frame 15 on the timeline and choose Create Motion Tween from the menu that appears.  <BR><BR><STRONG>Step 19</STRONG><BR><BR>Create a new layer above the layer picture2 and name it mask2.  <BR><BR><STRONG>Step 20</STRONG><BR><BR>Go back on the first frame of layer mask1 and press F6 key. Then, select frame 5 of layer mask2, press F6 key and after that Ctrl+Shift+V key (Paste in place).   <BR><BR><STRONG>Step 21</STRONG><BR><BR>Select now frame 15 of layer mask and press F6 key. Then, while the circle is still selected, take the Free Transform Tool (Q) and enlarge it a little more, if we compare it with the step 12.  <BR><BR><img   src="graphics/200843058_img10.gif"><BR><BR><STRONG>Step 22</STRONG><BR><BR>Repeat step 18.  <BR><BR><STRONG>Step 23</STRONG><BR><BR>Now, repeat step 14.  <BR><BR> with the first two example. Repeat this steps until you don&#8221;t fill with circle the all picture. After that, go back, decrease the circle until you don&#8221;t came to the end.  <BR><BR>Have a nice day!  <BR><BR><STRONG><a href="graphics/200843049_BoomBoomEffect.fla">Download source file (.fla)</A></STRONG></P></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashmaxed.com/?feed=rss2&amp;p=33</wfw:commentRss>
		</item>
		<item>
		<title>Flash and AS Tutorial - Fades picture sample by little action script</title>
		<link>http://www.flashmaxed.com/?p=32</link>
		<comments>http://www.flashmaxed.com/?p=32#comments</comments>
		<pubDate>Mon, 18 Aug 2008 13:08:40 +0000</pubDate>
		<dc:creator>t. m.</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[See this step by step tutorial and learn how to create fades picture sample in flash using a little Action Script. You will also learn:  1. How to import an image in Flash,   2. How to convert a bitmap image into a symbol,   3. How to apply Alpha on image [...]]]></description>
			<content:encoded><![CDATA[<p><P>See this step by step tutorial and learn how to create fades picture sample in flash using a little Action Script. You will also learn:  <BR><BR>1. How to import an image in Flash,   <BR>2. How to convert a bitmap image into a symbol,   <BR>3. How to apply Alpha on image and more.  <BR><BR><EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=graphics/20074186_FadebyAS.swf width=320 height=240 type=application/x-shockwave-flash quality="high"></EMBED><BR><BR><STRONG>Step 1</STRONG><BR><BR>Create a new flash document. Select Modify > Document (shortcut key: Ctrl+J ). Set the width of your document to 320 pixels and the height to 240 pixels. Select white as background color. Set your Flash movie&#8221;s frame rate to 16 fps (Frames per Second) and click ok.  <BR><BR><img   src="graphics/200741855_img1.gif"><BR><BR><STRONG>Step 2</STRONG><BR><BR>Download the <STRONG><A href="http://www.flashvault.net/img/20074188_images.rar">sample images</A></STRONG> for this tutorial that you&#8221;ll use to quickly create this tutorail.  <BR><BR><STRONG>Step 3  <BR><BR></STRONG>Choose File > Import > Import to Library . In the file explorer window that appears, find a three images ( img1, img2&#8230;). Then, press and hold down Shift key and select them all. After that, click Open. If you now open your Library (Ctrl+L), you will see them. See the picture below.  <BR><BR><img   src="graphics/200741856_img2.gif"><BR><BR><STRONG>Step 4  <BR><BR></STRONG>While the flash library it still open,take the Selection Tool (V) and move the first image from the Library on the stage.  <BR><BR><STRONG>Step 5</STRONG><BR><BR>While the image is still selected go to the Align Panel (Window > Align). Then, do the following:  <BR><BR>1. Make sure that the Align/Distribute to Stage button is turned on,   <BR>2. Click on the Align horizontal center button and   <BR>3. Click the Align vertical center button.  <BR><BR><img   src="graphics/200741857_img3.gif"><BR><BR><STRONG>Step 6</STRONG><BR><BR>After that, while the image is still selected, press F8 key (Convert to Symbol) to convert this image into a Graphic Symbol. See the picture below.  <BR><BR><img   src="graphics/200741858_img4.gif"><BR><BR><STRONG>Step 7</STRONG><BR><BR>Click on frame 15, 30 and 45 and press F6 key.  <BR><BR><STRONG>Step 8</STRONG><BR><BR>Go back on frame 1, take the Selection Tool (V), click once on the image to select it and go to the Properties Panel (Ctrl+F3) below the stage. On the right, you will see the Color menu. Select Alpha in it and put it down to 0%.  <BR><BR><img   src="graphics/200741858_img5.gif"><BR><BR>Do that also for frame 45.  <BR><BR><STRONG>Step 9  <BR><BR></STRONG>Right-click anywhere on the gray area between the frame 1 and 15 and frame 30 and 45 on the timeline and choose Create Motion Tween from the menu that appears.See the picture below.  <BR><BR><img   src="graphics/200741859_img6.gif"><BR><BR>After that, click on frame 46 and press F7 key (Blank keyframe).  <BR><BR><img   src="graphics/200741859_img6a.gif"><BR><BR><STRONG>Step 10  <BR><BR></STRONG>Double click on layer 1 to rename its name in image 1. After that, create a new layer above the image 1 layer and name it image 2.  <BR><BR><STRONG>Step 11</STRONG><BR><BR>Click on frame 30 of layer image 2 and press F6 key. After that, move the second image from the flash library on the stage.  <BR><BR><STRONG>Step 12</STRONG><BR><BR>While the image is still selected, press F8 key (Convert to Symbol) to convert this image into a Graphic Symbol.  <BR><BR><img   src="graphics/20074180_img7.gif"><BR><BR><STRONG>Step 13</STRONG><BR><BR>Repeat step 5.  <BR><BR><STRONG>Step 14</STRONG><BR><BR>Click on frame 45, 60 and 75 and press F6 key.  <BR><BR><STRONG>Step 15</STRONG><BR><BR>Go back on frame 30 and repeat step 8. Do that also for frame 70.  <BR><BR><STRONG>Step 16</STRONG><BR><BR>Right-click anywhere on the gray area between the frame 30 and 45 and frame 60 and 75 on the timeline and choose Create Motion Tween from the menu that appears.See the picture below.  <BR><BR><img   src="graphics/20074181_img8.gif"><BR><BR><STRONG>Step 17</STRONG><BR><BR>Click on frame 76 and press F7 key.  <BR><BR><STRONG>Step 18</STRONG><BR><BR>Create a new layer above the image 2 layer and name it image 3.  <BR><BR><STRONG>Step 19</STRONG><BR><BR>Click on frame 60 of layer image 3 and press F6 key. After that, take the Selection Tool (V) and move the another (third) image from the flash library (shortcut key: Ctrl+L) to the stage.  <BR><BR><STRONG>Step 20</STRONG><BR><BR>While the image is still selected, press F8 key (Convert to Symbol) to convert this image into a Graphic symbol.See the picture below.  <BR><BR><STRONG>Step 21</STRONG><BR><BR>Repeat step 5.  <BR><BR><STRONG>Step 22</STRONG><BR><BR>Click on frame 75, 90 and 105 and press F6 key.  <BR><BR><STRONG>Step 23</STRONG><BR><BR>Go back on frame 60 and repeat step 8. Do that also for frame 105.  <BR><BR><STRONG>Step 24</STRONG><BR><BR>Right-click anywhere on the gray area between the frame 60 and 75 and frame 90 and 105 on the timeline and choose Create Motion Tween from the menu that appears.  <BR><BR><STRONG>Step 25</STRONG><BR><BR>Go back on layer image 1, click on the first frame and press Ctrl+C key on the keyboard (Copy). After that, click on frame 90 and press F6 key. Then, press Ctrl+Shift+V key (Paste in Place).  <BR><BR><STRONG>Step 26</STRONG><BR><BR>After that click on frame 105 and press again F6 key.  <BR><BR><STRONG>Step 27</STRONG><BR><BR>While you&#8221;re still on frame 105, take the Selection Tool (V), click once on the image to select it and go to the Properties Panel (Ctrl+F3) below the stage. On the right, you will see the Color menu. Select Alpha in it and put it down to 100%.  <BR><BR><img   src="graphics/20074184_img9.gif"><BR><BR><STRONG>Step 28</STRONG><BR><BR>Right-click anywhere on the gray area between the frame 90 and 105 on the timeline and choose Create Motion Tween from the menu that appears.  <BR><BR><STRONG>Step 29</STRONG><BR><BR>It&#8221;s time for a liitle script, so create a new layer above the all layers and name it action. See the picture below.  <BR><BR><img   src="graphics/20074184_img10.gif"><BR><BR><STRONG>Step 30</STRONG><BR><BR>Click on frame 15 of layer action and press F6 key. After that, go to the Properties Panel (Ctrl+F3) below the stage. On the left side, You will find the Instance name input field there. Call this keyframe &#8220;restart&#8221;. See the picture below.  <BR><BR><img   src="graphics/20074184_img11.gif"><BR><BR><img   src="graphics/20074184_img12.gif"><BR><BR><STRONG>Step 31</STRONG><BR><BR>Click on frame 105 of layer action and press again F6 key. After that, go to the Action Script Panel (F9) and enter the following action script code inside the actions panel:  <BR><BR>gotoAndPlay(&#8221;restart&#8221;);  <BR><BR><BR><BR><BR>Have a nice day!  <BR><BR><STRONG><a href="graphics/200741855_FadebyAS.fla">Download source file (.fla)</A></STRONG></P></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashmaxed.com/?feed=rss2&amp;p=32</wfw:commentRss>
		</item>
		<item>
		<title>Our Item Title is Flash Tutorial Generating Random Numbers</title>
		<link>http://www.flashmaxed.com/?p=31</link>
		<comments>http://www.flashmaxed.com/?p=31#comments</comments>
		<pubDate>Tue, 12 Aug 2008 14:08:01 +0000</pubDate>
		<dc:creator>t. m.</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[

In this tutorials you will learn how to  generate random numbers. The code for this is quite straight forward and has many  uses. You might want to generate random  numbers as an end in itself, such as a way of selecting a raffle ticket winner. But more often  random numbers are [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p align="left" style="margin-bottom: .0001pt"><img src ="images/Learn_Flash.gif" width="31" height="9" /></p>
<p class="text" style="margin-bottom: .0001pt"><span class="text" style="margin-bottom: .0001pt">In this tutorials you will learn how to  generate random numbers. The code for this is quite straight forward and has many  uses. You might want to generate random  numbers as an end in itself, such as a way of selecting a raffle ticket winner. But more often  random numbers are used to trigger an effect. For example to  display an image at random or create some other random action. In this tutorial you will  learn how to convert the random number into a way of saying hello in a random  language.</span></p>
<blockquote style="margin-bottom: .0001pt"><p align="left" style="margin:0cm;margin-bottom:.0001pt"><font face="Verdana"><b><font face="Verdana"><b><img src ="images/floppy-disk.gif" width="13" height="13" /></b></font><font color="#6699CC" class="subhead">My      Example: <a href="http://www.webwasp.co.uk/tutorials/039/images/aa-logon.php" target="_blank">Download the Flash file</a>  <font color="#FF0000">Int </font><font face="Verdana"><b><font color="#6699CC" class="subhead"><font color="#FF0000">039</font></font></b></font><font color="#FF0000">a</font></font></b></font></p>
</blockquote>
<blockquote style="margin-bottom: .0001pt"><p align="left" class="text-Italic" style="margin:0cm;margin-bottom:.0001pt"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="370" height="100">
<param name="movie" value="images/Beg-039a__Random.swf" />
<param name="quality" value="high" /><embed src ="images/Beg-039a__Random.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi'P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="370" height="100"></embed></object><br />      Click to generate a random number between 1 and 10.</p>
<p align="left" class="text-Italic" style="margin:0cm;margin-bottom:.0001pt"> </p>
<p align="left" class="text-Italic" style="margin:0cm;margin-bottom:.0001pt"> </p>
<p align="left" class="text-Italic" style="margin:0cm;margin-bottom:.0001pt"><font face="Verdana"><span class="text" style="margin:0cm;margin-bottom:.0001pt"><strong>Click by Click:</strong> If you would like to view this tutorial without all the notes: <a href="http://www.webwasp.co.uk/tutorials/039/CS3-click-by-click/index.php">Click by Click</a></span></font></p>
</blockquote>
<p><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a><br /><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p align="left" class="subhead"> Step One: Setting Up the Document</p>
<ol>
<li class="text">Open a New Flash Document:<strong> File > New </strong><span class="text-Grey">(Ctrl N)</span></li>
<li class="text">If the General Tab is not selected, select it:<strong></strong><img src ="ikons/General-Tab_F8.gif" alt="General Tab" width="53" height="17" align="absmiddle" /></li>
<li class="text">Select Flash Document: <img src ="ikons/Flash-Doc-Icon_CS3.gif" alt="Flash File" width="16" height="16" align="absmiddle" /><strong>Flash File</strong><span class="text-Grey">(ActionScript 2.0)</span></li>
<blockquote><p class="text"><strong class="subhead-Red">Important Note:</strong> The code in this tutorial will <strong>Not work in  ActionScript 3.0</strong> but if you are using an older version of Flash you can use ActionScript 1. </p>
</blockquote>
<li class="text">Click: <strong>OK</strong>
</li>
<li class="text">If you wish type something on Stage such as: <strong>Generate a Random Number between 1 and 10.</strong></li>
</ol>
<p><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a><br /><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p align="left" class="subhead"><font face="Verdana">Step Two: Setting Up the Text Box</font></p>
<p class="text"><font face="Verdana">The Text box is used to display the random number.</font></p>
<ol>
<li class="text">Select the: <strong>Text Tool</strong><img src ="ikons/Text-Tool_CS3.gif" width="12" height="14" align="absmiddle" /></li>
<li class="text">On the Stage drag out a: <strong>Text Box</strong></li>
<li class="text">Return to the standard: <strong>Selection Tool</strong><img src ="ikons/Selection-Tool_CS3.gif" width="7" height="13" align="absmiddle" /></li>
<li class="text">If the Property Inspector is closed, open it: <strong>Window > Properties</strong><span class="text-Grey">(Ctrl F3)</span></li>
<li class="text">In the Property Inspector select: <strong>Dynamic Text</strong></li>
<blockquote><p><img src ="images/dynamic-text.gif" width="168" height="94" /></p>
</blockquote>
<li class="text">If you wish select: <strong>Show Border Around Text</strong><img src ="ikons/Show-Border_Around-Text_CS3.gif" width="11" height="11" align="absmiddle" /></li>
<li class="text">For the Variable Name type: <strong>myDisplay</strong></li>
<blockquote><p class="text-Italic"><img src ="images/Variable-name.gif" width="593" height="144" /><br />        The Variable Name is: myDisplay</p>
</blockquote>
<li class="text">Select any Type setting that you might want: <strong>Font Styles</strong></li>
</ol>
<p><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a><br /><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p align="left" class="subhead"><font face="Verdana">Step Three: Setting Up the Button</font> ActionScript</p>
<ol>
<li class="text">If the Button Library is closed, open it:<strong> Window > Common Libraries > Buttons</strong></li>
<li class="text">Go through the folder and select a button. I selected:<strong> Classic Buttons > Circle Buttons > Next</strong><img src ="images/next-button.gif" width="21" height="21" align="absmiddle" /></li>
<blockquote><p class="text"><span class="subhead-Black">Note:</span> If you take a button        from the Common Button Library avoid Knobs, Faders and Component buttons        as they work differently.</p>
</blockquote>
<li class="text">Drag a button on to the: <strong>Main Stage</strong></li>
<li class="text">If the Actions Panel is closed, open it: <strong>Window > Action</strong><span class="text-Grey">(F9)</span></li>
<blockquote><p class="text"><strong class="subhead-Red">Important Note:</strong> In the top left corner of the Actions Panel it <strong>must</strong> say: <strong>Actions - Button</strong></p>
<p class="text"><img src ="images/Actions-Button_CS3.gif" width="470" height="72" /></p>
<p class="text">If it does not say <strong>Actions - Button</strong> it can be for two reasons:</p>
</blockquote>
<ul>
<li class="text">Your Button is not selected. Select your button by clicking on it with the Selection tool: <img src ="ikons/Selection-Tool_CS3.gif" width="7" height="13" align="absmiddle" /></li>
<li class="text">You have Action Script 3.0 selected in the Publish Settings. Change this back to AS1 or AS2: <strong>File > Publish Settings > Flash Tab</strong> and select ActionScript 1.0 or 2.0
</li>
</ul>
<li class="text">If Script Assist is on, Switch it off: <img src ="ikons/Script-Assist_F8.gif" width="80" height="16" align="absmiddle" /></li>
<blockquote><p class="text"><strong>Note:</strong> With Script Assist on you cannot type in the Actions Panel. If you want to learn more about Script Assist  see the tutorial on the <a href="http://www.webwasp.co.uk/a34-actions-panel/index.php">Actions Panel</a></p>
</blockquote>
<li class="text">Type<span class="text-Grey"> (or copy and paste)</span> the following code in the Actions Panel; </li>
<blockquote><p class="as-black"><span class="as-key-words">on</span> (<span class="as-key-words">release</span>) {<br />           myDisplay = <span class="as-key-words">random</span> (10) +1;<br />        }</p>
</blockquote>
<li class="text">Test your Movie: <strong>Control > Test Movie</strong><span class="text-Grey">(Ctrl Enter)</span></li>
</ol>
<blockquote><p class="subhead-Black">      The ActionScript Explained:</p>
<p class="text"><span class="actionscript">on (release) {</span><br />      When the user releases the Mouse button what is between the curly braces &#8230;</p>
<p class="text"><span class="as-black"><br /></span><span class="actionscript">myDisplay = random (10) +1;</span><br />      In this case the random function creates a random number that starts at 0 and ends on the 10th digit. Which is the number specified in the parentheses: <span class="actionscript">(10)</span>. If you start your count from zero <span class="text-Grey">(instead of 1)</span> then the 10th digit is 9 <span class="text-Grey">(not 10)</span>! So to make it count form 1 to 10 I simply add one to the result. Hence the <span class="actionscript">+1</span>.</p>
<p class="text"><span class="actionscript">}<br /></span>The curly brace ends the <span class="actionscript"> on (release)</span> statement.</p>
</blockquote>
<p><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a><br /><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p class="subhead"><font face="Verdana">Step Four: Non Repeating Random Number</font></p>
<p class="text">Most of the time you don&#8221;t want a random number that is really random only nearly random! Mostly you want a random number which is non repeating. In other words every time you click on the button you want a new result not to repeat the number that is already there. Thus if my current number is 1 I want the next number to be any random number except 1.</p>
<p class="text">The code that I am going to show you creates a random number and checks to see if it the same as the previous number that was generated. If it is the same it generates a new random number. Of course it could then generate the same number again so it checks this five times. Theoretically this could <span class="text-Grey">(and very occasionally will)</span> generate the same number twice the statistical chance is very small. For example if i am generating a number between 1 and 10 the chance would be 1 in 100,000.</p>
<blockquote><p class="text">10 x 10 x 10 x 10 x 10 = 100,000</p>
</blockquote>
<p class="text">If I am generating a random number between 1 and 3 the natural repeat rate would be 1 in 3 or a very high chance. But if I run it through this simple system it increases to 1 in 243.</p>
<blockquote><p class="text">3 x 3 x 3 x 3 x 3 = 243</p>
</blockquote>
<p class="text">Try it and see how long you have to click before the number repeats <span class="text-Grey">(don&#8221;t blame me if you get a sore click finger!!)</span>:</p>
<blockquote><p align="left" style="margin:0cm;margin-bottom:.0001pt"><font face="Verdana"><b><font face="Verdana"><b><img src ="images/floppy-disk.gif" width="13" height="13" /></b></font><font color="#6699CC" class="subhead">My      Example: <a href="http://www.webwasp.co.uk/tutorials/039/images/aa-logon.php" target="_blank">Download the Flash file</a>  <font color="#FF0000">Int </font><font face="Verdana"><b><font color="#6699CC" class="subhead"><font color="#FF0000">039b</font></font></b></font></font></b></font></p>
<p align="left" class="text-Italic" style="margin:0cm"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="370" height="100">
<param name="movie" value="images/Beg-039b__Random.swf" />
<param name="quality" value="high" /><embed src ="images/Beg-039b__Random.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi'P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="370" height="100"></embed></object><br />      Click to generate a non repeating random number between 1 and 3.</p>
</blockquote>
<p align="left" class="text" style="margin:0cm"><font face="Verdana">The ActionScript attached to the button is as follows:</font></p>
<blockquote><p align="left" class="as-black" style="margin:0cm"><span class="as-key-words">on</span> (<span class="as-key-words">release</span>) {</p>
<p align="left" class="as-black" style="margin:0cm">   <span class="as-black" style="margin:0cm"><span class="as-comments">// Sets the number of digits in the random sequence:</span></span><br /><span class="as-key-words"><span class="as-black" style="margin:0cm">   </span>var</span> mySetting = 3;</p>
<p align="left" class="as-black" style="margin:0cm"><span class="as-comments"><span class="as-black" style="margin:0cm">   </span>// Creates a random number:</span><br /><span class="as-black" style="margin:0cm">   </span>myNumber = <span class="as-key-words">random</span>(mySetting)+1;</p>
<p align="left" class="as-black" style="margin:0cm"><span class="as-comments"><span class="as-black" style="margin:0cm">   </span>// Checks to see if it is repeating itself:</span></p>
<p align="left" class="as-black" style="margin:0cm"><span class="as-key-words"><span class="as-black" style="margin:0cm">   </span>while</span> (myNumber == myTemp) {<br /><span class="as-black" style="margin:0cm">   </span>   myNumber = <span class="as-key-words">random</span>(mySetting)+1;<br /><span class="as-black" style="margin:0cm">   </span>}<br /><span class="text-Grey"><span class="as-black" style="margin:0cm">   </span>// Displays the random number:</span><br /><span class="as-black" style="margin:0cm">   </span>myDisplay = myNumber;<br /><span class="as-comments"><span class="as-black" style="margin:0cm">   </span>// Resets the variable to the new random number:</span><br /><span class="as-black" style="margin:0cm">   </span>myTemp = myNumber;<br />      }</p>
<blockquote><p align="left" class="text" style="margin:0cm"><span class="subhead-Black">With Thanks: </span>Code submitted by Alexander Kuzmin</p>
</blockquote>
</blockquote>
<p align="left" class="text" style="margin:0cm">The<span class="actionscript"> mySetting = 3;</span> sets the number range. <span class="text" style="margin:0cm">In this case it will produce a random number between 1 and 3. </span> The variable<span class="actionscript"> myTemp </span>holds the previous generated random number.</p>
<p><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a><br /><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p align="left" class="subhead" style="margin:0cm"><font face="Verdana"><a name="5" id="5"></a>Step Five: Converting the Random Number to Text</font></p>
<p align="left" class="text" style="margin:0cm"> </p>
<p align="left" class="text" style="margin:0cm">In general you do not want to create a random number for the sake of creating a random number. You create a random numbers to create some other random event. Once you have created a random number it is actually quite easy to convert it to something useful. In this example I convert the number into text. Each number is associated with a particular word <span class="text-Grey">(or words)</span>. In this case the word hello in 10 different languages:</p>
<p align="left" class="text" style="margin:0cm"> </p>
<blockquote><p align="left" style="margin:0cm;margin-bottom:.0001pt"><font face="Verdana"><b><font face="Verdana"><b><img src ="images/floppy-disk.gif" width="13" height="13" /></b></font><font color="#6699CC" class="subhead">My      Example: <a href="http://www.webwasp.co.uk/tutorials/039/images/aa-logon.php" target="_blank">Download the Flash file</a>  <font color="#FF0000">Int </font><font face="Verdana"><b><font color="#6699CC" class="subhead"><font color="#FF0000">039c</font></font></b></font></font></b></font></p>
<p align="left" class="text-Italic" style="margin:0cm"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="370" height="100">
<param name="movie" value="images/Beg-039c__Random.swf" />
<param name="quality" value="high" /><embed src ="images/Beg-039c__Random.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi'P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="370" height="100"></embed></object><br />      Click to say hello in 10 different languages.</p>
<blockquote class="text"><p><strong>Note:</strong> If you can guess all 10 languages I will eat my computer <span class="text-Grey">(just joking) </span>!!</p></blockquote>
</blockquote>
<p align="left" class="text" style="margin:0cm">The ActionScript in first section is identical to the previous example except that I have changed mySetting to 10 as I want to generate a random number between 1 and 10. The second converts the random number to text. I hope the gray comments make the code self explanatory:</p>
<blockquote><p align="left" class="text" style="margin:0cm"><strong>Note for AS2: </strong>The code below will work in AS1 or AS2 but if you are using AS2 there is a shorter way to achieve the same thing. You can use an Array: <a href="comments_05.php">See sample code</a></p>
</blockquote>
<p align="left" class="text" style="margin:0cm"><font face="Verdana">The ActionScript attached to the button is as follows:</font></p>
<blockquote><p align="left" class="as-black" style="margin:0cm"><span class="as-key-words">on</span> (<span class="as-key-words">release</span>) {</p>
<p align="left" class="as-black" style="margin:0cm"><span class="as-comments">// Sets the number of digits in the random sequence:</span><br /><span class="as-key-words">var</span> mySetting = 10;<br /><span class="as-comments">// Creates a random number:</span><br />      myNumber = <span class="as-key-words">random</span>(mySetting)+1;<br /><span class="as-comments">//Checks the repeat function</span><br /><span class="as-key-words">while</span> (myNumber == myTemp) {<br />      myNumber = <span class="as-key-words">random</span>(mySetting)+1;<br />      }<br /><span class="as-comments">// Resets the variable to the new random number:</span><br />      myTemp = myNumber;</p>
<p align="left" class="as-black" style="margin:0cm"></p>
<p align="left" class="as-black" style="margin:0cm"><span class="as-comments"><span class="as-black" style="margin:0cm">   </span>// This section converts the number to text.<br /><span class="as-black" style="margin:0cm">   </span>// Each number is associated with a particular sentence.<br /><span class="as-black" style="margin:0cm">   </span>// On this occasion my random number is from 1 to 10.</span><br /><span class="as-key-words"><span class="as-black" style="margin:0cm">   </span>if</span> (myNumber == 1) {<br /><span class="as-black" style="margin:0cm">   </span>   myDisplay = <span class="as-string">&#8220;Hello&#8221;</span>;<br /><span class="as-black" style="margin:0cm">   </span>} <span class="as-key-words">else if </span>(myNumber == 2) {<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>   </span>myDisplay = <span class="as-string">&#8220;Salut&#8221;</span>;<br /><span class="as-black" style="margin:0cm">   </span>} <span class="as-key-words">else if</span> (myNumber == 3) {<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>   </span>myDisplay = <span class="as-string">&#8220;Guten Tag&#8221;</span>;<br /><span class="as-black" style="margin:0cm">   </span>} <span class="as-key-words">else if</span> (myNumber == 4) {<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>   </span>myDisplay = <span class="as-string">&#8220;Hola&#8221;</span>;<br /><span class="as-black" style="margin:0cm">   </span>} <span class="as-key-words">else if</span> (myNumber == 5) {<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>   </span>myDisplay = <span class="as-string">&#8220;Dobrý De?&#8221;</span>;<br /><span class="as-black" style="margin:0cm">   </span>} <span class="as-key-words">else if</span> (myNumber == 6) {<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>   </span>myDisplay = <span class="as-string">&#8220;Nei Ho&#8221;</span>;<br /><span class="as-black" style="margin:0cm">   </span>} <span class="as-key-words">else if</span> (myNumber == 7) {<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>   </span>myDisplay = <span class="as-string">&#8220;Ciao&#8221;</span>;<br /><span class="as-black" style="margin:0cm">   </span>} <span class="as-key-words">else if</span> (myNumber == <img src='http://www.flashmaxed.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> {<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>   </span>myDisplay = <span class="as-string">&#8220;God Dag&#8221;</span>;<br /><span class="as-black" style="margin:0cm">   </span>} <span class="as-key-words">else if</span> (myNumber == 9) {<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>   </span>myDisplay = <span class="as-string">&#8220;Namaste&#8221;</span>;<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>  </span><span class="text-Grey" style="margin:0cm"> </span><span class="text-Grey">// I don&#8221;t have to specify the last digit:</span><br /><span class="as-black" style="margin:0cm">   </span>} <span class="as-key-words">else</span> {<br /><span class="as-black" style="margin:0cm"><span class="as-black" style="margin:0cm">   </span>   </span>myDisplay = <span class="as-string">&#8220;Kia Ora&#8221;</span>;<br /><span class="as-black" style="margin:0cm">   </span>}<br />      }</p>
</blockquote>
<p align="left" class="text" style="margin:0cm">    That&#8221;s it. Enjoy being random!</p>
<p><!-- InstanceEndEditable -->
<p class="text">I hope you have found this useful. If so perhaps you could recommend this site to others and link to webwasp! </p>
<p><!-- InstanceBeginEditable name="EditRegion22" -->
<p class="text-Small"> </p>
<p class="text-Small">
<form action="05.php" target="_self" method="post" name="Rating">
<table  border="0" cellpadding="2">
<tr>
<td rowspan="2" valign="top">
<div align="right"><span class="text-Small">Please              indicate what you thought of this tutorial <br />        10 is the best: </span></div>
</td>
<td rowspan="2" valign="top">
<table border="1" cellpadding="0" cellspacing="0" class="text-Small">
<tr>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="10">               10</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="9">        9</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="8">        8</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="7">        7</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="6">        6</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="5">        5</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="4">        4</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="3">        3</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="2">        2</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="1">        1</td>
</tr>
</table>
</td>
<td valign="bottom"></td>
</tr>
<tr>
<td valign="bottom">
<input name="CurrentArticle" type="hidden" value="90039">
<input name="Submit" type="submit" class="text-Small" value="Submit"></td>
</tr>
</table>
</form>
<p><a href="http://www.webwasp.co.uk/tutorials/039/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p><a href="http://www.webwasp.co.uk/tutorials/039/index.php">&#8230; Read More of this tutorial at WebWasp.co.uk Tutorials</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashmaxed.com/?feed=rss2&amp;p=31</wfw:commentRss>
		</item>
		<item>
		<title>Loading a Random Flash Movie</title>
		<link>http://www.flashmaxed.com/?p=30</link>
		<comments>http://www.flashmaxed.com/?p=30#comments</comments>
		<pubDate>Fri, 08 Aug 2008 15:08:35 +0000</pubDate>
		<dc:creator>t. m.</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[

This tutorial will show you how to load a random Flash Movie onto your web page. Every time a user returns to your page a new Flash Movie will display. This can be used to make your site look fresh and dynamic or to deliver different messages or ads campaigns. 
I sometimes use this system [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webwasp.co.uk/tutorials/042/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p align="left" style="margin:0cm"><span class="subhead" style="margin:0cm;margin-bottom:.0001pt"><img src ="images/Learn_Flash.gif" width="31" height="9" /></span></p>
<p class="text">This tutorial will show you how to load a random Flash Movie onto your web page. Every time a user returns to your page a new Flash Movie will display. This can be used to make your site look fresh and dynamic or to deliver different messages or ads campaigns. </p>
<p class="text">I sometimes use this system to deliver Flash Movies in the head section of the pages in this site. It is very powerful as the same Flash Movie can be used to control all the pages on the site. If I want to change the Flash Movies that are displayed I simply delete my current group of Flash Movies and replace them with the new ones. If I want to change the number of random Flash Movies that are displayed all I need to do is change a single line of ActionScript and upload the new version. That single change may take only a few minutes but it will effect  thousands of pages on the webwasp site. There is no need to change any HTML on individual pages. </p>
<p class="text">The ActionScript used in this tutorial is very simple and consists of only four lines. So for those of you wary of ActionScript, don&#8221;t worry.</p>
<p class="text">For this tutorial you&#8221;ll be making something like this:</p>
<blockquote><p class="text"><img src ="images/floppy-disk.gif" width="13" height="13" /><span class="subhead-Black">Example:</span><a href="http://www.webwasp.co.uk/tutorials/042/images/aa-logon.php" target="_blank">Download      the Flash file</a><font class="subhead-Red"> Beg 042</font></p>
<p class="text-Italic"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="250" height="80">
<param name="movie" value="images/Zed-Beg-042-Master.swf" />
<param name="quality" value="high" /><embed src ="images/Zed-Beg-042-Master.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi'P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="250" height="80"></embed></object><br /><span class="text"><em>To change the Movie press your Browser&#8221;s Refresh button </em></span><span class="text-Grey"><em>(F5)</em></span><span class="text"><em>. </em></span></p>
<blockquote><p class="text"><strong>Note:</strong> I have loaded a series of 6 Flash Movies. The Flash Movies are displayed at random so occasionally the same Flash Movie will be displayed twice in a row. Obviously the more Flash Movies in your series, the less likely they are to repeat.</p>
<p class="text"><font face="Verdana"><span class="text" style="margin:0cm;margin-bottom:.0001pt"><strong>Click by Click:</strong> If you would like to view this tutorial without all the notes: <a href="http://www.webwasp.co.uk/tutorials/042/CS3-click-by-click/index.php">Click by Click</a></span></font></p>
</blockquote>
</blockquote>
<p><a href="http://www.webwasp.co.uk/tutorials/042/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a><br /><a href="http://www.webwasp.co.uk/tutorials/042/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p class="subhead">Step One: Getting the Movies Ready</p>
<p class="text"><strong>Movie Dimensions</strong><br />    It is best <span class="text-Grey">(although not essential)</span> if your Flash Movies are all the same size. Otherwise you may get some unexpected results.</p>
<p class="text"><strong>How Many Movies&#8217;</strong><br />    You will need to collect together a number of Movies. How many is up to you. It is even possible to have only 1 and add more at a later date.</p>
<p class="text"><strong>File Location</strong><br />    You will need to place them all into a single folder on your computer.</p>
<p class="text"><strong>Naming the Movies</strong><br />    Name all your Flash Movies numerically from 1. Do not use names like 01. </p>
<blockquote><p class="text">Here are the details of my Flash Movies as seen in Windows Explorer:</p>
<p class="text"><img src ="images/_image-names.gif" width="195" height="127" /></p>
</blockquote>
<p><a href="http://www.webwasp.co.uk/tutorials/042/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a><br /><a href="http://www.webwasp.co.uk/tutorials/042/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p class="subhead">Step Two: Setting up the Master Flash Document</p>
<ol>
<li class="text">Open a New Flash Document:<strong> File > New </strong><span class="text-Grey">(Ctrl N)</span></li>
<li class="text">If the General Tab is not selected, select it:<strong></strong><img src ="ikons/General-Tab_F8.gif" alt="General Tab" width="53" height="17" align="absmiddle" /></li>
<li class="text">Select Flash Document: <img src ="ikons/Flash-Doc-Icon_CS3.gif" alt="Flash File" width="16" height="16" align="absmiddle" /><strong>Flash File</strong><span class="text-Grey">(ActionScript 2.0)</span></li>
<blockquote><p class="text"><strong>Note:</strong> The ActionScript used in this tutorials is suitable for ActionScript 1 or ActionScript 2. It will not work is ActionScript 3. If you find that you get errors it could be that your Flash file is set to publish in ActionScript 3.0 or later. If you are not sure which version of ActionScript you are using check your publish settings: <strong>File > Publish Settings > Flash > ActionScript version</strong>.</p>
</blockquote>
<li class="text">Click: <strong>OK</strong>
</li>
<li class="text">Go to: <strong>Modify > Document </strong><span class="text-Grey">(Ctrl J)</span></li>
<li class="text">Set the size: <strong>250 x 80 </strong><span class="text-Grey">(or what&#8221;s appropriate for your Flash Movies)</span></li>
<li class="text">Click:<strong> OK</strong></li>
<blockquote><p class="text">Your settings should look similar to this:</p>
<p><img src ="images/_publish-settings.gif" width="539" height="144" /><br /><span class="text-Italic">Settings as seen in the Property Inspector.</span></p>
<p class="text"><strong>Note: </strong>If your Property Inspector is closed go to: <strong>Window > Properties > Properties</strong><span class="text-Grey">(Ctrl F3)</span></p>
</blockquote>
<li class="text">Save your file into the same folder as that of your other Flash Movies: <strong>File > Save</strong><br />
<blockquote>
<p><strong>Note: </strong>The name of your Master Flash Movie is not important, only the location. </p>
</blockquote>
</li>
</ol>
<p><a href="http://www.webwasp.co.uk/tutorials/042/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a><br /><a href="http://www.webwasp.co.uk/tutorials/042/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p class="subhead">Step Three: Creating the ActionScript</p>
<ol>
<li class="text">Select: <strong>Frame 1</strong></li>
<li class="text">Open the Actions Panel: <strong>Window > Actions</strong><span class="text-Grey">(F9)</span></li>
<blockquote><p class="text"><strong class="subhead-8">Important Note: </strong>Make sure that you can see <strong>Actions - Frame</strong> at the top of the Actions Panel:</p>
<p class="text-Italic"><img src ="ikons/Actions-Frame_CS3.gif" width="179" height="59" /><br />        The Actions Panel has <strong>Actions - Frame</strong> in the top corner. </p>
</blockquote>
<li class="text">In the Actions Panel if Script Assist is on, Switch: <strong>Script Assist Off</strong></li>
<blockquote><p class="text"><strong>Note:</strong> To see if Script Assist is on or off go to  the Action Panel&#8221;s Side        Menu Button:  <img src ="ikons/Corner-Button_F8.gif" width="12" height="10" /> </p>
<p class="text">Script Assist is <strong>On</strong> when <strong></strong>ticked: <img src ="ikons/Script-Assist-Tick_F8.gif" width="70" height="10" /><span class="text-Grey">(remove the tick)</span></p>
<blockquote><p class="text"><strong>Cross Ref:</strong> If you are not sure what Script Assist is or how to switch it on and off  see the short Tutorial: <a href="http://www.webwasp.co.uk/a34-actions-panel/index.php">Actions Panel</a></p>
</blockquote>
</blockquote>
<li class="text">Type <span class="text-Grey">(or Copy &#038; Paste)</span> the following Actionscript into Actions      Panel: </li>
<blockquote class="as-black"><p><span class="as-comments">// Sets the number of Flash Movies in the random sequence<br />        // IMPORTANT: Set this number to how many Flash Movies you have</span><br /><span class="as-key-words">var</span> myMovieSequence = 6;</p>
<p><span class="as-comments">// Creates the random number:</span><br /><span class="as-key-words">var</span> myRandomNumber = <span class="as-key-words">Math.floor</span>(<span class="as-key-words">Math.random</span>()*myMovieSequence)+1;</p>
<p><span class="as-comments">// Creates the full Flash Movie name like: 1.swf</span><br /><span class="as-key-words">var</span> myMovieName = myRandomNumber + <span class="as-string">&#8220;.swf&#8221;</span>; </p>
<p><span class="as-comments">// Loads the random Flash Movie:</span><br /><span class="as-key-words">loadMovieNum</span>(myMovieName, 0);</p>
</blockquote>
<li class="text">Change  <span class="as-black"><strong>myMovieSequence</strong></span> to the number of Flash Movies in your sequence. Mine is: <strong>6<br /></strong></li>
<li class="text">Test your movie: <strong>Control > Test Movie</strong><span class="text-Grey"> (Ctrl Enter)</span></li>
</ol>
<ol>
<blockquote>
<p class="text"><strong>Note: </strong>This will load only one of your random Flash Movies. Just to check that the random load is working test your Movie several times.</p>
<p class="text"><strong class="subhead-Red">Important: </strong>In Test Mode if you have not saved your Flash file into the same folder as your Flash Movies your movie will not work. When you upload your files to the Internet then the HTML page must be in the same location as the Flash Movies and  the location of the Master Flash Movie becomes irrelevant. If you want to use your Flash file in multiple web pages and load Flash Movies form one location you will need to specify an absolute address like this:</p>
<p class="as-black"><span class="as-key-words">var</span> myMovieName = <span class="as-string">&#8220;http://www.yourwebsite.com/movies/&#8221;</span> + myRandomNumber + <span class="as-string">&#8220;.swf&#8221;</span>;</p>
</blockquote>
</ol>
<p><!-- InstanceEndEditable -->
<p class="text">I hope you have found this useful. If so perhaps you could recommend this site to others and link to webwasp! </p>
<p><!-- InstanceBeginEditable name="EditRegion22" -->
<p class="text-Small"> </p>
<p class="text-Small">
<form action="03.php" target="_self" method="post" name="Rating">
<table  border="0" cellpadding="2">
<tr>
<td rowspan="2" valign="top">
<div align="right"><span class="text-Small">Please              indicate what you thought of this tutorial <br />        10 is the best: </span></div>
</td>
<td rowspan="2" valign="top">
<table border="1" cellpadding="0" cellspacing="0" class="text-Small">
<tr>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="10">               10</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="9">        9</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="8">        8</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="7">        7</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="6">        6</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="5">        5</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="4">        4</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="3">        3</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="2">        2</td>
<td align="center" class="text-Small">
<input type="radio" name="SelectedRating" value="1">        1</td>
</tr>
</table>
</td>
<td valign="bottom"></td>
</tr>
<tr>
<td valign="bottom">
<input name="CurrentArticle" type="hidden" value="90042">
<input name="Submit" type="submit" class="text-Small" value="Submit"></td>
</tr>
</table>
</form>
<p><a href="http://www.webwasp.co.uk/tutorials/042/index.php"><img src="images/courtesywebwasp.jpg" border="0"></a>
<p><a href="http://www.webwasp.co.uk/tutorials/042/index.php">&#8230; Read More of this tutorial at WebWasp.co.uk Tutorials</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashmaxed.com/?feed=rss2&amp;p=30</wfw:commentRss>
		</item>
		<item>
		<title>AS Tutorials - Trace and debug ActionScript from your browser</title>
		<link>http://www.flashmaxed.com/?p=29</link>
		<comments>http://www.flashmaxed.com/?p=29#comments</comments>
		<pubDate>Tue, 05 Aug 2008 00:08:06 +0000</pubDate>
		<dc:creator>t. m.</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[  	By   Josh Buhler
&#124;
  	Published June 3, 2006
&#124;
Intermediate
&#124;
  		Rating:    		    	Unrated  
Tutorial details: Written by : Josh Buhler -   





 -   joshbuhler.comDifficulty Level: beginnerRequirements:  MX2004 Topics Covered:  debugging Assumed Knowledge:  How to install applications, edit and open [...]]]></description>
			<content:encoded><![CDATA[<div class="ByLine">  	By   <a href="http://www.actionscript.org/resources/authors/36/Josh-Buhler">Josh Buhler</a>
<div id="sep">|</div>
<p>  	Published June 3, 2006
<div id="sep">|</div>
<p><a href="http://www.actionscript.org/resources/categories/Tutorials/Flash/Intermediate/">Intermediate</a>
<div id="sep">|</div>
<p><span style="display:">  		Rating:    		  <img src="resources/orangeRatingFull.gif" alt="ratingfull" /><img src="resources/orangeRatingFull.gif" alt="ratingfull" /><img src="resources/orangeRatingFull.gif" alt="ratingfull" /><img src="resources/orangeRatingEmpty.gif" alt="ratingempty" /><img src="resources/orangeRatingEmpty.gif" alt="ratingempty" /></span><span style="display:none">  	Unrated  </span></div>
<p><a href="http://www.actionscript.org/resources/articles/207"><img   src="resources/originallypublished.jpg"></a><br /><strong>Tutorial details: </strong><br/><strong>Written by </strong>: Josh Buhler -   <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="175" height="15" id="no_spam" align="texttop">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="resources/no_spam.swf'firstBit=josh&#038;domain=joshbuhler.com" />
<param name="loop" value="false" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" /><embed src="resources/no_spam.swf'firstBit=josh&#038;domain=joshbuhler.com" loop="false" menu="false" quality="high" bgcolor="#ffffff" width="175" height="15" name="no_spam" align="texttop" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object> -   <a href="http://www.joshbuhler.com/" target="_blank">joshbuhler.com</a><br/><strong>Difficulty Level: </strong>beginner<br/><strong>Requirements: </strong> MX2004 <br/><strong>Topics Covered: </strong> debugging <br/><strong>Assumed Knowledge: </strong> How to install applications, edit and open text files.
<p>How many times have you built something in Flash, tested it a million times or more, have it work great, and then fail as soon as you put it online, or outside the Flash IDE &#8216; You then go back to your local version, test some more, and begin throwing trace(&#8221;something here&#8221;); and trace(&#8221;whyIsntThisWorking&#8221;); everywhere. It all works great, and then you put it online again, and it doesn&#8221;t work. Personally, this seems to happen to me quite often on certain projects. I&#8221;ve often wished that there was some way to trace out what&#8221;s going on in my .swf files online, so I can figure out what&#8221;s happening. </p>
<p>Well, hallelujah, brothers and sisters, you can now do this, and I will testify unto you that it is almost a miracle. I&#8221;ve been trying to debug a project at work for about a week now, that used to work fine online, and now it doesn&#8221;t. But using the technique below, I was able to trace out some info from the swf online, and figure out exactly where my problem was. This will also log errors such as undefined functions and variables for you as well, so this is a valuable tool. The cool thing about this is that it logs the info from any swf that you visit online. Just for fun visit a few Flash sites, and then open up the flashLog.txt file we&#8221;ll create, and you&#8221;ll see anything that they may have been tracing. </p>
<p>Disclaimer: I did not discover this on my own, so I can&#8221;t take complete credit for it. I just thought it was an amazing debug tool, so I&#8221;m trying to spread the word. One day in my random travels around the web, I came across the following blog -   <a href="http://broadcast.artificialcolors.com/2004/04/01.html" target="_blank">g.wygonik&#8221;s flash experiments </a> Greg mentions that it&#8221;s a Windows only tool, but I started playing around, and I&#8221;ve got it working just fine in OSX. </p>
<p>The secret comes from   <a href="http://www.macromedia.com/software/flex/" target="_blank">Macromedia Flex </a> and it&#8221;s debugging abilities. You don&#8221;t need to have Flex for this to work, but all the documentation I could find from Macromedia is in the Flex help sections. </p>
<p>For this to work, you&#8221;ll need to have the Flash Debug Player installed. This means that you&#8221;ll need to uninstall your current Flash Player, and install the debug player instead. You can find an uninstaller here -   <a href="http://www.macromedia.com/shockwave/download/alternates/" target="_blank">http://www.macromedia.com/shockwave/download/alternates/ </a>. You&#8221;ll be able to find the Debug Player in your Flash install folder. </p>
<ul>
<li>For OSX users, you&#8221;ll find it in /Applications/Macromedia Flash MX 2004/Players/Debug/Install Flash Player 7 OSX. app.         </li>
<li>Windows users, it&#8221;ll be in a similar location. Usually in Start > Programs > Macromedia > Flash Player 7 > Debug. There are two versions of the player to install for Windows. IE requires the ActiveX installer (named: Install Flash Player 7 AX. exe) while other browsers (Opera, Mozilla, and so forth-) require the Flash plug-in installer (named: Install Flash Player 7.exe). Refer to the article above for Windows instructions. </li>
</ul>
<p>Once you have uninstalled the Flash Player, and installed the Debug Player, you&#8221;ll need to restart your browser, so bookmark this page. You can then verify that you have the Debug Player installed by right-clicking (control-click - just get a real mouse already Mac users ) on a swf. You should have the &#8220;debug&#8221; option in the context menu, like the example below. Once that&#8221;s working, onto the next step. </p>
<p><img  title="" alt=""  src="resources/debuggerinstalled.jpg" align="" height="188" hspace="0" vspace="0" width="372"/></p>
<p>Create a textfile called &#8220;mm.cfg&#8221;. Inside the file, there are a few options for you. The most important options for this to work are below: </p>
<div class="codex">
<pre>ErrorReportingEnable=1 TraceOutputFileEnable=1 TraceOutputFileName=MacHD:Users:username:Desktop:flashLog.txt MaxWarnings=50<br/></pre>
</div>
<p>Swapping &#8220;MacHD&#8221; with your computer name, and &#8220;username&#8221; with yours. You can put this wherever you want, just make sure you use the colons &#8220;:&#8221; and not slashes if you&#8221;re using OSX. Windows users, same thing, put it where you want it, but you&#8221;ll use &#8220;/&#8221; of course. </p>
<p>The firstline, ErrorReportingEnable=1 does just that - it enables error reporting. Then, TraceOutputFileEnable=1 enables the output file. You may be getting the idea now. The TraceOutputFileName is the path to where you want this file to be exported. I like to keep mine on my desktop. There are very few things that make it to my desktop, and this file is one of them, it&#8221;s that cool. The MaxWarnings is the maximum amount of warnings you want reported. This doesn&#8221;t limit your trace() statements, just the ActionScript warnings about undefined variables or methods. By default, this is set to 100, so you can leave this line out if you like. Or, you can set it to 0, and it there will be no limit placed. You can find more info about the options you have for this file in the   <a href="http://livedocs.macromedia.com/flex/15/flex_docs_en/wwhelp/wwhimpl/common/html/wwhelp.htm'context=Flex_Documentation&#038;file=00000794.htm" target="_blank">Macromedia LiveDocs for Flex </a></p>
<p>Now, save this file, and place it in the following location: </p>
<ul>
<li>OSX users - MacHD /Library/Application Support/Macromedia/mm.cfg         </li>
<li>Windows - C:Documents and Settings username - follow the instructions in the link to Greg Wygonik above. </li>
</ul>
<p>You don&#8221;t need to create flashLog.txt, it will be created for you. </p>
<p>Now for the fun part. Open Flash, and create a quick movie with the following lines:</p>
<p>
<div class="codex">
<pre>
<div class="actionscript" style="font-family: monospace;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">&#8221; hello world &#8220;</span><span style="color: #66cc66;">)</span>;<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">(</span>bob<span style="color: #66cc66;">)</span>;<span style="color: #0066CC;">_root</span>.<span style="color: #006600;">callFunction</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;<span style="color: #000000; font-weight: bold;">var</span> something = <span style="color: #cc66cc;">5</span>;<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">&#8221; something: &#8220;</span> + someThing<span style="color: #66cc66;">)</span>;</div>
</pre>
</div>
<p><br/></p>
<p>Publish the swf, and open it in your browser. Or, click the button below.</p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="100" width="300">
<param name="movie" value="resources/tracebutton.swf"/>
<param name="quality" value="high"/><embed src="resources/tracebutton.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" height="100" width="300"</object/></object></p>
<p>Now go to the location where you told the flashLog.txt file to be written to. Open this up, and you should see something similar to the following output: </p>
<p><img  title="" alt=""  src="resources/traceresults.jpg" align="" height="206" hspace="0" vspace="0" width="379"/></p>
<p>Look at all the cool stuff you get - a warning that a function you&#8221;re calling doesn&#8221;t exist, variables being traced out, and a notice that you probably typed a variable wrong. Isn&#8221;t this thing great&#8217; If you decide to make changes to your mm.cfg file, you&#8221;ll need to restart your browser for those changes to take effect. </p>
<p>       Before you start debugging a file online using your flashLog.txt file, you&#8221;ll want to make sure that you open it up and clear it out first. This doesn&#8221;t always get emptied by Flash, and so you&#8221;ll have trace info from multiple swf files all together in one file. If you just open it, select everything, delete it, and then resave the file, you can start with a clean slate to begin tracing to. If you have problems setting this up, post a comment below, and I&#8221;ll try to respond as soon as I can.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.flashmaxed.com/?feed=rss2&amp;p=29</wfw:commentRss>
		</item>
	</channel>
</rss>
