<?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>graphicmuse.com &#187; flash</title>
	<atom:link href="http://graphicmuse.com/blog/category/flash-and-code/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://graphicmuse.com/blog</link>
	<description>design</description>
	<lastBuildDate>Thu, 29 Jul 2010 20:46:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Load Movie, the old fashion way</title>
		<link>http://graphicmuse.com/blog/2008/01/load-movie-the-old-fashion-way/</link>
		<comments>http://graphicmuse.com/blog/2008/01/load-movie-the-old-fashion-way/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 22:56:34 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[container]]></category>
		<category><![CDATA[flash as2]]></category>
		<category><![CDATA[loadmovie]]></category>

		<guid isPermaLink="false">http://graphicmuse.com/blog/?p=261</guid>
		<description><![CDATA[myContainer.loadMovie("myExternalMovie.swf"); or this._parent.loadMovie("home.swf") } //load into a container and resize the file. //it doesn't work with levels. stop(); // ActionScript 2.0 var mcl:MovieClipLoader = new MovieClipLoader(); // you first create a MovieClipLoader object var picListener:Object = new Object(); // and a listener to control the loading... mcl.addListener(picListener); // connect the listener to the mcl... mcl.loadClip("cwid.swf", [...]]]></description>
			<content:encoded><![CDATA[<pre>myContainer.loadMovie("myExternalMovie.swf");</pre>
<pre>or</pre>
<pre>this.<span class="hilite1">_parent</span>.loadMovie("home.swf")
}</pre>
<pre>//load into a container and resize the file.</pre>
<pre>//it doesn't work with levels.</pre>
<pre> stop();

// ActionScript 2.0

var mcl:MovieClipLoader = new MovieClipLoader();
// you first create a MovieClipLoader object
var picListener:Object = new Object();
// and a listener to control the loading...
mcl.addListener(picListener);
// connect the listener to the mcl...
mcl.loadClip("cwid.swf", empty_mc);
// parameter 1: file to be loaded
// parameter 2: the mc
picListener.onLoadInit = function(mc:MovieClip) {
/*	mc here represents the movie clip in which we're
loading the content, and onLoadInit event handler
executes as soon as the file is loaded.

the important thing in here is that you need the
data be loaded totally before processing the mc.
*/
mc._width = 500;
mc._height = 355;
};</pre>
<img src="http://graphicmuse.com/blog/?ak_action=api_record_view&id=261&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://graphicmuse.com/blog/2008/01/load-movie-the-old-fashion-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Buttons</title>
		<link>http://graphicmuse.com/blog/2008/01/as3-buttons/</link>
		<comments>http://graphicmuse.com/blog/2008/01/as3-buttons/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 00:52:32 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[as3 buttons]]></category>

		<guid isPermaLink="false">http://graphicmuse.com/blog/?p=277</guid>
		<description><![CDATA[Make anything a button in as3, just give it an instance name. //AS3 button code going to a url //btWhatever is the instance name of the the images that I want to make a button btWhatever.addEventListener(MouseEvent.CLICK,onMouseClick); // if you want a hand cursor btWhatever.buttonMode = true; btWhatever.useHandCursor = true; function onMouseClick(e:MouseEvent):void { var request:URLRequest = [...]]]></description>
			<content:encoded><![CDATA[<h3>Make anything a button in as3, just give it an instance name.</h3>
<p><code>//AS3 button code going to a url</code></p>
<p><code>//btWhatever is the instance name of the the images that I want to make a button<br />
btWhatever.addEventListener(MouseEvent.CLICK,onMouseClick);</p>
<p>// if you want a hand cursor<br />
btWhatever.buttonMode = true;<br />
btWhatever.useHandCursor = true;<br />
function onMouseClick(e:MouseEvent):void<br />
{<br />
var request:URLRequest = new URLRequest("Graphicmuse.com");<br />
navigateToURL(request, "_blank");<br />
}</code></p>
<h3>this button will go to a frame or label</h3>
<p><code><br />
//basic as3 button goto frame number<br />
button.addEventListener(MouseEvent.CLICK, clickFunction);</p>
<p>// if you want a hand cursor<br />
button.buttonMode = true;<br />
button.useHandCursor = true;</p>
<p>function clickFunction(evt:MouseEvent):void {<br />
gotoAndStop(2);<br />
}<br />
</code</p>
<h3>More work than before, but now you know.</h3>
<img src="http://graphicmuse.com/blog/?ak_action=api_record_view&id=277&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://graphicmuse.com/blog/2008/01/as3-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A3 Pause Timer</title>
		<link>http://graphicmuse.com/blog/2008/01/a3-pause-timer/</link>
		<comments>http://graphicmuse.com/blog/2008/01/a3-pause-timer/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 20:52:23 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://graphicmuse.com/blog/?p=294</guid>
		<description><![CDATA[This is one of my favorite pieces of code, and it get used often. Frame one of your movie stop(); var millis:Number=3000; var Tim:Timer = new Timer(millis, 1); Tim.addEventListener(TimerEvent.TIMER, playit); function playit(e:TimerEvent):void { play(); } Tim.start(); Whenever you need to pause you movie add the following code to your actions layer at the exact frame [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of my favorite pieces of code, and it get used often.</p>
<p>Frame one of your movie</p>
<p><code>stop();<br />
var millis:Number=3000;<br />
var Tim:Timer = new Timer(millis, 1);<br />
Tim.addEventListener(TimerEvent.TIMER, playit);</code></p>
<p>function playit(e:TimerEvent):void {<br />
play();<br />
}</p>
<p>Tim.start();<br />
Whenever you need to pause you movie add the following code to your actions layer at the exact frame where you want your movie to pause.<br />
<code>stop();<br />
millis=3000;<br />
Tim.start();</code></p>
<p>And if that wasn&#8217;t easy enough, I provided a working fla. Have fun.</p>
<img src="http://graphicmuse.com/blog/?ak_action=api_record_view&id=294&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://graphicmuse.com/blog/2008/01/a3-pause-timer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pause Timer from Dave Stiller AS2</title>
		<link>http://graphicmuse.com/blog/2008/01/pause-timer-from-dave-stiller-as2/</link>
		<comments>http://graphicmuse.com/blog/2008/01/pause-timer-from-dave-stiller-as2/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 17:40:53 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[pause timer]]></category>

		<guid isPermaLink="false">http://graphicmuse.com/blog/?p=246</guid>
		<description><![CDATA[An answer, short and sweet Add a keyframe to the position in your movie where you’d like the timeline to pause.  Any layer will do, but if you like to be organized, create a dedicated scripts layer.  Click into this keyframe and paste the following ActionScript. stop(); var interval:Number = setInterval( function():Void { play(); clearInterval(interval); [...]]]></description>
			<content:encoded><![CDATA[<h3>An answer, short and sweet</h3>
<p>Add a keyframe to the position in your movie where you’d like the timeline to pause.  Any layer will do, but if you like to be organized, create a dedicated scripts layer.  Click into this keyframe and paste the following ActionScript.</p>
<pre><code>stop();
var interval:Number = setInterval(
  function():Void {
    play();
    clearInterval(interval);
  },
  2000
);</code></pre>
<pre><span style="font-family: -webkit-monospace;">
</span></pre>
<img src="http://graphicmuse.com/blog/?ak_action=api_record_view&id=246&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://graphicmuse.com/blog/2008/01/pause-timer-from-dave-stiller-as2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Tween Class Code as2 and as3</title>
		<link>http://graphicmuse.com/blog/2008/01/flash-tween-class-code-as2/</link>
		<comments>http://graphicmuse.com/blog/2008/01/flash-tween-class-code-as2/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 06:05:57 +0000</pubDate>
		<dc:creator>jan</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[tween class]]></category>

		<guid isPermaLink="false">http://graphicmuse.com/blog/?p=240</guid>
		<description><![CDATA[I use this code over and over, and always have to look for it to make sure I am entering it correctly.  Action Script 2 import mx.transitions.Tween; import mx.transitions.easing.*; new Tween(mc_name, "_alpha", Strong.easeIn, 100, 0, 3, true); Action Script 3 import fl.transitions.Tween; import fl.transitions.easing.*; import fl.transitions.TweenEvent; var myTweenName:Tween = new Tween(mc_name, "alpha", Strong.easeOut, 0, 100, [...]]]></description>
			<content:encoded><![CDATA[<p>I use this code over and over, and always have to look for it to make sure I am entering it correctly. </p>
<h3>Action Script 2</h3>
<p><code>import mx.transitions.Tween;<br />
import mx.transitions.easing.*;<br />
new Tween(mc_name, "_alpha", Strong.easeIn, 100, 0, 3, true);<br />
</code></p>
<h3>Action Script 3</h3>
<p><code>import fl.transitions.Tween;<br />
import fl.transitions.easing.*;<br />
import fl.transitions.TweenEvent;</p>
<p>var myTweenName:Tween = new Tween(mc_name, "alpha", Strong.easeOut, 0, 100, 5, true);</p>
<p></code><br />
Remember to change myTweenName if you use this more than once in your movie. </p>
<p>the only thing you need to remember to do is name your movie clip and then change it in the mc_name. Make sure they match.</p>
<img src="http://graphicmuse.com/blog/?ak_action=api_record_view&id=240&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://graphicmuse.com/blog/2008/01/flash-tween-class-code-as2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
