<?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>Ryan Bosinger &#187; Flash</title>
	<atom:link href="http://ryanbosinger.com/blog/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://ryanbosinger.com/blog</link>
	<description>things I learn, as I learn them</description>
	<lastBuildDate>Thu, 19 Jan 2012 00:44:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>The Flash vCam</title>
		<link>http://ryanbosinger.com/blog/2008/the-flash-vcam/</link>
		<comments>http://ryanbosinger.com/blog/2008/the-flash-vcam/#comments</comments>
		<pubDate>Wed, 27 Feb 2008 20:54:35 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[Animation]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/2008/the-flash-vcam/</guid>
		<description><![CDATA[Any good animation changes camera angles from time to time. Unfortunately these is no easy way to do this in Flash&#8230; by itself. However, a fellow named Sham Bhangal wrote a little application using actionscript that allows us to have a virtual camera that can be animated within scenes. There is also a fairly in-depth [...]]]></description>
			<content:encoded><![CDATA[<p>
Any good animation changes camera angles from time to time. Unfortunately these is no easy way to do this in Flash&#8230; by itself.
</p>

<p>
However, a fellow named <a href="http://weblog.motion-graphics.org/">Sham Bhangal</a> wrote a little application using actionscript that allows us to have a virtual camera that can be animated within scenes.
</p>
<span id="more-5"></span>
<p>
There is also a fairly <a href="http://www.oreillynet.com/pub/a/javascript/2004/08/17/flashhacks.html?page=last">in-depth article</a> (regarding v-Cam use and more so: the code) <a href="http://www.oreillynet.com/pub/a/javascript/2004/08/17/flashhacks.html?page=last">here</a>. If you&#8217;re handy with actionscript and are looking for a little more detail on the vCam, you may prefer to start there.
</p>

<p>
But if you&#8217;d like a quick start with the vCam then <a href="/blog/downloads/vcam_fla.zip">download the this file</a> and continue reading.
</p>

<h3>Set the vCam to Your Stage Size</h3>
<ol>
	<li>Open <em>vcam.fla</em> that you downloaded from the link above.</li>
	<li>Copy the<em> vcam</em> movieclip symbol and paste it into your movie on a new layer (this layer should always remain the first layer).</li>
<img src="/blog/post-images/vcam/vCam_newLayer.png" alt="" width="317" height="169" class="aligncenter" />
<p>
<strong>Note:</strong> All the code the vCam needs to function is within itself. Whenever the vCam is on the stage it takes affect, and when it&#8217;s removed flash will treat it like it was never there.
</p>
	<li>It&#8217;s important that you set the initial size of the vCam to the size your of your stage. Vote4Oz is a 640&#215;480 movie so you&#8217;ll notice if you downloaded the file above that the vCam&#8217;s dimensions are 640&#215;480. If this is not done, your movie may appear distorted when running through the vCam.</li>
	<li><strong>Panning:</strong> Apply a normal motion tween to the vCam. Whatever the vCam passes is over will be what&#8217;s shown on screen.</li>
<p>
<strong>Note:</strong> You can move the vCam off the stage itself, and it will still work. Keep this is mind.
</p>
	<li><strong>Zooming:</strong> Tween the vCam smaller to zoom in, larger to zoom out.</li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2008/the-flash-vcam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping Sound in Sync with Long Flash Animations</title>
		<link>http://ryanbosinger.com/blog/2008/keeping-sound-in-sync-with-long-flash-animations/</link>
		<comments>http://ryanbosinger.com/blog/2008/keeping-sound-in-sync-with-long-flash-animations/#comments</comments>
		<pubDate>Sun, 03 Feb 2008 05:22:24 +0000</pubDate>
		<dc:creator>rbosinger</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://ryanbosinger.com/blog/2008/keeping-sound-in-sync-with-long-flash-animations/</guid>
		<description><![CDATA[Whether you&#8217;re just starting out in Flash, or have been playing with it for some time, chances are you have run into problems with sound synchronization. If you&#8217;re new to Flash and have been experiencing problems in this area, chances are the solution is very simple as I will explain in a moment. However, if [...]]]></description>
			<content:encoded><![CDATA[<p>
Whether you&#8217;re just starting out in Flash, or have been playing with it for some time, chances are you have run into problems with sound synchronization. If you&#8217;re new to Flash and have been experiencing problems in this area, chances are the solution is very simple as I will explain in a moment. However, if the following isn&#8217;t news to you and you&#8217;re still having problems, keep reading, the solution may follow.
</p>
<span id="more-4"></span>
<h3>Sound Properties: Event and Stream</h3>
<p>
There are two main options for your sounds in flash: event and stream. If your sound isn&#8217;t syncing up, it&#8217;s likely that all you have to do is make sure your sounds are set to <em>stream</em> and not <em>event</em>. If a sound is set to <em>stream</em> flash prioritizes the sound and if you&#8217;re animation can&#8217;t keep up then frames will be dropped in order to keep sync.
</p>
<img src="../../post-images/keeping-sound-in-sync/sc_kicker_event.gif" class="aligncenter" />

<p>
Simple enough, right? I thought so too. Unfortunately, as our animations for <a href="http://www.vote4oz.com">Vote4Oz</a> grew longer we found our sound losing sync anyway. Needless to say it was pretty devastating. After searching through many forums for the answer to our dilemma, I finally discovered the solution to what (as far as I know) is a bug in flash. Read on.
</p>
<p>
If you&#8217;re producing a lengthy animation, chances are you&#8217;re using the scenes feature in Flash. After about the 3rd scene you may notice some massive problems with sound synchronization (whether or not your sound properties are set to stream). The solution is to fool Flash by placing a layer known as the &#8220;Sound Kicker&#8221; in every scene.
</p>
<ol>
	<li>Create a new layer and label it &#8220;SoundKicker&#8221;</li>
	<li>On the 5th frame of this layer create a keyframe</li>
	<li>Create, find, or <a href="../../downloads/fx_halfsecondsilence.wav">download</a> an audio file that contains about 1 second of silence</li>
	<li>Import the sound into your library</li>
	<li>With the 5th frame selected, attach the silent audio file and choose <em>Stream</em> and <em>Loop</em> from the <em>Sync</em> portion of the frames properties.</li>
<img src="../../post-images/keeping-sound-in-sync/sc_kicker_properties.gif" height="171" width="292" class="aligncenter"  />
	<li>On the 6th frame of the &#8220;SoundKicker&#8221; layer create another blank keyframe</li>
</ol>

<img src="../../post-images/keeping-sound-in-sync/sc_kicker_layer.gif" height="65" width="286" class="aligncenter" />

<p class="img-tagline">(you&#8217;re layer should look like this now)</p>

<p>
The little gizmo will throw Flash into a constant loop of a streaming sound that no one will be able to hear. Now, instead of setting the rest of your sounds to Stream, set the to Event. Flash will still treat this Event sounds as streaming sounds, only the sync problems on and after the 3rd scene should be corrected. Make sure you do this for <strong>every scene</strong> and that all your sounds are now set to <strong>event</strong>. This problem occurred in Flash 8, and most likely in previous versions as well.
</p>]]></content:encoded>
			<wfw:commentRss>http://ryanbosinger.com/blog/2008/keeping-sound-in-sync-with-long-flash-animations/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
