<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/actionscript-3/tags/button</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 07:55:54 GMT</pubDate>
<item>
<title>(ActionScript 3) Mute all - Drakkon</title>
<link>http://snipplr.com/view/37267/mute-all/</link>
<description><![CDATA[ <p>Used to mute all sound coming from a swf</p> ]]></description>
<pubDate>Wed, 14 Jul 2010 08:01:19 GMT</pubDate>
<guid>http://snipplr.com/view/37267/mute-all/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Use Dictionary Obect to Store Values Associated with MovieClips - adrianparr</title>
<link>http://snipplr.com/view/29331/as3-use-dictionary-obect-to-store-values-associated-with-movieclips/</link>
<description><![CDATA[ <p>To do this sort of thing (ie. passing values to an onRelease event handler) in AS2 I would have used Joey Lott's Proxy class, which was similar to Delegate.
To do this in AS3 you could create your own custom class which extends MovieClip and then store the value as a property which can then be retrieved in the event handler, but sometime just using a Dictionary Object is easier and quicker.</p> ]]></description>
<pubDate>Fri, 05 Mar 2010 05:47:30 GMT</pubDate>
<guid>http://snipplr.com/view/29331/as3-use-dictionary-obect-to-store-values-associated-with-movieclips/</guid>
</item>
<item>
<title>(ActionScript 3) Button Template Class in AS3 - alvincrespo</title>
<link>http://snipplr.com/view/29088/button-template-class-in-as3/</link>
<description><![CDATA[ <p>Here is a template button class, ive been using for my projects. Cheers!</p> ]]></description>
<pubDate>Mon, 01 Mar 2010 20:17:36 GMT</pubDate>
<guid>http://snipplr.com/view/29088/button-template-class-in-as3/</guid>
</item>
<item>
<title>(ActionScript 3) It's all in the name - Instance Name Function - MacEvelly</title>
<link>http://snipplr.com/view/21575/its-all-in-the-name--instance-name-function/</link>
<description><![CDATA[ <p>This uses the button's instance name to assign functions.  Instead of using a bunch of event listeners, you can use one function to delegate actions according to the button's instance name.</p> ]]></description>
<pubDate>Wed, 21 Oct 2009 16:11:28 GMT</pubDate>
<guid>http://snipplr.com/view/21575/its-all-in-the-name--instance-name-function/</guid>
</item>
<item>
<title>(ActionScript 3) Button Code - with useful options - markaltman</title>
<link>http://snipplr.com/view/18673/button-code--with-useful-options/</link>
<description><![CDATA[ <p>Code to make Sprite or MovieClip act as a button. Useful options include buttonMode to create "hand" on mouseover and mouseChildren=false so you can target the button correctly (for example, when using event.target) and not any nested children by mistake.</p> ]]></description>
<pubDate>Fri, 21 Aug 2009 11:48:14 GMT</pubDate>
<guid>http://snipplr.com/view/18673/button-code--with-useful-options/</guid>
</item>
<item>
<title>(ActionScript 3) actionscript 3  - button action [listen for multiple events.  eg. MOUSE_OVER, MOUSE_OUT, MOUSE_UP] - stiobhart</title>
<link>http://snipplr.com/view/15830/actionscript-3---button-action-listen-for-multiple-events--eg-mouseover-mouseout-mouseup/</link>
<description><![CDATA[ <p>actionscript3 version of a more complex button action, which responds to rollover, rollout and clicking.  this method uses one single 'buttonstuff' function with a  'switch'  inside which causes the function to respond differently, depending on what the user action on the button was.

i think this is a neater way to do it than to have each individual 'addEventListener' trigger a separate function.

in actionscript3, button actions can no longer be attached to the buttons themselves or called from the main timeline. you need to put an 'addEventListener' in the timeline to 'listen' for interaction with the button and then call an appropriate function to deal with that action.

the button needs to have an instance name. in this case it is called 'stupidbutton'</p> ]]></description>
<pubDate>Thu, 11 Jun 2009 06:44:00 GMT</pubDate>
<guid>http://snipplr.com/view/15830/actionscript-3---button-action-listen-for-multiple-events--eg-mouseover-mouseout-mouseup/</guid>
</item>
<item>
<title>(ActionScript 3) Rectangle - zeman</title>
<link>http://snipplr.com/view/15823/rectangle/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 11 Jun 2009 00:05:41 GMT</pubDate>
<guid>http://snipplr.com/view/15823/rectangle/</guid>
</item>
<item>
<title>(ActionScript 3) Button with Buttonmouseover-Cursor - pfeisinger</title>
<link>http://snipplr.com/view/14189/button-with-buttonmouseovercursor/</link>
<description><![CDATA[ <p>I always forget how to implement a button with active mousecursor....</p> ]]></description>
<pubDate>Mon, 20 Apr 2009 08:07:19 GMT</pubDate>
<guid>http://snipplr.com/view/14189/button-with-buttonmouseovercursor/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 MovieClip-as-a-Button Easy Function - Winkyboy</title>
<link>http://snipplr.com/view/9553/as3-movieclipasabutton-easy-function/</link>
<description><![CDATA[ <p>Because making a button out of a movieclip in AS3 is ridiculously code-heavy, I wrote a simple function to set the needed values with only a couple of lines.  You need the function placed within your code, after which you simply call it and then define the over/out/click functions for your movieclip.</p> ]]></description>
<pubDate>Fri, 07 Nov 2008 12:23:44 GMT</pubDate>
<guid>http://snipplr.com/view/9553/as3-movieclipasabutton-easy-function/</guid>
</item>
<item>
<title>(ActionScript 3) Oman3D - Simple gotoAndStop button function - sebastianassaf</title>
<link>http://snipplr.com/view/8130/oman3d--simple-gotoandstop-button-function/</link>
<description><![CDATA[ <p>button function to jump to labeled frame.</p> ]]></description>
<pubDate>Mon, 01 Sep 2008 19:23:20 GMT</pubDate>
<guid>http://snipplr.com/view/8130/oman3d--simple-gotoandstop-button-function/</guid>
</item>
<item>
<title>(ActionScript 3) Button Rollover - zeman</title>
<link>http://snipplr.com/view/7276/button-rollover/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 14 Jul 2008 18:28:09 GMT</pubDate>
<guid>http://snipplr.com/view/7276/button-rollover/</guid>
</item>
</channel>
</rss>