<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.1.3" -->
<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>The Webmaster's Tutorials</title>
	<link>http://www.thewebmasterstool.com/tutorials</link>
	<description>The place that has your tutorials</description>
	<pubDate>Sun, 29 Jul 2007 19:20:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.3</generator>
	<language>en</language>
			<item>
		<title>Tweens And Animations</title>
		<link>http://www.thewebmasterstool.com/tutorials/tweens-and-animations/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/tweens-and-animations/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:20:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/tweens-and-animations/</guid>
		<description><![CDATA[A tween is a movement between at least two keyframes. There are two types of tweens a motion tween and a shape tween.
Motion tween is a tween where an object’s changes seize and or position smoothly. it is usually a blue arrow linking two keyframes. 
Creating motion tweens.
To create a tween you first of all [...]]]></description>
			<content:encoded><![CDATA[<p>A tween is a movement between at least two keyframes. There are two types of tweens a motion tween and a shape tween.</p>
<p>Motion tween is a tween where an object’s changes seize and or position smoothly. it is usually a blue arrow linking two keyframes. <img src="http://asgsoft.net/tutes/pic002.jpg" alt="" /></p>
<p><strong>Creating motion tweens.</strong></p>
<p>To create a tween you first of all have to create two tweens. Draw an object on your workspace. Then you press on key frame 10 for example with the mouse then you press F6. That will create a keyframe. It should look something like this so far. <img src="http://asgsoft.net/tutes/pic004.jpg" alt="" /></p>
<p>If you press return or enter the red indicator will move from frame 1 to frame 10, but between 1 and 10 there is no change. On keyframe 1 or 10 change the size by the free transform tool or position by the select tool. Right click on the area between keyframes 1 and 10 then press “create motion tween”. If it looks something like this no problem, just right on key frame 10 the one that is not shaded blue and press “create motion tween”. <img src="http://asgsoft.net/tutes/pic008.jpg" alt="" />. Now it should look like this <img src="http://asgsoft.net/tutes/pic006.jpg" alt="" />.</p>
<p>If you get this <img src="http://asgsoft.net/tutes/pic010.jpg" alt="" /> then one of the things it means is that not all the objects in keyframe 1 are the ones in keyframe 10. For example an extra object could have been on keyframe 10 that is not on 1. So all the objects on keyframe (kf) 1 should be on kf 10 or else the part that is common in both keyframes will be tweened while the new object will just appear from nowhere. Later in this tutorial I will tell you common used of motion tweens.</p>
<p><strong>Fading text</strong></p>
<p>1) Create a new document<br />
2) Create a keyframe on frames 1<br />
3) On keyframe 1 write “welcome here”<br />
4) Right click on the text and press convert to symbol,<br />
5) Select graphic<br />
6) Create a keyframe on frames 10<br />
7) On the text pres once then in the colour choose alpha change it to 100 to be visible<br />
 <img src='http://www.thewebmasterstool.com/tutorials/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> On keyframe 1 change the text’s alpha to 0<br />
9) Click on any frame between keyframes 1 and 10<br />
10) In the properties panel select shape for the tween.</p>
<p>Like before if a keyframe is not highlighted blue, right click on it and press create motion<br />
<img src="http://asgsoft.net/tutes/pic012.gif" alt="" /> see what i mean.</p>
<p><strong>Shape tweens.</strong></p>
<p>A shape tween is when an object transforms from one shape to another. To make it clearer will be doing three things: changing a square to a circle; “hello” to “how are you”, and also changing a red square to a blue square.</p>
<p><strong>Changing a square into a circle.</strong></p>
<p>1. Create a new document<br />
2. Create a keyframe on frame 1<br />
3. On keyframe 1 draw a square<br />
4. Create a keyframe on frames 10<br />
5. On keyframe 10 delete the square and draw a circle<br />
6. Click on any frame between keyframes 1 and 10<br />
7. In the properties panel select shape for the tween.<br />
8. Like before if a keyframe is not green right click on it and press create motion tween.<br />
<img src="http://asgsoft.net/tutes/pic014.gif" alt="" /> . now your time line should look like this <img src="http://asgsoft.net/tutes/pic015.jpg" alt="" />.</p>
<p><strong>Creating a red square to a blue square</strong></p>
<p>1) Create a new document<br />
2) Create a keyframe on frames 1<br />
3) On keyframe 1 draw a red square<br />
4) Create a keyframe on frames 10<br />
5) On keyframe 10 delete the square and draw a blue circle<br />
6) Click on any frame between keyframes 1 and 10<br />
7) In the properties panel select shape for the tween.<br />
 <img src='http://www.thewebmasterstool.com/tutorials/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Like before if a keyframe is not green right click on it and press create motion tween.</p>
<p>To change colour you select the square for example and then in the bucket in the properties panel change the colour or in the tool bar change the bucket colour to what every you want or from the colour swatches panel on the side. You may have noticed that these steps are very similar to the ones above the.</p>
<p><strong>Changing hello to how are you(morphing text)</strong></p>
<p>1) Create a new document<br />
2) Create a keyframe on frames 1<br />
3) Select the text tool and click on the work area<br />
4) Type hello<br />
5) Go to modify and the break apart<br />
6) Do the above step again<br />
7) Create a keyframe on frames 10<br />
 <img src='http://www.thewebmasterstool.com/tutorials/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> On keyframe 10 delete hello<br />
9) Select the text tool and click on the work area<br />
10) Type how are you<br />
11) Go to modify and the break apart<br />
12) Do the above step again.<br />
13) Click on any frame between keyframes 1 and 10<br />
14) In the properties panel select shape for the tween.<br />
15) Like before if a keyframe is not green right click on it and press shape tween in the properties panel<br />
16) Press return or enter.<br />
You will see that you can change the colour of the text on either keyframes to whatever you want but after breaking apart twice. The timeline should look like this. <img src="http://asgsoft.net/tutes/pic016.jpg" alt="" /></p>
<p>This all I have for you about tweens but here are some common web uses of motion tweens:</p>
<p>-from big to small and vice versa<br />
-from right to left and vice versa as like a marquee<br />
-fade in or out</p>
<p>These are the only ones I can think of right now but there are hundreds of other effects. If you have any problems please do not hesitate to contact me and i will be happy to help.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/tweens-and-animations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flash MX Interface introduction</title>
		<link>http://www.thewebmasterstool.com/tutorials/flash-mx-interface-introduction/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/flash-mx-interface-introduction/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:20:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/flash-mx-interface-introduction/</guid>
		<description><![CDATA[Here is the first tutorial for Macromedia Flash MX. I have tried to make it as simple as possible but with as much information as possible I hope you find it useful and enjoy it. Now let’s start. Macromedia Flash MX is the professional standard authoring tool for producing high-impact Web experiences. Whether you are [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the first tutorial for Macromedia Flash MX. I have tried to make it as simple as possible but with as much information as possible I hope you find it useful and enjoy it. Now let’s start. Macromedia Flash MX is the professional standard authoring tool for producing high-impact Web experiences. Whether you are creating animated logos, Web site navigation controls, long-form animations, entire Flash Web sites, or Web applications, games, picture galleries, you’ll find the power and flexibility of Flash ideal for your own creativity.</p>
<p><img src="http://asgsoft.net/tutes/image002.jpg" alt="" /></p>
<p>The above picture is a screenshot of Macromedia Flash MX user interface. It has:</p>
<p><strong>Menu<br />
Tools<br />
Colour Mixer<br />
Colour Swatches<br />
Components<br />
Answers<br />
Properties<br />
Actions-frame<br />
Timeline<br />
Layers<br />
Work area</strong></p>
<p>Here is everything explained as briefly and informative as possible so that you don’t get bored. </p>
<p>1:- <strong>Menu:</strong> There are 9 menus in flash they are:</p>
<p>1-File<br />
2- Edit<br />
3-View<br />
4- Insert<br />
5-Modify<br />
6- Text<br />
7-Controle<br />
8-Window<br />
9- Help</p>
<p>The menus will all be explained in detail next tutorial. I hope you don’t mind.</p>
<p>2:- <strong>Tools:</strong> There are 19 tools in the toolbar on the side. They are:</p>
<p>Arrow – for selection<br />
Brush – for drawing brush like strokes<br />
Eraser – for rubbing<br />
Eyedropper –to pick colour<br />
Fill Transform- sorry I don’t know how to use it<br />
Free Transform - to transform an object freely<br />
Hand – for moving during zooming in/out<br />
Ink Bottle – modify a brush stroke<br />
Lasso – for selection<br />
Line –to draw a line<br />
Oval –to draw an oval<br />
Paint Bucket –to fill a shape<br />
Pen –like the path tool in Photoshop<br />
Pencil –to draw freely like a normal pencil tool<br />
Rectangle –to draw a rectangle<br />
Selecting –for selection<br />
Sub selection –to select part of an object<br />
Text –to enter text in it.<br />
Zoom –to zoom into the stage.</p>
<p>3:- <strong>Colour Mixer:</strong> Is a tool where you mix colour to get the colour you want to fill in an object or a drawing.</p>
<p>4:- <strong>Colour Swatches:</strong> are common used colours and gradients. 216 are in the colour swatch but more can be added from the colour mixer panel.</p>
<p>5:- <strong>Components:</strong> Are basically form items but a bit more complicated and harder to use. I personally make the components my own.</p>
<p>6:- <strong>Answers:</strong> Is the help panel where new stuff, tutorials, and the read me file are available. It has an update button where the information there are updated from the internet connection</p>
<p>7:- <strong>Properties:</strong> This part is usually located at the bottom of the interface. When no object is selected it shows the properties of the flash file e.g. Background colour, size and what flash release to play it on. When an object is selected it shows the properties.</p>
<p>8:- <strong>Actions-(frame):</strong> It doesn’t always have to say frame. Anyway this is the place where flash code (actionscript) goes. The word frame is shown when no object is selected to it shows the actionscript of the frame. You can place actionscript in a symbol or a frame only.</p>
<p>9:- <strong>Timeline:</strong> Is the place where all actions are placed. It is like a storyboard for when making a film or a cartoon. There are several types of things that go on a timeline:</p>
<p>Keyframe- Is a main point. If it is shaded that means it has contents else it is a white un-shaded dot. <img src="http://asgsoft.net/tutes/image004.jpg" alt="" /></p>
<p>Frame: - Is a normal frame that doesn’t have to have content on it. <img src="http://asgsoft.net/tutes/image005.jpg" alt="" /></p>
<p>Tween: - Are several frames with at least two keyframes with the same contents but modified in size or colour. <img src="http://asgsoft.net/tutes/image006.jpg" alt="" /></p>
<p>10:- <strong>Layers:</strong> Like any other graphics program objects can be layered. There are several types of layers. They will be discussed in a later tutorial.</p>
<p>11:- <strong>Work area:</strong> Is the place where you place every visual item</p>
<p>That’s it really. If you have any problems please do not hesitate to ask me and I will be back as soon as I can.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/flash-mx-interface-introduction/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Flash Cookies</title>
		<link>http://www.thewebmasterstool.com/tutorials/flash-cookies/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/flash-cookies/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:20:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP Coding]]></category>

		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/flash-cookies/</guid>
		<description><![CDATA[OK here is how to create a cookie in Flash backened with PHP.
Firstly we start with the Flash file.
1. Create a flash button. To do so draw a rectangle, right click on it and select make symbol. select button then press ok.
2. In the action panel of the button add the following:
PLAIN TEXT
Actionscript:




on &#40;release&#41; &#123;


&#160; [...]]]></description>
			<content:encoded><![CDATA[<p>OK here is how to create a cookie in Flash backened with PHP.</p>
<p>Firstly we start with the Flash file.</p>
<p>1. Create a flash button. <strong>To do so draw a rectangle, right click on it and select make symbol. select button then press ok.</strong><br />
2. In the action panel of the button add the following:</p>
<div class="igBar"><span id="lactionscript-4"><a href="#" onclick="javascript:showPlainTxt('actionscript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-4">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; cookie = <span style="color: #ff0000;">"flashsite"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"input.php"</span>, <span style="color: #ff0000;">""</span>, <span style="color: #ff0000;">"POST"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
3. On the action for the frame add the following:</p>
<div class="igBar"><span id="lactionscript-5"><a href="#" onclick="javascript:showPlainTxt('actionscript-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-5">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cookie = <span style="color: #ff0000;">"value"</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>4. Now you have set a variable as soon as the SWF loads called cookie, when you press the button it changes to flashsite. the seconline takes you to input.php where it sees the variable and acts upon it.<br />
5. My input.php looks like this:</p>
<div class="igBar"><span id="lphp-6"><a href="#" onclick="javascript:showPlainTxt('php-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-6">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$cookie</span> = <span style="color:#0000FF;">$HTTP_POST_VARS</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'cookie'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$cookie</span> == <span style="color:#FF0000;">'flashsite'</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"asgsoft_redirect"</span>, <span style="color:#0000FF;">$cookie</span>, <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>+<span style="color:#CC66CC;color:#800000;">31536000</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Location: index.php"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$cookie</span> == <span style="color:#FF0000;">'nonflash'</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"asgsoft_redirect"</span>, <span style="color:#0000FF;">$cookie</span>, <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>+<span style="color:#CC66CC;color:#800000;">31536000</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Location: nonflash"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$cookie</span> == <span style="color:#FF0000;">'skipintro'</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/setcookie"><span style="color:#000066;">setcookie</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"asgsoft_redirect"</span>, <span style="color:#0000FF;">$cookie</span>, <a href="http://www.php.net/time"><span style="color:#000066;">time</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>+<span style="color:#CC66CC;color:#800000;">31536000</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/header"><span style="color:#000066;">header</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"Location: index.php?scene2"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>6. This is part of mu upcoming site where it allows the user to select whether to see flash/nonflash site. if they select flash then whether to see the into or not.</p>
<p>I hope this has been helpful to somebody</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/flash-cookies/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Random Banner for each visit</title>
		<link>http://www.thewebmasterstool.com/tutorials/random-banner-for-each-visit/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/random-banner-for-each-visit/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:20:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/random-banner-for-each-visit/</guid>
		<description><![CDATA[Flash has never been so interactive. In this tutorial i will be showing you how to load up a random swf each visit. So lets start!
1- rename all your desired movies into banner(number).swf eg banner1.swf,banner1.swf they have to consiguative numbers starting at 1
2- Load up flash
3- go to windows>actions
Enter the following:
PLAIN TEXT
Actionscript:




itemtotal = 2; //total [...]]]></description>
			<content:encoded><![CDATA[<p>Flash has never been so interactive. In this tutorial i will be showing you how to load up a random swf each visit. So lets start!</p>
<p>1- rename all your desired movies into banner(number).swf eg banner1.swf,banner1.swf they have to consiguative numbers starting at 1<br />
2- Load up flash<br />
3- go to windows>actions</p>
<p>Enter the following:</p>
<div class="igBar"><span id="lactionscript-8"><a href="#" onclick="javascript:showPlainTxt('actionscript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-8">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">itemtotal = <span style="color: #cc66cc;color:#800000;">2</span>; <span style="color: #808080; font-style: italic;">//total banners that are going to be viewed randomly</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">fscommand</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"flashpath"</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">temptotal = itemtotal;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">movieprefix = <span style="color: #ff0000;">"banner"</span>;<span style="color: #808080; font-style: italic;">//as for the file name set previosly</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">aItemTemp = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//set a new arrey</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">aMovie = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//set another new arrey</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">newvar = <span style="color: #0066CC;">math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>*<span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>+<span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">// the alotherigom to work out the number which is going to be viewed.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">loadMovieNum</span><span style="color: #66cc66;">&#40;</span>movieprefix+<span style="color: #66cc66;">&#40;</span>newvar<span style="color: #66cc66;">&#41;</span>+<span style="color: #ff0000;">".swf"</span>, <span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//loads the movie </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>test the movie by clicking control+ enter again and again(that will refresh it)<br />
Tell me,how easy was that!<br />
If you encounter any problems please do not hesitat to contact me. <img src='http://www.thewebmasterstool.com/tutorials/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/random-banner-for-each-visit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Movement + Rotation In Flash</title>
		<link>http://www.thewebmasterstool.com/tutorials/movement-rotation-in-flash/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/movement-rotation-in-flash/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:20:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/movement-rotation-in-flash/</guid>
		<description><![CDATA[Have you seen these flash space games where you can move and rotate a spaceship. well here is how to do it.
1- Load up flash MX and set the document size to 550 by 400. to do this go to modify>document.
2- create a spaceship what ever you want it to be.
3- select it and press [...]]]></description>
			<content:encoded><![CDATA[<p>Have you seen these flash space games where you can move and rotate a spaceship. well here is how to do it.</p>
<p>1- Load up flash MX and set the document size to 550 by 400. to do this go to modify>document.</p>
<p>2- create a spaceship what ever you want it to be.</p>
<p>3- select it and press on F8 select movieclip and the press ok.<br />
Press on the spaceship now and load up the actions panel by going to windows>actions. make sure it says Actions-Movie clip not Actions-frame.<br />
add the following in the actions box:</p>
<div class="igBar"><span id="lactionscript-10"><a href="#" onclick="javascript:showPlainTxt('actionscript-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-10">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">onClipEvent</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">thrust = <span style="color: #cc66cc;color:#800000;">1</span>; <span style="color: #808080; font-style: italic;">//sets speed</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">decay = <span style="color: #cc66cc;color:#800000;">1</span>;<span style="color: #808080; font-style: italic;">//sets strenght not needed at the moment</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">maxSpeed = <span style="color: #cc66cc;color:#800000;">15</span>;<span style="color: #808080; font-style: italic;">//maximum speed</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">onClipEvent</span> <span style="color: #66cc66;">&#40;</span>enterFrame<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">isDown</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">RIGHT</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #808080; font-style: italic;">//if right button is down</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">_rotation</span> += <span style="color: #cc66cc;color:#800000;">10</span>; <span style="color: #808080; font-style: italic;">//rotate 10 degreese clockwise</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">isDown</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">LEFT</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #808080; font-style: italic;">//if left button is down</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">_rotation</span> -= <span style="color: #cc66cc;color:#800000;">10</span>; <span style="color: #808080; font-style: italic;">//rotate 10 degreese anti-clockwise</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">isDown</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Key</span>.<span style="color: #0066CC;">UP</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><span style="color: #808080; font-style: italic;">//if up button is down</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">xSpeed += thrust*<span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sin</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_rotation</span>*<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span>/<span style="color: #cc66cc;color:#800000;">180</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ySpeed += thrust*<span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">cos</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_rotation</span>*<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span>/<span style="color: #cc66cc;color:#800000;">180</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">xSpeed *= decay;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ySpeed *= decay; <span style="color: #808080; font-style: italic;">//slow down</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">speed = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sqrt</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>xSpeed*xSpeed<span style="color: #66cc66;">&#41;</span>+<span style="color: #66cc66;">&#40;</span>ySpeed*ySpeed<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>speed&gt;maxSpeed<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">xSpeed *= maxSpeed/speed;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ySpeed *= maxSpeed/speed;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">_y</span> -= ySpeed;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">_x</span> += xSpeed;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">//make the ship come back on screen if it goes out of view</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_y&lt;<span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">_y</span> = <span style="color: #cc66cc;color:#800000;">400</span>; <span style="color: #808080; font-style: italic;">// document height</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_y&gt;<span style="color: #cc66cc;color:#800000;">400</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">_y</span> = <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_x&lt;<span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">_x</span> = <span style="color: #cc66cc;color:#800000;">550</span>; <span style="color: #808080; font-style: italic;">//document width</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_x&gt;<span style="color: #cc66cc;color:#800000;">550</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">_x</span> = <span style="color: #cc66cc;color:#800000;">0</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>test the movie by clicking control+ enter<br />
That should do the job neatly. If you have any problems or errors coming up please do not hesitate to contact me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/movement-rotation-in-flash/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Making an Simple mouse follower</title>
		<link>http://www.thewebmasterstool.com/tutorials/making-an-simple-mouse-follower/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/making-an-simple-mouse-follower/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:20:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/making-an-simple-mouse-follower/</guid>
		<description><![CDATA[1- Draw what ever you want to follow the mouse.
2- Select it and press F8 make it a movie clip.
3- Click on the new movie clip
4- load up the actions panel from windows>action
insert the following
PLAIN TEXT
Actionscript:




onClipEvent &#40;load&#41; &#123; //when the movie loads


Mouse.hide&#40;&#41;; //hide the mouse


startDrag&#40;"", true&#41;;//start to follow the mouse.


&#125; 






press control and enter to [...]]]></description>
			<content:encoded><![CDATA[<p>1- Draw what ever you want to follow the mouse.<br />
2- Select it and press F8 make it a movie clip.<br />
3- Click on the new movie clip<br />
4- load up the actions panel from windows>action</p>
<p>insert the following</p>
<div class="igBar"><span id="lactionscript-12"><a href="#" onclick="javascript:showPlainTxt('actionscript-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-12">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">onClipEvent</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #808080; font-style: italic;">//when the movie loads</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">Mouse</span>.<span style="color: #0066CC;">hide</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//hide the mouse</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">startDrag</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">""</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//start to follow the mouse.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>press control and enter to test it.</p>
<p>What do you think.<br />
If you have any problems please don't hesitate to ask.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/making-an-simple-mouse-follower/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Basic Buttons</title>
		<link>http://www.thewebmasterstool.com/tutorials/basic-buttons/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/basic-buttons/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:20:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/basic-buttons/</guid>
		<description><![CDATA[1- Load up flash
2- draw a rectangle
3- select it
4- press F8
5- Select button
6- Press OK
7- select it
8- go to windows>actions
9- enter the following
PLAIN TEXT
Actionscript:




on &#40;release&#41; &#123; // means when pressed


getURL"http://www.yoursite.co.uk"&#41;; //www.yoursite.co.uk); //go to this url [b]must have the http://www. part[/b]


&#125; 






10- right click on the button and press edit
11- you now see the states of [...]]]></description>
			<content:encoded><![CDATA[<p>1- Load up flash<br />
2- draw a rectangle<br />
3- select it<br />
4- press F8<br />
5- Select button<br />
6- Press OK<br />
7- select it<br />
8- go to windows>actions<br />
9- enter the following</p>
<div class="igBar"><span id="lactionscript-14"><a href="#" onclick="javascript:showPlainTxt('actionscript-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-14">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #808080; font-style: italic;">// means when pressed</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">getURL</span><span style="color: #ff0000;">"http://www.yoursite.co.uk"</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//www.yoursite.co.uk); //go to this url [b]must have the http://www. part[/b]</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>10- right click on the button and press edit<br />
11- you now see the states of a button<br />
12- right click on each of the states and press insert a keyframe<br />
14- change the colour of the rectangles.<br />
15- test the movie by clicking control+ enter by clicking on the rectangle.<br />
16- see what happens</p>
<p>If you have any problems please do not hesitate to contact me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/basic-buttons/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Search Page</title>
		<link>http://www.thewebmasterstool.com/tutorials/search-page/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/search-page/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:19:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP Coding]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/search-page/</guid>
		<description><![CDATA[OK This tutorial will show you how to make a search page.
Firstly we make a form. I am going to use this:
PLAIN TEXT
HTML:




&#60;form method="post" action="searchpage.php"&#62;


&#60;p&#62;Please enter keyword.&#60;/p&#62;


&#60;p&#62;


&#60;input name="word" type="text" size=25 maxlength=25&#62;


&#60;/p&#62;


&#60;p&#62;


&#60;input type="Submit" name="Submit" value="Submit"&#62;


&#60;/p&#62;


&#60;/form&#62; 






This is the form where we will enter the keywords. Now the next step is to make the searchpage.php.
It will look [...]]]></description>
			<content:encoded><![CDATA[<p>OK This tutorial will show you how to make a search page.</p>
<p>Firstly we make a form. I am going to use this:</p>
<div class="igBar"><span id="lhtml-17"><a href="#" onclick="javascript:showPlainTxt('html-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">HTML:</span>
<div id="html-17">
<div class="html">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/form.html"><span style="color: #000000; font-weight: bold;">&lt;form</span></a> <span style="color: #000066;">method</span>=<span style="color: #ff0000;">"post"</span> <span style="color: #000066;">action</span>=<span style="color: #ff0000;">"searchpage.php"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span>Please enter keyword.<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"word"</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"text"</span> <span style="color: #000066;">size</span>=<span style="color: #cc66cc;color:#800000;">25</span> <span style="color: #000066;">maxlength</span>=<span style="color: #cc66cc;color:#800000;">25</span>&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">&lt;p&gt;</span></a></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><a href="http://december.com/html/4/element/input.html"><span style="color: #000000; font-weight: bold;">&lt;input</span></a> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">"Submit"</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">"Submit"</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">"Submit"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/p&gt;</span></span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/form&gt;</span></span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This is the form where we will enter the keywords. Now the next step is to make the searchpage.php.</p>
<p>It will look like this</p>
<div class="igBar"><span id="lphp-18"><a href="#" onclick="javascript:showPlainTxt('php-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-18">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// connect to db</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$db</span> = <a href="http://www.php.net/mysql_connect"><span style="color:#000066;">mysql_connect</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"localhostt"</span>, <span style="color:#FF0000;">"username"</span>, <span style="color:#FF0000;">"password"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mysql_select_db"><span style="color:#000066;">mysql_select_db</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"dbname"</span>,<span style="color:#0000FF;">$db</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//check something is sent</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'word'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$word</span>= <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">"word"</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// search query</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$result</span> = <a href="http://www.php.net/mysql_query"><span style="color:#000066;">mysql_query</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"SELECT * FROM `table` WHERE `field` LIKE '%$word%'"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$postword</span> = <span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'word'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Search Results for: &lt;strong&gt; $postword &lt;/strong&gt; &lt;br /&gt;"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#FF0000;">"&lt;p&gt; &lt;/p&gt;"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#FF0000;">"&lt;p&gt; &lt;/p&gt;"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#FF0000;">"&lt;p&gt; &lt;/p&gt;"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#FF0000;">"&lt;p&gt; &lt;/p&gt;"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//get results</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">while</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$get</span>=<a href="http://www.php.net/mysql_fetch_array"><span style="color:#000066;">mysql_fetch_array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$result</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$date</span> = <span style="color:#0000FF;">$get</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'date'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$name</span> = <span style="color:#0000FF;">$get</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'name'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$title</span>= <span style="color:#0000FF;">$get</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'title'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//show results</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"&lt;strong&gt;$title&lt;/strong&gt; was added on &lt;strong&gt;$date&lt;/strong&gt; by &lt;strong&gt;$name&lt;/strong&gt;"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#FF0000;">"&lt;p&gt;&lt;/p&gt;"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a><span style="color:#FF0000;">"&lt;p&gt;&lt;/p&gt;"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// if nothing is sent</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/die"><span style="color:#000066;">die</span></a> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"No search word specified"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/search-page/feed/</wfw:commentRss>
		</item>
		<item>
		<title>mail()</title>
		<link>http://www.thewebmasterstool.com/tutorials/mail/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/mail/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:19:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP Coding]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/mail/</guid>
		<description><![CDATA[A famous function, yet mis-used is mail().
Mail function can be used in several ways, eg a contact form and auto-senders suitable for confirming registration.
Ok the function is used like this:
PLAIN TEXT
PHP:




mail&#40;$to, $subject, $message, $headers&#41;; 






you can either set the variables or enter them manually like this:
PLAIN TEXT
PHP:




mail&#40;myemail@mycompany.com, message subject, message , headers&#41;; 






Although its preferred [...]]]></description>
			<content:encoded><![CDATA[<p>A famous function, yet mis-used is mail().</p>
<p>Mail function can be used in several ways, eg a contact form and auto-senders suitable for confirming registration.</p>
<p>Ok the function is used like this:</p>
<div class="igBar"><span id="lphp-24"><a href="#" onclick="javascript:showPlainTxt('php-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-24">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mail"><span style="color:#000066;">mail</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$to</span>, <span style="color:#0000FF;">$subject</span>, <span style="color:#0000FF;">$message</span>, <span style="color:#0000FF;">$headers</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>you can either set the variables or enter them manually like this:</p>
<div class="igBar"><span id="lphp-25"><a href="#" onclick="javascript:showPlainTxt('php-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-25">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/mail"><span style="color:#000066;">mail</span></a><span style="color:#006600; font-weight:bold;">&#40;</span>myemail@mycompany.com, message subject, message , headers<span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Although its preferred to use variables because its easier to use and modify later.</p>
<p>To make sure the message was sent correctly you can use the following "if block"</p>
<div class="igBar"><span id="lphp-26"><a href="#" onclick="javascript:showPlainTxt('php-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-26">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/mail"><span style="color:#000066;">mail</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$to</span>,<span style="color:#0000FF;">$subject</span>,<span style="color:#0000FF;">$message</span>,<span style="color:#0000FF;">$headers</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Email Sent"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Email Sending Failed"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If you are making an auto-sender you add this to the page that has the email address passed in most probably by a form, so you do this:</p>
<div class="igBar"><span id="lphp-27"><a href="#" onclick="javascript:showPlainTxt('php-27'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-27">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$to</span>=<span style="color:#FF0000;">"someeila@comapny.com"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$from</span>=<span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'email'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$message</span>=<span style="color:#FF0000;">"my message"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$subject</span>=<span style="color:#FF0000;">"Subject of message"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$headers</span> = <span style="color:#FF0000;">"From: $from"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/mail"><span style="color:#000066;">mail</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$to</span>,<span style="color:#0000FF;">$subject</span>,<span style="color:#0000FF;">$message</span>,<span style="color:#0000FF;">$headers</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Email Sent messaage"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Email Sending Failed mesasage"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>The other example i mentioned at the beginning was the contact form, look at this form, it has both parts in one PHP page:</p>
<div class="igBar"><span id="lphp-28"><a href="#" onclick="javascript:showPlainTxt('php-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-28">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/isset"><span style="color:#000066;">isset</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$submit</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"&lt;form action='$_SERVER[PHP_SELF]' method='post'&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;p&gt;Name: &lt;input type='text' name='name'&gt;&lt;br&gt;&lt;p&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;p&gt;Email: &lt;input type='text' name='email'&gt;&lt;br&gt;&lt;p&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">Message: &lt;br&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;textarea name='message' cols='40' rows='15'&gt;&lt;/textarea&gt;&lt;br&gt;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;input type='submit' name='submit' value='send'&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">&lt;/form&gt;"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$to</span>=<span style="color:#FF0000;">"asmgomaa@gmail.com"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$from</span>=<span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'email'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$message</span>=<span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'message'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$subject</span>=<span style="color:#FF0000;">"Website Contact Form"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$submit</span>=<span style="color:#0000FF;">$_POST</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'submit'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$headers</span> = <span style="color:#FF0000;">"From: $from"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/mail"><span style="color:#000066;">mail</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$to</span>,<span style="color:#0000FF;">$subject</span>,<span style="color:#0000FF;">$message</span>,<span style="color:#0000FF;">$headers</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Email Sent"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">"Email Sending Failed"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>An example of it is available here .</p>
<p>I hope this is helpful and makes the mail() function clear and easier to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/mail/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Date()</title>
		<link>http://www.thewebmasterstool.com/tutorials/date/</link>
		<comments>http://www.thewebmasterstool.com/tutorials/date/#comments</comments>
		<pubDate>Sun, 29 Jul 2007 19:19:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP Coding]]></category>

		<guid isPermaLink="false">http://www.thewebmasterstool.com/tutorials/date/</guid>
		<description><![CDATA[This is a very good function that can be used to date anything from last login to date adding a specific post. It is used in PHP 4 and 5. It is a relatively easy function to use because it goes like this:
PLAIN TEXT
PHP:




date&#40;"parameters"&#41;; 






but its no use like this so we make it part [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very good function that can be used to date anything from last login to date adding a specific post. It is used in PHP 4 and 5. It is a relatively easy function to use because it goes like this:</p>
<div class="igBar"><span id="lphp-32"><a href="#" onclick="javascript:showPlainTxt('php-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-32">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/date"><span style="color:#000066;">date</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"parameters"</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>but its no use like this so we make it part of a variable</p>
<div class="igBar"><span id="lphp-33"><a href="#" onclick="javascript:showPlainTxt('php-33'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-33">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$date</span> = <a href="http://www.php.net/date"><span style="color:#000066;">date</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">"parameters"</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>the parameters you put inside are specific and are in the table below. i got this table from the PHP official site: <a href="http://uk.php.net/date">http://uk.php.net/date</a></p>
<p>you can also easily format time so this:</p>
<div class="igBar"><span id="lphp-34"><a href="#" onclick="javascript:showPlainTxt('php-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-34">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/date"><span style="color:#000066;">date</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'l dS <span style="color:#000099; font-weight:bold;">\o</span>f F Y h:i:s A'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>will give Monday 12th of November 2005 1:04:46 PM</p>
<p>I hope you find this helpful</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thewebmasterstool.com/tutorials/date/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
