<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Layers Magazine &#187; Justin Finley</title>
	<atom:link href="http://www.layersmagazine.com/author/justin/feed" rel="self" type="application/rss+xml" />
	<link>http://www.layersmagazine.com</link>
	<description>The How-To Magazine for Everything Adobe. Quick tips and tutorials for the entire Adobe Creative Suite.</description>
	<lastBuildDate>Fri, 20 Nov 2009 15:26:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Passing Variables Using Flash and Dreamweaver</title>
		<link>http://www.layersmagazine.com/flash-passing-variables.html</link>
		<comments>http://www.layersmagazine.com/flash-passing-variables.html#comments</comments>
		<pubDate>Wed, 21 Mar 2007 15:46:54 +0000</pubDate>
		<dc:creator>Justin Finley</dc:creator>
				<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.layersmagazine.com/passing-variables.html</guid>
		<description><![CDATA[This tutorial will show you how to set paths to media content by passing variables to flash using html, as opposed to &#8220;hard coding&#8221; paths inside of flash. This allows for slightly more dynamic flash video delivery (especially if used as part of a bigger application), easier and faster updateability, and just less hassle overall.


Let’s [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will show you how to set paths to media content by passing variables to flash using html, as opposed to &#8220;hard coding&#8221; paths inside of flash. This allows for slightly more dynamic flash video delivery (especially if used as part of a bigger application), easier and faster updateability, and just less hassle overall.
</p>
<p><span id="more-1031"></span></p>
<p>Let’s get started by creating a new .FLA file. </p>
<p>First thing to do is to set up our layers. We will need one layer named &#8220;actions&#8221; that will hold all of our script and another that will have our video players on it, so we will name it &#8220;player&#8221;.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/1.jpg"></p>
<p>The size of the stage and any video players that you will use should depend on your personal project&#8217;s specs. For this tutorial, the video I will be delivering is 320&#215;240, so I will set my stage to 320&#215;300 just to have a little extra room at the bottom of the stage and make space for the FLVPlayback component&#8217;s controls.<br />
Create a new folder on your desktop, name it anything you like, and save your .fla document to this new folder.  </p>
<p>Next thing we will do is set up a local file structure. Usually this would be on a remote server, but for this tutorial we will be testing right off of our own desktop machine. The folder I just created will contain my working .fla document (for tutorial purposes), a .swf file, html file, and the FLV Playback player&#8217;s skin .swf. Also, inside of that folder I will create another folder labeled &#8220;video&#8221;, and in this folder I will keep the .flv video file that I will be delivering, which is named &#8220;psworld.flv&#8221;. </p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/real2.jpg"></p>
<p>The scripting that is used to make this work, while very similar, differs slightly between the FLVPlayback Component and the MediaDisplay Component. I will show you how to set the FLVPlayer first, followed by the MediaDisplay.</p>
<h3 class="step">FLVPlayback Component.</h3>
<h3 class="step">Step 1</h3>
<p>Open the Components window, Window>Components (Ctl+F7), under FLV PLayback &#8211; Player 8, click-and-drag the FLVPlayback component onto the stage in frame 1 of the &#8220;player&#8221; layer.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/2.jpg"></p>
<h3 class="step">Step 2</h3>
<p>Now, what we would usually do here to set a video path would be to open the Component Inspector (Window>Component Inspector or Alt+F7), and enter the path to our video right where it says &#8220;contentPath&#8221; , as shown below. The path from my .swf file to the video would be &#8220;video/psworld.flv&#8221;. With this path set, when you test the movie (Ctl+Enter), you should see the video play.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/3.jpg"></p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/4.jpg"></p>
<p>The video I am using for demonstration purposes is courtesy of <a href="http://www.photoshopworld.com" target="_<code></code>blank">Photoshop World</a>. It's a really awesome educational event for creative professionals, and I highly recommend it if you ever get a chance to go...anyway, back to the tutorial at hand...</p>
<p>This method of setting the content path works fine but does not allow for much flexibility in terms of updatability or dynamics. If I needed to change this .swf in anyway, say, to change the path of the video, or put in a new video, anything at all, I would have to find my original working .fla document (if you even can), open it up, change whatever I need to change, render out a new .swf, upload that .swf and possibly have to open the html document delivering that swf and change it too. As a web developer, we try to keep things as flexible and easy to update as possible, and that just doesn't cut it.</p>
<p>Instead we will use Actionscript to set the path of the video and pass a variable from html to the .swf telling it where to pull the video from. This allows me to just open that one html file, make my change and I’m done. This results in much less hassle than the other method and also conserves server disk space by using only one .swf to deliver multiple videos.</p>
<h3 class="step">Step 3</h3>
<p>Open the Component Inspector (Window>Component Inspector or Alt+F7), and delete the path from the "contentPath" field. Now, with the FLVPlayback component selected on the stage, give it an instance name of "player" in the Properties Inspector so that we may refer to it by this name in the Actionscript.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/5.jpg"></p>
<h3 class="step">Step 4</h3>
<p>Now we will set up our Actionscript.<br />
Select the blank keyframe in frame 1 of the actions layer, and open the Actions window (Window>Actions or F9).</p>
<p>Insert this code:</p>
<p><code>stop();<br />var passed:String = video;<br />player.contentPath= video;</code></p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/6.jpg"></p>
<p>Line 1 is a stop function telling the play head to remain on this frame, since it’s the only frame of the movie, its not REALLY necessary...</p>
<p>Next, we define the variable we will use to set the path to our video. In this case, I am going to call the variable "video". Now, "var passed: string" is saying that the variable we will be creating is a string, or succession of letters and numbers, such as the word video is, and we set that equal to the word "video". Video, in this instance, could be called anything... waffles, tacos, anything... since we are setting a video, video is appropriate.</p>
<p>The next line sets the FLVPlayback component's (which we named "player" in the component spector) contentPath to equal the variable video, which we will set with our html code. </p>
<h3 class="step">Step 5</h3>
<p>Last thing left to do is to set the variable in the html. Go to File>Publish Preview>HTML. This will create a html file in the same folder that contains your other project files. As of right now, if you preview this file, you will notice it's not working. This is because we have not set the variable in our code yet. Open this newly-created html file with Dreamweaver or your other favorite code-editing program. </p>
<p>In my case, I have named my working .fla file "passvariables", so my .swf file and my html file both share this name. Yours will be dependant on what you named your file originally. </p>
<p>In the html code, you will see where it references the .swf file in 2 places.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/7.jpg"></p>
<p>To define and pass the "video" variable we created, we will add this onto the end of the .swf path:<br />
<code>?video=video/psworld.flv</code></p>
<p>which will result in the full path to the .swf being:<br />
<code>passvariables.swf?video=video/psworld.flv</code></p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/8.jpg"></p>
<p>We are defining video as the path "video/psworld.flv". So, inside the .swf file, where we referenced “video” in the code, that video variable is replaced with "video/psworld.flv". </p>
<p>Save your html file, and then open it with your favorite browser. The video should now be playing.<br />
The best part is, if we ever need to change the video that is being delivered, all we have to do is edit this single html file.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/19/9.jpg"></p>
<p>You can accomplish the same thing using the MediaDisplay Component, however the action scripting varies slightly. </p>
<h3 class="step">MediaDisplay Component</h3>
<p>Delete the FLVPlayback Component off of the stage, open the Components window (Window>Components or Ctl+F7) and drag out the MediaDisplay Component onto the stage. With it selected, give it the instance name "player" in the Properties inspector. By using the same instance name as before, we will only have to alter our action script slightly. </p>
<p>Select the first frame of your actions layer, where you have place all of your code thus far, and open the Actions window.  The only thing we will need to change here is the very last line of code. </p>
<p>We will replace this:<br />
<code>player.contentPath= video;</code></p>
<p>With this:<br />
<code>player.setMedia(video);</code></p>
<p>Export the new .swf, and simply hit Refresh on your browser. The same video will now play through the MediaDisplay Component.</p>
<p>That does it for this tutorial; hopefully it will save you some valuable time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.layersmagazine.com/flash-passing-variables.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Place Only What You Want From an AI file.</title>
		<link>http://www.layersmagazine.com/place-only-what-you-want-from-an-ai-file.html</link>
		<comments>http://www.layersmagazine.com/place-only-what-you-want-from-an-ai-file.html#comments</comments>
		<pubDate>Thu, 08 Feb 2007 16:26:11 +0000</pubDate>
		<dc:creator>Justin Finley</dc:creator>
				<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[InDesign]]></category>

		<guid isPermaLink="false">http://www.layersmagazine.com/place-only-what-you-want-from-an-ai-file.html</guid>
		<description><![CDATA[Recently, I was designing a new logo in Illustrator. Many of the designs I preferred had possible alternate versions in the same file. To present my one favorite logo from each file, I decided to show the client how the logos would work centered at the bottom of an existing ad. Is there a way [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I was designing a new logo in Illustrator. Many of the designs I preferred had possible alternate versions in the same file. To present my one favorite logo from each file, I decided to show the client how the logos would work centered at the bottom of an existing ad. Is there a way to make InDesign ignore my alternate logo designs when using the centering feature (Object > Fitting > Center Content) to center just my favorite logo from each Illustrator file?</p>
<p>Sure! I set up a Crop Area in Illustrator with just the favorite logo centered in the Crops. (Select preferred logo with Selection tool, drag Ruler Guides to the center Bounding Box points horizontally and vertically to find the logo&#8217;s center. Draw a Rectangle from this center outward by click-dragging using the Rectangle tool with the Option (Alt) key pressed. With the Rectangle still selected, go to Object > Crop Area > Make and Save the file. When bringing the logo into InDesign (File > Place), check Show Import Options and in the window that opens in the General Options section choose Crop in the Crop To section. InDesign will place ONLY the part of the Illustrator file within the Crop Area, ignoring all of the alternate versions as if they don&#8217;t exist. So when I go to Object > Fitting > Center Content, it works perfectly to center my preferred logo.</p>
<p><span id="more-968"></span></p>
<p>Tip provided by Jeff Witchel, Certified Adobe&reg; Training Provider.</p>
<p><!-- MODULE: ads/large_rectangle NOT FOUND --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.layersmagazine.com/place-only-what-you-want-from-an-ai-file.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Complex Button Animation in Adobe Flash</title>
		<link>http://www.layersmagazine.com/flash-button-animation.html</link>
		<comments>http://www.layersmagazine.com/flash-button-animation.html#comments</comments>
		<pubDate>Wed, 31 Jan 2007 10:34:27 +0000</pubDate>
		<dc:creator>Justin Finley</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.layersmagazine.com/complex-button-animation.html</guid>
		<description><![CDATA[
One of the most effective ways of adding  interactivity to your flash website or interface is to have animated button  rollovers, also known as &#34;complex buttons&#34;.&#160; A complex button has the same up, over and  down state that your standard &#34;simple button&#34; would have, but allows you  to join the different [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/thumb.jpg" hspace="10" align="left"/></p>
<p>One of the most effective ways of adding  interactivity to your flash website or interface is to have animated button  rollovers, also known as &quot;complex buttons&quot;.&nbsp; A complex button has the same up, over and  down state that your standard &quot;simple button&quot; would have, but allows you  to join the different states with animation. </p>
<p><span id="more-919"></span></p>
<p>&nbsp;</p>
<p><script type="text/javascript">createObject('swf','/images/tutorials/design/flash/jf3/complexebuttontut.swf','width','170','height','51','scale','exactfit','quality','best','allowScriptAccess','sameDomain','bgcolor','#006666');</script></p>
<p><P>There are a few different ways to achieve this same effect within Flash. I&#8217;m going to show you my personal favorite. I prefer this technique because it allows the flexibility of having one animation from the &quot;up&quot; to the &quot;over&quot; state and a different animation going backwards from the &quot;over&quot; to &quot;up&quot; state if you wish. </P> </p>
<h3 class="step">STEP 1:<strong> Prepare Flash Document</strong></h3>
<p>First, I&#8217;m going to set up my Flash document.  The button that I created in Photoshop will require a 170 x 50 stage, and I will set  my frame rate to 30 frames per second. </p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/1.jpg" /></p>
<p>&nbsp;</p>
<h3 class="step">STEP 2: <strong>Create Movie Clip Container </strong></h3>
<p>Next, we are going to create a movie clip that will  contain the assembly of our button. Go to Insert &gt; New Symbol&hellip; (Ctl+F8) to  create the container clip. In the Create New Symbol dialog, select Movie  Clip and give it the name &quot;mc_aboutContainer&quot;. I am assuming this button will be  my &quot;About&quot; link, hence the name.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/2.jpg" /></p>
<h3 class="step">STEP 3:<strong> Create Button  </strong></h3>
<p>Rename Layer 1, &quot;BG&quot;, as it will contain our  button graphic. Now, in the first frame of the BG layer, either create a  background for your button or Import one you&#8217;ve already made in Photoshop. This  should be just the background of the button, no text. If you plan on animating  anything about this background (color, transparency, etc.) you should convert  it to a movie clip as well. To convert your button background to a movie clip, select it and hit F8 or Modify &gt; Convert to Symbol. Select movie  clip, and name it &quot;mc_aboutButton&quot;.</p>
<h3 class="step">STEP 4: <strong>Create Button Label </strong></h3>
<p>Next, we will create the text that will be on our  button. Create a new layer and name it &quot;Label&quot;. In the first frame of this new  layer use the Text tool to add text to your button. Mine will say ABOUT since  this is the link to my &quot;about us&quot; page. If you plan on animating the text (I  do), convert it to a Movie clip by selecting the newly-created text and hitting  F8 (Modify &gt; Convert to Symbol), select Movie Clip and name it &quot;mc_about&quot;.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/3.jpg" /></p>
<h3 class="step">STEP 5:  <strong>Set Up Frame Labels</strong></h3>
<p>Now we are going to set up a layer that  contains frame labels. You can use these labels as cue points and to give  direction to the play head.</p>
<p>Create a new layer and name it &quot;Frame Labels&quot; . In  the 2nd frame insert a blank keyframe (Insert &gt; Timeline &gt;  Blank Keyframe or right-click on the frame itself and select Insert Blank  Keyframe). With the blank keyframe in frame 2 selected, go to the Properties  Inspector window and where it says FRAME enter &quot;s1&quot; in the box. Do the same  thing in frame 11, but name this one &quot;s2&quot;. You should  now see these frame labels displayed in your Timeline window. Now select  frame 20, right-click and select Insert Frame. I am planning on having a 20-frame animation and this will signify the end of it. So &quot;s1&quot; should extend from  frame 2 to frame 10 and &quot;s2&quot; should be from frame 11 to 20, as shown below.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/4.jpg" /></p>
<h3 class="step">STEP 6: Actions Layer </h3>
<p>Create a new layer above your Frame Labels layer and name it &quot;Actions&quot;. In the first frame, open the script window (F9) and add a stop; <code style="font-size:12px;">stop();</code> or (ESC+S+T). Now add another stop function to frame 10. The Actions layer layout and the Frame Labels layer layout should look like this: </p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/5.jpg" /></p>
<h3 class="step">STEP 7: Create a Hit Area	 </h3>
<p>Now we will need to create a hit area for the  button which will also contain the scripting that will make our button  animation work. </p>
<p>Create a new layer, name it &quot;Hit Area&quot;. Select  the first frame of this new layer, then select your Rectangle Tool from the tool bar  and draw out a rectangle over the top of the button. This represents the  clickable area of the button. Select frame 20 of the HIT AREA layer, right-click and choose Insert Frame to extend the hit area out to frame 20, the  duration of our animation. Select the rectangle, hit F8 (Modify &gt; Convert to  Symbol) to convert it to a Symbol. In the dialog that appears, select Button  and name it &quot;btn_aboutHitArea&quot;.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/6.jpg" /></p>
<p>Now double-click your hit area button to enter its Editing Mode. Drag the keyframe that is under the &quot;UP&quot; label to under the &quot;HIT&quot; label, thus defining the hit area. (Note: This is also the place you would add sounds to the Up, Over, Down or Hit states by adding blank keyframes and attaching the sounds to them; however, this process is not covered in this tutorial.)</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/7.jpg" /></p>
<h3 class="step">STEP 8:  Scripting</h3>
<p>Now we will add script to our button. With  nothing else selected on the Stage, click the hit area of the button one time  to select it. Hit F9 to open the Script window and place the following code: </p>
<p><code style="font-size:12px;">on (rollOver, dragOver) {<br />
	gotoAndPlay("s1");<br />
}<br />
on (rollOut, dragOut) {<br />
	gotoAndPlay("s2");<br />
}<br />
on (release) {<br />
	getURL("index.php")<br />
}<br /></code></p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/8.jpg" /></p>
<p>This tells the play head that when the hit area is rolled over &#8211; go to frame label &quot;s1&quot; and play. When the mouse is taken away, (rollout) &#8211; go to frame label &quot;s2&quot; and play. When the button is hit on (release) &#8211; proceed to index.php. This example assumes that the button will be controlling a web page navigation. If you were using this button to control the play head inside of a .FLA doc, you would replace the getURL with a gotoAndPlay (frame number or label), or whatever your desired function for clicking the button would be.</p>
<h3 class="step">STEP 9:  Animating </h3>
<p>Now that our button is assembled and coded properly, we must create the animation for the rollover and rollout effects.</p>
<p>Hide the hit area that is covering the button so you can work on the other elements freely. Hold Alt + click-and-drag the first frame of your button&#8217;s background layer to frame 10, so that it lines up beneath the 2nd stop in the Actions layer. We are going to make the button appear to change colors when it is rolled over. When the button is rolled over, the play head will play this first animation (&quot;s1&quot;) and the play head will stop on frame 10 because of the stop function we placed in the actions layer. It will remain there until the button is either rolled out or clicked. Hence, Frame 10 would then be considered your &quot;Up&quot; state.  </p>
<p>To change the color of the button, I selected the button background in frame 10, went down to TINT in the properties inspector, and changed it to a darker color. </p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/9.jpg" /></p>
<p>Now, go back to frame 1 of the button&#8217;s background layer and hold Alt + click-and-drag a copy of frame 1 to frame 20. This will give the effect of the button changing to a darker color on rollover and then returning back to its original color on rollout. Right-click on the first frame and select Create Motion Tween. This will now make it fade between the colors. Do the same on frame 10: select it, right-click, and select Create Motion Tween.</p>
<p>If you choose to do so, you may apply the same sort of effect to the button&#8217;s text. I changed the color of my text and the position for the &quot;Up&quot; state, as shown in the diagram below. This diagram also illustrates the frame layout you should have so far.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf3/10.jpg" /></p>
<p>You have now successfully created a functional &quot;complex&quot; button and if you wanted, you could leave it at this step. I will take it just a bit further to illustrate why I prefer this technique over others. The reason is that this technique gives you the ability to have 2 separate animations for rollover and roll out. </p>
<h3 class="step">STEP 10:  Going Further: Adding an Additional Design Element </h3>
<p>Create a new layer and name it &quot;Star&quot;. On the 10th  frame or your &quot;up state&quot;  of this new layer, right-click and choose Insert Blank Keyframe. Select the PolyStar Tool from the tool bar (shares the same spot as the Rectangle Tool) and hit the Options button in the Properties Inspector window. In the Tool Settings dialog that appears, set Style to star, Number of Sides to 5, and Star Point Size to 0.50. Drag out the star on your button and position it how you would like it to appear when the button is in its &quot;up&quot; state. </p>
<p>With the newly-created star selected, hit F8 to open the Convert to Symbol window. You may give the star a name of whatever you&#8217;d like. It is important to convert it to a movie clip so that you can apply effects to it. Now hold down Alt + click-and-drag a copy of frame 10 to frame 1. Manipulate the star in someway so that it looks different in frame 1 than in frame 10. I lowered the opacity on mine and shrunk it so it will appear to have the effect of &quot;popping up&quot; when the button is rolled over. Now, hold Alt + click-and-drag a copy of frame 1 to frame 20. Right-click frame 1 and choose Create Motion Tween. Now go to frame 10, create a Motion Tween, go down the Properties Inspector and this time, set Rotate to CCW (counter clockwise) and set the Times to 3. This will give the effect of the star fading in and getting bigger on rollover. Then on rollout, the star will rotate and disappear. Being able to have 2 separate animations on roll over and rollout adds an extra bit of customization that is nice to include and is very useful at times.</p>
<p>That concludes this tutorial. You are now ready to export your movie and bask in your button&#8217;s animated glory </p>
<p><strong>Rollover the button below to see it in action!</strong></p>
<p><script type="text/javascript">createObject('swf','/images/tutorials/design/flash/jf3/complexebuttontut.swf','width','170','height','51','scale','exactfit','quality','best','allowScriptAccess','sameDomain','bgcolor','#006666');</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.layersmagazine.com/flash-button-animation.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding An Effect to Just a Stroke</title>
		<link>http://www.layersmagazine.com/adding-an-effect-to-just-a-stroke.html</link>
		<comments>http://www.layersmagazine.com/adding-an-effect-to-just-a-stroke.html#comments</comments>
		<pubDate>Thu, 11 Jan 2007 15:01:10 +0000</pubDate>
		<dc:creator>Justin Finley</dc:creator>
				<category><![CDATA[Design Tip of the Day]]></category>
		<category><![CDATA[InDesign]]></category>

		<guid isPermaLink="false">http://www.layersmagazine.com/adding-an-effect-to-just-a-stroke.html</guid>
		<description><![CDATA[It&#8217;s easy to add a Scribble Effect to a whole object. Just select the object and go to the Effects menu > Stylize > Scribble. In the options window that opens, select one of the setting Presets from the popup menu at the top of the window as a starting point. Then customize it to [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s easy to add a Scribble Effect to a whole object. Just select the object and go to the Effects menu > Stylize > Scribble. In the options window that opens, select one of the setting Presets from the popup menu at the top of the window as a starting point. Then customize it to your liking and click OK to apply. </p>
<p>But how do you apply this Scribble Effect to just a Stroke or a Fill of the object? Ah! That&#8217;s where the Appearance palette comes in. It&#8217;s kind of like the &#8220;Layers&#8221; palette of Effects in that it shows all Effects that have been applied to a selected object and in what order. It also allows you to choose what part of the object (Fill or Stroke) to which an Effect will be applied. To apply an Effect, such as a Scribble, to just the Stroke of a selected object, simply click on the Stroke listing in the Appearance palette and apply the effect in the Effects menu. After the effect is applied, it is listed in the Appearance palette, under the Stroke listing, so you can alter it at anytime simply by double-clicking on the Effect listing.<br />
<span id="more-920"></span></p>
<p>Tip provided by Jeff Witchel, Certified Adobe&reg; Training Provider.</p>
<p><!-- MODULE: ads/large_rectangle NOT FOUND --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.layersmagazine.com/adding-an-effect-to-just-a-stroke.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Slideshow Image Gallery</title>
		<link>http://www.layersmagazine.com/flash-slideshow-image-gallery.html</link>
		<comments>http://www.layersmagazine.com/flash-slideshow-image-gallery.html#comments</comments>
		<pubDate>Wed, 10 Jan 2007 19:18:55 +0000</pubDate>
		<dc:creator>Justin Finley</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.layersmagazine.com/flash-slideshow-image-gallery.html</guid>
		<description><![CDATA[
This tutorial will show you how to make a simple, yet effective, slideshow-type image gallery using Flash with minimal scripting. 

This is great for displaying your portfolio online, sharing personal photos, or for anywhere else you may need an image gallery or slideshow. What is important for you to take away from this tutorial is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/thumb.jpg" hspace="20" align="left"/></p>
<p>This tutorial will show you how to make a simple, yet effective, slideshow-type image gallery using Flash with minimal scripting. </p>
<p><span id="more-893"></span><br />
This is great for displaying your portfolio online, sharing personal photos, or for anywhere else you may need an image gallery or slideshow. What is important for you to take away from this tutorial is the theory and script behind making this slideshow work so you can apply it in your own situations. My example will be a pretty simple layout but the techniques can be applied to something much more involved.</p>
<h3 class="step">STEP 1:<strong> Prepare Flash Document</strong></h3>
<p>As usual, the first thing to do is set up the .FLA document. My settings for this one are 530 x 540 at 30 frames per second. It&#8217;s not very important that you adhear to these settings as they should reflect your specific needs. </p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/1.jpg" /></p>
<p>&nbsp;</p>
<h3 class="step">STEP 2: <strong>Create Background. </strong></h3>
<p> Rename layer 1 to &#8220;background&#8221;. In the first frame of this background layer create a background or &quot;container&quot; for the slideshow. You can either make something in Flash or import a background if you already have one made in Photoshop. After you are done creating your background or &quot;container&quot;, lock the layer so you can&#8217;t select it by accident. </p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/2.jpg" /></p>
<h3 class="step">STEP 3:<strong> Import Assets </strong></h3>
<p>Assuming you have already prepared all of your images that  are to be in this gallery, it is time to import them. Go to File &gt; Import to  Library, find the files you will be using in this project (images and  graphical assets alike) and click Open. The assets you selected should now appear  in your Library window (PC: Ctl+L, Apple: Command+L).</p>
<h3 class="step">STEP 4: <strong>Laying Out Gallery </strong></h3>
<p>Create a new layer and name it &#8220;content&#8221;. This will hold our images. Drag the first image you want displayed in your gallery to the stage and position it. Select it, hit F8 to Convert to Symbol, name it &#8220;mc_content&#8221;, hit OK. In the  Properties Inspector window give it the instance name &#8220;mc_content&#8221; as well. </p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/3.jpg" /></p>
<p>Double-click your new mc_content movie clip to enter editing  mode. Rename layer 1, the layer currently holding your image,  to &quot;images&quot;. This will hold all your images that are to be displayed in  the slideshow. Also, I&#8217;m going to add a small content area to explain the images. Create a new layer, name it &#8220;textbg&#8221;. In the first frame of this new layer, I  am going to drag out a pre-made text background from my library. I tend to  separate my elements as much as possible before bringing them into Flash which allows  me the flexibility to animate each element separately if I want to.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/4.jpg" /></p>
<p>Now, create a layer, name it &quot;text&quot;. This will hold our descriptions of each image. On the first frame of this new layer, take the Text tool and type out a description of your image and any other information you want displayed with that image.
</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/5.jpg" /></p>
<h3 class="step">STEP 5:  <strong>Adding Content</strong></h3>
<p>Now we will put the rest of our images and descriptions in  place. Since we have the layout set up, all we are going to do is swap images  and text in each frame. To save some time, instead of doing each new image from  scratch, I am going to select all 3 frames on all 3 layers by shift-clicking.  Then I will hold ALT and click-and-drag copies of the keyframes on to frame 2.  Now you should have the same 3 keyframes in frame 1 and 2.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/6.jpg" /></p>
<p>Now, on frame 2 select your image that is displayed (currently the same image as in frame 1), right-click on it and go down to &quot;Swap Bitmap..&quot; (or in Properties Inspector click the &quot;Swap..&quot; button). A dialog will open allowing you to select an image to swap out the current one with. This allows you to keep the exact same positioning (granted your images are the same size) and easily swap out each image with just a few clicks. Select the image you want to be next in your portfolio and hit OK. You should see that your image has swapped. Now select the text on this 2nd keyframe and change it to match your new image. That&#8217;s all you have to do for each new image. Duplicate the 3 previous frames, swap the image for the next one in line, replace the text to match and that&#8217;s it. Do this until you have all the images with their descriptions in place.</p>
<p>Finally, create a new layer, name it &#8220;actions&#8221;, select the first frame, and hit F9 to open the scripting window. Add a stop(); to the window (Shortcut: Escape key then S then T).</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/7.jpg" /></p>
<h3 class="step">STEP 6: Add Controls  </h3>
<p>Go back to the root timeline by clicking the back arrow located up where the file name is displayed. Create a new layer on the root timeline, name it &quot;controls&quot;. In frame 1 on the controls layer, drag out pre-made Next and Back buttons from your library that you have made in Photoshop, or create them from scratch using the drawing tools inside of Flash.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/8.jpg" /></p>
<p>Position them and then select the button that will act as your Back button. Hit F8 to Convert to Symbol, select button, then name it &#8220;last_btn&#8221;. Also, give it an instance name of &#8220;last_btn&#8221; in the Properties Inspector window. </p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/9.jpg" /></p>
<p>Double-click the new button to enter editing mode. If you would like, you can give it a simple rollover effect like you would any button. This is also the place where you would add sound effects for rollover or click, however both are optional. What is most important is to give it a decent sized hit area. Do this by dragging a duplicate of the key frame in the UP position to the HIT position by Alt + clicking-and-dragging. Now, with the Hit key frame selected, draw a hit area over the arrow with the rectangle drawing tool.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/10.jpg" /></p>
<p>Follow the same process for the next button. Name the movie clip &#8220;next_btn&#8221; and give it an instance name of the same in the Properties Inspector window.</p>
<h3 class="step">STEP 7: Scripting </h3>
<p>Now it&#8217;s time to add the script that will make this  slideshow work. On the root timeline create a new layer, name it &quot;actions&quot;.  Select the first keyframe of this layer and hit F9 to open the scripting window.  Insert this code:</p>
<p><code ><br />
stop();<br />
//next button<br />
  next_btn.onPress=function(){<br />
  if(mc_content._currentframe==mc_content._totalframes){<br />
  mc_content.gotoAndStop(1)<br />
  }else{<br />
  mc_content.nextFrame()<br />
  }<br />
  }</p>
<p>//last button<br />
  last_btn.onPress=function(){<br />
  if(mc_content._currentframe==1){<br />
  mc_content.gotoAndStop(mc_content._totalframes)<br />
  }else{<br />
  mc_content.prevFrame()<br />
  }<br />
  }<br />
  </code></p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/11.jpg" /></p>
<p>The script is saying that when the Next button is pressed, if the current frame that the play head is on equals the total number of frames present in mc_content, then return the play head to frame 1 of mc_content. This will make it appear to loop. Else, if the play head is not on the total number of frames, then it will go on to the next. The Last button is essentially the same, but in reverse. It says if the current frame is frame 1 then go back to the last frame. If it&#8217;s not (else) on frame 1, go back 1 frame.</p>
<h3 class="step">STEP 8: Finishing Touches </h3>
<p>One thing you will definitely need is the ability  to launch a bigger version of your image or a link to a website if it&#8217;s a  gallery of web work. Double-click your content_mc movie clip to enter editing  mode. I&#8217;m going to create a new layer underneath the Actions layer and name it  &quot;launch&quot;. I am going to use the Text tool to create what will be a  button for launching a higher res image. When finished with the type, select  it, hit F8 to Convert to Symbol, select button, name it launch_btn and give it  an instance name of the same in the Properties Inspector window. As with the  arrows, you can give this button a simple rollover, sounds, and most importantly,  a hit area if you wish.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/12.jpg" /></p>
<p>Go to your Actions layer and insert this code underneath the stop that that is already there:</p>
<p><code>launch_btn.onRelease=function(){<br />
	getURL("http://www.yourwebsite.com/images/image.jpg","_blank");<br />
	};</code></p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf2/13.jpg" /></p>
<p>The path should be to where your larger version of the image lives on the internet. You can repeat this process for each image that needs to be able to launch in a new window. </p>
<p>That should do it. Now export your movie and check it out. The Next and Back buttons should scroll through the images seemlessly and your Launch button should launch your higher res version in a new browser window, depending of course, on the fact that you put the correct path in the getURL function. </p>
<p><strong>Click the Next or Back button below to see the gallery slideshow in action!</strong></p>
<p><script type="text/javascript">createObject('swf','/images/tutorials/design/flash/jf2/slideshow.swf','width','530','height','540','scale','exactfit','quality','best','allowScriptAccess','sameDomain','bgcolor','#006666');</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.layersmagazine.com/flash-slideshow-image-gallery.html/feed</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Custom Video Player in Adobe Flash</title>
		<link>http://www.layersmagazine.com/flash-custom-videoplayer.html</link>
		<comments>http://www.layersmagazine.com/flash-custom-videoplayer.html#comments</comments>
		<pubDate>Fri, 15 Dec 2006 15:00:20 +0000</pubDate>
		<dc:creator>Justin Finley</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.layersmagazine.com/custom-video-player.html</guid>
		<description><![CDATA[
Create your own custom flash video player (complete with  controls) for times when the stock players won&#8217;t cut it.


The stock video players and skins inside of Flash look and work great, but at sometime in your designing journey, you may run into a situation where they just do not fit your needs for a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/thumb.jpg" hspace="20" align="left"/></p>
<p>Create your own custom flash video player (complete with  controls) for times when the stock players won&#8217;t cut it.</p>
<p><span id="more-868"></span><br />
</p>
<p>The stock video players and skins inside of Flash look and work great, but at sometime in your designing journey, you may run into a situation where they just do not fit your needs for a particular situation or project. Perhaps you have a web page that has a certain look and the stock flash player doesn&#8217;t match it. Or maybe you just want to have a more organic, custom looking player. In this tutorial I will show you the process of making your own custom flash video player with play and pause controls, and a  scrub bar. What you should  take away from this tutorial is the theory and the scripting behind making this work. </p>
<h3 class="step">STEP 1:<strong> Prepare the Video</strong></h3>
<p>The first step is to prepare the video to be  displayed by converting it to FLV format. Open up the Flash 8 Video Encoder application and drag the movie file you want to convert into the Queue window, then click Settings.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/1.jpg" /></p>
<p>Note: QuickTime Pro also supports exporting files to .flv format.</p>
<p>These settings should be set to fit your own personal needs. I will be converting my video from a QuickTime.mov file and will set the settings as if I were going to post it for viewing on the web. Again, feel free to use your own settings as your needs may differ.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/2.jpg" /></p>
<p>After the video has been converted to .flv, we will need to set up a folder structure. Create a new folder on your desktop and name it whatever you&#8217;d like. Inside that new folder, create another folder and name it &quot;video&quot;. Drag your shiny new .flv file into this folder and rename the file itself  &quot;video.flv&quot; after it is placed.<br />
So, now the file structure for your new video should be YourNewFolder  > video  >  video.flv.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/3.jpg" /></p>
<p>Note: The above graphic also shows the placement of your new FLA document you will be creating in a future step.</p>
<h3 class="step">STEP 2: <strong>Prepare Assets </strong></h3>
<p>You may choose to create your graphical assets inside of Flash or use another program such as Photoshop or Illustrator to create them and then import them into Flash. For the sake of time, instead of creating my assets by hand, I grabbed a vector TV graphic from <a href="http://www.istockphoto.com" target="_blank">iStockPhoto.com</a>. I then added a play and pause button, and a scrub bar; all on their own layers inside of Photoshop. Next, using whatever method you like best, export each element  separately. I prefer working with .pngs to preserve transparency but again, do what works for you.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/4.jpg" /></p>
<h3 class="step">&nbsp;</h3>
<h3 class="step">STEP 3:<strong> Prepare Flash Document</strong></h3>
<p>Create a new flash document and name it whatever you prefer. Place it on the root of the new folder you created in Step 1, but outside of the video file. (Refer to the 3rd graphic of Step 1 for an image of the structure you&#8217;re going for.)</p>
<p>My personal settings for my new Flash doc are 457 x 468 (the size of the background image I want to use) &nbsp;and the frame rate is set to 30fps. Again, your needs may differ.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/5.jpg" /></p>
<h3 class="step">STEP 4: <strong>Import Assets</strong></h3>
<p>If you created your graphical elements outside of Flash, now is the time to import them. If however, you plan on making them inside of Flash, you may skip this importing step. </p>
<p>Go to File &gt; Import to Library. Locate and select the elements you want to import and select Import. They will now be visible in your  Library. <br />
  Command+L&nbsp; (PC: Ctl+L) to open and close library window.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/6.jpg" /></p>
<p>After importing my assets, I am going to drag my background image onto the first frame in Layer 1, position it, then rename the layer &quot;background&quot; and lock the layer so I can&#8217;t select it by accident.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/7.jpg" /></p>
<h3 class="step">STEP 5: Set up the MediaDisplay Component  </h3>
<p>Create a new layer to hold the MediaDisplay Component and name  it what you&#8217;d like. I&#8217;ve named mine &quot;screen&quot;.&nbsp;  Open the Components window, Window &gt; Components or Command + F7 (PC:  Control + F7). Under the Media drop-down select and drag the MediaDisplay Component on to the first frame of the new &quot;screen&quot; layer.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/8.jpg" /></p>
<p>In the Properties Inspector, Command + F3 (PC: Ctl + F3), give the component the instance name &quot;video&quot;.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/9.jpg" /></p>
<p>Open the Component Inspector window using Window &gt; Component  Inspector, or Option + F7 (PC: Alt + F7), uncheck &quot;Automatically Play&quot;.</p>
<p>Create a new layer, rename it &quot;actions&quot;, select the first keyframe,  then open the Actions window. (Window &gt; Actions or F9)</p>
<p>Type in the script window:</p>
<p> <code> video.setmedia(&quot;video/video.flv&quot;,&quot;FLV&quot;)</code></p>
<p>This attaches the path of our .flv file to the MediaDisplay Component we named &quot;video&quot;.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/10.jpg" /></p>
<h3 class="step">STEP 6: <strong>Control Buttons</strong></h3>
<p>Create a new layer for the control buttons and name it what you  like. I&#8217;ve named mine &#8220;buttons&#8221;. On the first keyframe of this buttons layer, create a pause button or drag out your pre-made pause button from your library. Select your pause button and hit F8 to Convert to Symbol. Select button, name it &#8220;btn_pause&#8221; and  then give it an instance name of &#8220;pause_btn&#8221; in the Properties Inspector window.  It is important that you use the same names in order for the scripting to work.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/11.jpg" /></p>
<p>On the same layer, repeat the process for the play button. Name it &#8220;btn_play&#8221; in the Convert to Symbol window and then give it an instance name of &#8220;play_btn&#8221; in the Properties Inspector window.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/12.jpg" /></p>
<p>Now select both buttons by holding shift and clicking on them. Hit F8 to convert both of them together into a new movie clip. Select MovieClip and name it &#8220;mc_controls&#8221;.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/13.jpg" /></p>
<p>Double-click your newly created mc_controls movie clip to enter its editing mode. Then create a new actions layer (inside mc_controls), select the first keyframe, open the Actions window (F9), and place this code:</p>
<p><code>
<p>video = _root.video;</p>
<p>// play button function<br />
  play_btn.onRelease = function(){<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; video.play();<br />
  };</p>
<p>// pause button function<br />
  pause_btn.onRelease = function(){<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; video.pause();<br />
  };&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p></code></p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/14.jpg" /></p>
<h3 class="step">STEP 7: Scrubber Bar  </h3>
<p>Create a new layer for the scrub bar, name it what you&#8217;d like. I&#8217;ve named mine &quot;scrubber&quot;. On the first keyframe of this layer, create or drag out a track for the scrubber. Select the track, hit F8 to Convert to  Symbol, select movie clip, name it &#8220;mc_track&#8221; and now, what is different here: <strong>you must make sure to set the  registration point to the left, NOT CENTER. </strong> This ensures that the left edge is seen as zero or our beginning point. Now, give it an instance name of &#8220;track_mc&#8221; in the Properties Inspector window. It is important for the scripting that you use these names.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/15.jpg" /></p>
<p>On the same layer, repeat the process for the knob. Use F8 to convert to symbol, this time making sure to go back to a <strong>center registration</strong> point, name it &#8220;mc_knob&#8221;, and then give it an instance name of &#8220;knob_mc&#8221; in the Properties Inspector.</p>
<p>Now, position the knob on top of the track with the knob situated to the left edge of the track below. Select both the knob and the track by shift-clicking them. Hit F8 to convert them both into a movieclip. Make sure the registration point of this clip is set to the <strong>left edge </strong>like you did to the track.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/16.jpg" /></p>
<p>Now, double-click the new mc_scrubber movieclip to enter editing mode (just like you did with the control buttons). Create a new Actions layer, select the first keyframe, open the Actions window (F9) and apply this script:</p>
<p><code>
<p>video = _root.video;<br />
  knob_mc.onPress = function(){<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mdown=true;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.startDrag(false,0, 0, track_mc._width, 0);<br />
  };</p>
<p>knob_mc.onRelease = function(){<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mdown = false;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.stopDrag();<br />
  };</p>
<p>knob_mc.onReleaseOutside =  knob_mc.onRelease();<br />
  this.onEnterFrame = function(){<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(mdown){<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dist = knob_mc._x;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pct = dist/track_mc._width;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newVol = pct*video.totalTime;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; video.playheadTime = newVol;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }else{<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dist = video.playheadTime;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pct = dist/video.totalTime;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; newX = pct*track_mc._width;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; knob_mc._x = newX;<br />
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
  };</p>
<p></code></p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/17.jpg" /></p>
<h3 class="step">STEP 8: Finishing Touches </h3>
<p>In my particular case, I have a rounded TV screen so I would like the video to appear to have rounded corners instead of square. In your situation it may be okay to leave it square. Again, it all depends on you. In order to round my edges, I am going to create a new layer above my screen layer (the one that houses my MediaDisplay Component) and name it &quot;screenmask&quot;. I will then select the rectangle tool ( R ) and set the corner radius (bottom of toolbar under Options ) to around 50px. Now that you have a shape on that layer, right-click on the layer label and choose &quot;mask&quot; , turning the shape you just created into a mask for the &quot;screen&quot; layer. The layers beneath (&quot;screen&quot;) will now only show through the shape you have created on the layer above (&quot;screenmask&quot;). I then add a border around the video for an extra touch and now I&#8217;m ready to export a .swf and bask in the glory of my custom video player.</p>
<p>Hit play. The movie should begin to play and the scrubber to move. Click-and-drag the scrubber knob to navigate around the movie, click pause to.. well, pause.</p>
<p>It may take a few times of exporting, seeing where the video is, and then repositioning the MediaDisplay Component accordingly to get the exact position of where the video should be. It&#8217;s kind of hard to tell by only seeing the blue outline of the component while working in the Flash document.</p>
<p><img src="http://www.layersmagazine.com/images/tutorials/design/flash/jf/18.jpg" /></p>
<p><strong>Click the play button on the .swf below to see the player in action!</strong><br />
(video shown is a segment of <a href="http://www.photoshoptv.com/">Adobe&#038;reg Photoshop TV</a>.)</p>
<p><script type="text/javascript">createObject('swf','/images/tutorials/design/flash/jf/customvideoplayer.swf','width','457','height','468','scale','exactfit','quality','best','allowScriptAccess','sameDomain','bgcolor','#000033');</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.layersmagazine.com/flash-custom-videoplayer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
