<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Museum Pieces:&#160; on() and onClipEvent()</title>
	<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Tue, 06 Jan 2009 10:03:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Johny</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-316815</link>
		<pubDate>Wed, 10 Dec 2008 16:10:18 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-316815</guid>
					<description>Hello ive read your tutorials, and yes it works will it open the page, but not on the target iframe,


on (release) {
getURL(&quot;products.html&quot;, &quot;main&quot;);
}

this codes here opens another page but not on the target iframe, i was wondering where did i went wrong coz most forum say that this codes work,

well what i want is the page to be open in the iframe now on another window, well thanks for the big help if you can correct this codes thanks, send me a email.</description>
		<content:encoded><![CDATA[<p>Hello ive read your tutorials, and yes it works will it open the page, but not on the target iframe,</p>
<p>on (release) {<br />
getURL(&#8221;products.html&#8221;, &#8220;main&#8221;);<br />
}</p>
<p>this codes here opens another page but not on the target iframe, i was wondering where did i went wrong coz most forum say that this codes work,</p>
<p>well what i want is the page to be open in the iframe now on another window, well thanks for the big help if you can correct this codes thanks, send me a email.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-85395</link>
		<pubDate>Tue, 25 Sep 2007 20:54:26 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-85395</guid>
					<description>Battletards,

To handle the &lt;code&gt;enterFrame&lt;/code&gt; event as described above, you would reference the movie clip by its instance name and pretty much code it up the same way:

&lt;pre&gt;&lt;code&gt;instanceName.onEnterFrame = function():Void {
  // instructions here
}&lt;/code&gt;&lt;/pre&gt;

It works the same in all cases except, as coincidence would have it, the &lt;code&gt;MovieClip.onLoad&lt;/code&gt; method.  For that, check out my &quot;&lt;a href=&quot;http://www.quip.net/blog/2006/flash/actionscript-20/is-movieclip-onload-broken&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;Is the MovieClip.onLoad Event Broken?&lt;/a&gt;&quot; article.</description>
		<content:encoded><![CDATA[<p>Battletards,</p>
<p>To handle the <code>enterFrame</code> event as described above, you would reference the movie clip by its instance name and pretty much code it up the same way:</p>
<pre><code>instanceName.onEnterFrame = function():Void {
  // instructions here
}</code></pre>
<p>It works the same in all cases except, as coincidence would have it, the <code>MovieClip.onLoad</code> method.  For that, check out my &#8220;<a href="http://www.quip.net/blog/2006/flash/actionscript-20/is-movieclip-onload-broken" target="_blank" rel="nofollow">Is the MovieClip.onLoad Event Broken?</a>&#8221; article.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Battletards</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-83946</link>
		<pubDate>Sat, 22 Sep 2007 07:51:28 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-83946</guid>
					<description>and what about onClipEvent (load)?

Thanks</description>
		<content:encoded><![CDATA[<p>and what about onClipEvent (load)?</p>
<p>Thanks
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Battletards</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-83944</link>
		<pubDate>Sat, 22 Sep 2007 07:48:17 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-83944</guid>
					<description>Hey, so how would you code a 
onClipEvent(enterFrame) {
using your method?

I see you give an example of a mouseUp command, but not an enterFrame command.</description>
		<content:encoded><![CDATA[<p>Hey, so how would you code a<br />
onClipEvent(enterFrame) {<br />
using your method?</p>
<p>I see you give an example of a mouseUp command, but not an enterFrame command.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-76988</link>
		<pubDate>Thu, 30 Aug 2007 16:21:36 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-76988</guid>
					<description>markc,

It's hard for me to judge that assessment, because I really do enjoy both aspects of Flash:  designing and developing.  If Flash has been moving toward developers (programmers) &amp;#8212; and I certainly don't deny that; just not sure how strongly I would affirm it &amp;#8212; the steps away from &lt;code&gt;on()&lt;/code&gt; and &lt;code&gt;onClipEvent()&lt;/code&gt; began three full versions ago, back with Flash MX in 2002.

The nice part is, if you prefer that paradigm, all you have to do is configure your publish settings for AS1 or 2.  Even in Flash CS3, you can stick with the approach that makes you the most comfortable.</description>
		<content:encoded><![CDATA[<p>markc,</p>
<p>It&#8217;s hard for me to judge that assessment, because I really do enjoy both aspects of Flash:  designing and developing.  If Flash has been moving toward developers (programmers) &mdash; and I certainly don&#8217;t deny that; just not sure how strongly I would affirm it &mdash; the steps away from <code>on()</code> and <code>onClipEvent()</code> began three full versions ago, back with Flash MX in 2002.</p>
<p>The nice part is, if you prefer that paradigm, all you have to do is configure your publish settings for AS1 or 2.  Even in Flash CS3, you can stick with the approach that makes you the most comfortable.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: markc</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-76966</link>
		<pubDate>Thu, 30 Aug 2007 14:26:29 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-76966</guid>
					<description>Looks like flash is moving towards developers rather than designers.</description>
		<content:encoded><![CDATA[<p>Looks like flash is moving towards developers rather than designers.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-8329</link>
		<pubDate>Fri, 15 Dec 2006 13:46:45 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-8329</guid>
					<description>Elkapitan,

That's a good question.  Since you used the word &quot;reenable,&quot; I'd like to point out that the &lt;code&gt;MovieClip&lt;/code&gt; and &lt;code&gt;Button&lt;/code&gt; classes each feature an &lt;code&gt;enabled&lt;/code&gt; property, which can be used to toggle an instance's responsiveness.  That isn't the same as deleting or nulling the function assigned to an event, because the event still occurs when &lt;code&gt;enabled&lt;/code&gt; is false; it's just that the object ignores it.

In order to re-assign an event handler you've deleted or nulled, you merely have to repeat what you did in the first place (namely, to assign the event to a function).  Obviously, this can get a bit tedious, depending on how often it needs to happen.  To save on retyping, I recommend you use a named function rather than a literal function.

&lt;pre&gt;&lt;code&gt;function doSomething():Void {
  // code here
  // This is where you tell this function
  // what what to do.
}

mcButton.onRelease = doSomething;
// Now we've assigned the doSomething()
// function to the MovieClip.onRelease
// event of the mcButton instance.&lt;/code&gt;&lt;/pre&gt;

At some point later in the ActionScript, you may get rid of the event handler by deleting it ...

&lt;pre&gt;&lt;code&gt;delete mcButton.onRelease;&lt;/code&gt;&lt;/pre&gt;

And if you ever want to add it again, simply to this ...

&lt;pre&gt;&lt;code&gt;mcButton.onRelease = doSomething;&lt;/code&gt;&lt;/pre&gt;

Notice the lack of parentheses after &lt;code&gt;doSomething&lt;/code&gt;, both here and above (the first time the event is handled).  That's because the parentheses actually cause the function to run &amp;#8212; and you don't want to &lt;em&gt;trigger&lt;/em&gt; the function here; at this point, you're merely assigning it to something.</description>
		<content:encoded><![CDATA[<p>Elkapitan,</p>
<p>That&#8217;s a good question.  Since you used the word &#8220;reenable,&#8221; I&#8217;d like to point out that the <code>MovieClip</code> and <code>Button</code> classes each feature an <code>enabled</code> property, which can be used to toggle an instance&#8217;s responsiveness.  That isn&#8217;t the same as deleting or nulling the function assigned to an event, because the event still occurs when <code>enabled</code> is false; it&#8217;s just that the object ignores it.</p>
<p>In order to re-assign an event handler you&#8217;ve deleted or nulled, you merely have to repeat what you did in the first place (namely, to assign the event to a function).  Obviously, this can get a bit tedious, depending on how often it needs to happen.  To save on retyping, I recommend you use a named function rather than a literal function.</p>
<pre><code>function doSomething():Void {
  // code here
  // This is where you tell this function
  // what what to do.
}

mcButton.onRelease = doSomething;
// Now we've assigned the doSomething()
// function to the MovieClip.onRelease
// event of the mcButton instance.</code></pre>
<p>At some point later in the ActionScript, you may get rid of the event handler by deleting it &#8230;</p>
<pre><code>delete mcButton.onRelease;</code></pre>
<p>And if you ever want to add it again, simply to this &#8230;</p>
<pre><code>mcButton.onRelease = doSomething;</code></pre>
<p>Notice the lack of parentheses after <code>doSomething</code>, both here and above (the first time the event is handled).  That&#8217;s because the parentheses actually cause the function to run &mdash; and you don&#8217;t want to <em>trigger</em> the function here; at this point, you&#8217;re merely assigning it to something.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Elkapitan</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-8281</link>
		<pubDate>Fri, 15 Dec 2006 04:30:58 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-8281</guid>
					<description>Hi,

I hope im allowed to ask this here. My question would be how to 'reenable' that null button? for example i have a button with rollover effect that nulls after user press. but  I want it reactivated again to see that rollover effect.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I hope im allowed to ask this here. My question would be how to &#8216;reenable&#8217; that null button? for example i have a button with rollover effect that nulls after user press. but  I want it reactivated again to see that rollover effect.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-7765</link>
		<pubDate>Sun, 10 Dec 2006 17:53:28 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-7765</guid>
					<description>3D,

Haha, that's how it works ... if you find yourself making a mistake, just pick yourself up and keep trying.  You'll figure it out, with enough determination.  :)  The &lt;a href=&quot;http://www.adobe.com/support/forums/&quot; class=&quot;external&quot; target=&quot;_blank&quot;&gt;official Adobe forums&lt;/a&gt; are good, for sure.  And you may also want to check out the new &lt;a href=&quot;http://www.keyframer.com/forum/&quot; class=&quot;external&quot; target=&quot;_blank&quot;&gt;Keyframer forums&lt;/a&gt;, hosted by my friend Chris Georgenes.</description>
		<content:encoded><![CDATA[<p>3D,</p>
<p>Haha, that&#8217;s how it works &#8230; if you find yourself making a mistake, just pick yourself up and keep trying.  You&#8217;ll figure it out, with enough determination.  <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   The <a href="http://www.adobe.com/support/forums/" class="external" target="_blank">official Adobe forums</a> are good, for sure.  And you may also want to check out the new <a href="http://www.keyframer.com/forum/" class="external" target="_blank">Keyframer forums</a>, hosted by my friend Chris Georgenes.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: 3D</title>
		<link>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-7747</link>
		<pubDate>Sun, 10 Dec 2006 13:23:04 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent#comment-7747</guid>
					<description>Well i'd like to ask something!but since this isnt a forum!i was wondern where can i feel free to ask stuff..?</description>
		<content:encoded><![CDATA[<p>Well i&#8217;d like to ask something!but since this isnt a forum!i was wondern where can i feel free to ask stuff..?
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
