<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - stiobhart</title>
<link>http://snipplr.com/users/stiobhart/tags/button</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 15 Feb 2012 20:35:35 GMT</pubDate>
<item>
<title>(ActionScript 3) actionscript 3  - button action [listen for multiple events.  eg. MOUSE_OVER, MOUSE_OUT, MOUSE_UP]</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) actionscript 3  - button action [listen for a single event.  eg. MOUSE_UP]</title>
<link>http://snipplr.com/view/15829/actionscript-3---button-action-listen-for-a-single-event--eg-mouseup/</link>
<description><![CDATA[ <p>actionscript3 version of the basic button action. 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:27:12 GMT</pubDate>
<guid>http://snipplr.com/view/15829/actionscript-3---button-action-listen-for-a-single-event--eg-mouseup/</guid>
</item>
<item>
<title>(ActionScript) actionscript - button action [to attach to the timeline]</title>
<link>http://snipplr.com/view/15828/actionscript--button-action-to-attach-to-the-timeline/</link>
<description><![CDATA[ <p>basic actionscript button action that should be attached directly to a frame on the timeline - NOT to the button itself.  this is a slightly more complex version of the  'standard' button action which attaches directly to the button itself.  this version has the advantage of allowing you to keep all your actionscript code together in one place on the timeline, rather than having it scattered across all the various elements in your movie.

for this to work, your button must have an instance name.  in the code here, my button instance name is "stupidbutton".

this action will NOT work in actionscript 3, which uses "addEventListener" to respond to button events.

make sure you're attaching this action to the timeline and not directly to the button. the actions window should say "actions - frame" when you open it. if it says "actions - button" you're trying to attach this action to the button itself and flash will blow a fuse!</p> ]]></description>
<pubDate>Thu, 11 Jun 2009 05:49:23 GMT</pubDate>
<guid>http://snipplr.com/view/15828/actionscript--button-action-to-attach-to-the-timeline/</guid>
</item>
<item>
<title>(ActionScript) actionscript - button action [to attach directly to button]</title>
<link>http://snipplr.com/view/15827/actionscript--button-action-to-attach-directly-to-button/</link>
<description><![CDATA[ <p>basic actionscript button action that can be attached directly to a button on the stage.  this will NOT work in actionscript 3, which does not allow actionscript to be attached directly onto buttons.

make sure you're attaching this action to a button and not to a keyframe on the timeline.  the actions window should say "actions - button" when you open it.  if it says "actions - frame" you're trying to attach this action to the timeline and flash will blow a fuse!</p> ]]></description>
<pubDate>Thu, 11 Jun 2009 05:45:59 GMT</pubDate>
<guid>http://snipplr.com/view/15827/actionscript--button-action-to-attach-directly-to-button/</guid>
</item>
<item>
<title>(ActionScript) actionscript - paypal button in flash</title>
<link>http://snipplr.com/view/15615/actionscript--paypal-button-in-flash/</link>
<description><![CDATA[ <p>code to implement a paypal button in flash</p> ]]></description>
<pubDate>Sun, 07 Jun 2009 10:34:29 GMT</pubDate>
<guid>http://snipplr.com/view/15615/actionscript--paypal-button-in-flash/</guid>
</item>
</channel>
</rss>
