

































<?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: Making Buttons Work in Flash CS3 (ActionScript 3.0)</title>
	<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Tue, 07 Feb 2012 20:00:54 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Somnath Dey</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-472645</link>
		<pubDate>Sat, 24 Jul 2010 08:57:04 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-472645</guid>
					<description>Hello David,

I just want to ask you a question that as we have done jump to any particular movie clip by using telltarget in actionscript 2.0 but in as3.0 telltarget is no longer existed so, instead of using telltarget how can we jump to any particular movieclip,if the movieclip exists only in the library palette.</description>
		<content:encoded><![CDATA[<p>Hello David,</p>
<p>I just want to ask you a question that as we have done jump to any particular movie clip by using telltarget in actionscript 2.0 but in as3.0 telltarget is no longer existed so, instead of using telltarget how can we jump to any particular movieclip,if the movieclip exists only in the library palette.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Tom Cunningham</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-425986</link>
		<pubDate>Sat, 14 Nov 2009 09:20:30 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-425986</guid>
					<description>Hi, I have what seems to me to be a simple enough function, but I've tried a couple of solutions in AS2 and it still isn't working.

I have a movie clip on my stage with two keyframes.  Each keyframe has an identically sized graphic in one of two colors.  I want to trigger a state change between the two colors with a button click (preferably a button that isn't visible on the stage).  The code I've been using is below.

buzzerL is the MC that holds the two state keyframed element.  The button triggering is named buzzbuttonL

on(release){
clicked=!clicked;
if(clicked)
buzzerL.gotoAndStop(2);
else{
buzzerL.gotoAndStop(1);
}
}

Any ideas on an AS3 solution.  Looking at your previous notes, I'm guessing this will be sorted with MouseEvent handlers, but since I never had the AS2 working, I'm at a bit of a loss as to where to start in AS3.  This is driving me crazy!  Thanks...</description>
		<content:encoded><![CDATA[<p>Hi, I have what seems to me to be a simple enough function, but I&#8217;ve tried a couple of solutions in AS2 and it still isn&#8217;t working.</p>
<p>I have a movie clip on my stage with two keyframes.  Each keyframe has an identically sized graphic in one of two colors.  I want to trigger a state change between the two colors with a button click (preferably a button that isn&#8217;t visible on the stage).  The code I&#8217;ve been using is below.</p>
<p>buzzerL is the MC that holds the two state keyframed element.  The button triggering is named buzzbuttonL</p>
<p>on(release){<br />
clicked=!clicked;<br />
if(clicked)<br />
buzzerL.gotoAndStop(2);<br />
else{<br />
buzzerL.gotoAndStop(1);<br />
}<br />
}</p>
<p>Any ideas on an AS3 solution.  Looking at your previous notes, I&#8217;m guessing this will be sorted with MouseEvent handlers, but since I never had the AS2 working, I&#8217;m at a bit of a loss as to where to start in AS3.  This is driving me crazy!  Thanks&#8230;
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: William V.</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-424599</link>
		<pubDate>Thu, 05 Nov 2009 06:49:22 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-424599</guid>
					<description>This is a great resource, and by pure coincidence I purchased your book today as well. I am having an issue that is kind of discussed earlier but I am not finding the answer.

I have a set of buttons inside of a movieclip on the main stage. From inside the movieclip on frame 1, I am trying to access a label on the main timeline. On this frame I have a video that I want to play when you arrive to the frame.
Here is my current code.

function getSpot(e:MouseEvent):void
{
	e.target.parent.gotoAndPlay(cr);
	trace(&quot;Spot one here!!&quot;);
}

spot1_btn.addEventListener(MouseEvent.CLICK, getSpot);

Here is the error I get:
1120: Access of undefined property cr.</description>
		<content:encoded><![CDATA[<p>This is a great resource, and by pure coincidence I purchased your book today as well. I am having an issue that is kind of discussed earlier but I am not finding the answer.</p>
<p>I have a set of buttons inside of a movieclip on the main stage. From inside the movieclip on frame 1, I am trying to access a label on the main timeline. On this frame I have a video that I want to play when you arrive to the frame.<br />
Here is my current code.</p>
<p>function getSpot(e:MouseEvent):void<br />
{<br />
	e.target.parent.gotoAndPlay(cr);<br />
	trace(&#8221;Spot one here!!&#8221;);<br />
}</p>
<p>spot1_btn.addEventListener(MouseEvent.CLICK, getSpot);</p>
<p>Here is the error I get:<br />
1120: Access of undefined property cr.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Francis</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-407067</link>
		<pubDate>Fri, 14 Aug 2009 11:38:51 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-407067</guid>
					<description>How do I make plusmover work in actionscript 3? Thanks.</description>
		<content:encoded><![CDATA[<p>How do I make plusmover work in actionscript 3? Thanks.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Erica</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-371741</link>
		<pubDate>Thu, 26 Mar 2009 21:03:33 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-371741</guid>
					<description>Hey Dave!

I'm really stuck on this peace of code I have.  I'm trying to get my button to open another browser.  I have read the above post and still can't get this thing to work. Here is the following code I have:

DialSoapImg_btn.addEventListener(MouseEvent.CLICK, soapimgClick);

function soapimgClick(event:MouseEvent):void
{
var url: String = &quot;http://www.dialsoap.com&quot;;
var request:URLRequest = new URLRequest(&quot;www.dialsoap.com&quot;);

navigateToURL(request, '_blank');

}

However, I keep getting this error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at AtchleyDesign_fla::MainTimeline/frame190()

I'm not sure what I'm doing wrong.  Any help would be greatly appreciated!</description>
		<content:encoded><![CDATA[<p>Hey Dave!</p>
<p>I&#8217;m really stuck on this peace of code I have.  I&#8217;m trying to get my button to open another browser.  I have read the above post and still can&#8217;t get this thing to work. Here is the following code I have:</p>
<p>DialSoapImg_btn.addEventListener(MouseEvent.CLICK, soapimgClick);</p>
<p>function soapimgClick(event:MouseEvent):void<br />
{<br />
var url: String = &#8220;http://www.dialsoap.com&#8221;;<br />
var request:URLRequest = new URLRequest(&#8221;www.dialsoap.com&#8221;);</p>
<p>navigateToURL(request, &#8216;_blank&#8217;);</p>
<p>}</p>
<p>However, I keep getting this error:</p>
<p>TypeError: Error #1009: Cannot access a property or method of a null object reference.<br />
	at AtchleyDesign_fla::MainTimeline/frame190()</p>
<p>I&#8217;m not sure what I&#8217;m doing wrong.  Any help would be greatly appreciated!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Angela</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-357143</link>
		<pubDate>Mon, 02 Mar 2009 04:00:29 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-357143</guid>
					<description>I've been trying to figure out how to make a button within a dropdown menu movieclip link to a scene. Adding a label in scene 2 doesn't make a difference. Any ideas?

function gotoAScene(event:MouseEvent):void
 {
	gotoAndPlay(&quot;Scene 2&quot;);
}
btn1sub1.addEventListener(MouseEvent.CLICK, gotoAScene);</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been trying to figure out how to make a button within a dropdown menu movieclip link to a scene. Adding a label in scene 2 doesn&#8217;t make a difference. Any ideas?</p>
<p>function gotoAScene(event:MouseEvent):void<br />
 {<br />
	gotoAndPlay(&#8221;Scene 2&#8243;);<br />
}<br />
btn1sub1.addEventListener(MouseEvent.CLICK, gotoAScene);
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Erica</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-354642</link>
		<pubDate>Mon, 23 Feb 2009 21:31:06 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-354642</guid>
					<description>I'm really confused.  I'm using a component that requires me to use AS3. All I want to do is have a button that when clicked will take me to the frame that I designate it to. AS2 I use to be able to click on the object and add the action. I know in AS3 you can't do that, but is there an easier way to do this. I'm really new to AS3, but I have to use it. PLEASE PLEASE HELP :(</description>
		<content:encoded><![CDATA[<p>I&#8217;m really confused.  I&#8217;m using a component that requires me to use AS3. All I want to do is have a button that when clicked will take me to the frame that I designate it to. AS2 I use to be able to click on the object and add the action. I know in AS3 you can&#8217;t do that, but is there an easier way to do this. I&#8217;m really new to AS3, but I have to use it. PLEASE PLEASE HELP <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: gerygery</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-342566</link>
		<pubDate>Wed, 28 Jan 2009 21:25:29 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-342566</guid>
					<description>hello i have a error 1009 when i add a scene as a preloader over my scene
i have buttons wich play diferent movie clip in the timeline using frame labels,
pleasae help.</description>
		<content:encoded><![CDATA[<p>hello i have a error 1009 when i add a scene as a preloader over my scene<br />
i have buttons wich play diferent movie clip in the timeline using frame labels,<br />
pleasae help.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Bensonfive</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-340875</link>
		<pubDate>Fri, 23 Jan 2009 21:51:55 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-340875</guid>
					<description>Hi David

I have a simple problem, but i for the life of me cannot solve.
I have a 3 page website. all i want to is link the buttons.

it loads fine. when i go to click on 2nd page fine. when i click back it opens in a new page. finally the 3rd page does not open at all!! heres the code I'm using


home_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);
function mouseDownHandler1(event:MouseEvent):void {
navigateToURL(new URLRequest(&quot;http://www.humper.pwp.blueyonder.co.uk/index.html&quot;) , &quot;_self&quot;);
}

serv_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);
function mouseDownHandler2(event:MouseEvent):void {
navigateToURL(new URLRequest(&quot;http://www.humper.pwp.blueyonder.co.uk/services.html&quot;) , &quot;_self&quot;);
}

contac_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler3);
function mouseDownHandler3(event:MouseEvent):void {
navigateToURL(new URLRequest(&quot;http://www.humper.pwp.blueyonder.co.uk/contact.html&quot;) , &quot;_self&quot;);
}


mail_btn.addEventListener(MouseEvent.MOUSE_DOWN, contact);

function contact(event:MouseEvent):void 
{
var contact_req:URLRequest = new 
URLRequest(&quot;mailto:face@btinternet.com&quot;);
navigateToURL(contact_req, &quot;_self&quot;);
}

Thanks</description>
		<content:encoded><![CDATA[<p>Hi David</p>
<p>I have a simple problem, but i for the life of me cannot solve.<br />
I have a 3 page website. all i want to is link the buttons.</p>
<p>it loads fine. when i go to click on 2nd page fine. when i click back it opens in a new page. finally the 3rd page does not open at all!! heres the code I&#8217;m using</p>
<p>home_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler1);<br />
function mouseDownHandler1(event:MouseEvent):void {<br />
navigateToURL(new URLRequest(&#8221;http://www.humper.pwp.blueyonder.co.uk/index.html&#8221;) , &#8220;_self&#8221;);<br />
}</p>
<p>serv_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);<br />
function mouseDownHandler2(event:MouseEvent):void {<br />
navigateToURL(new URLRequest(&#8221;http://www.humper.pwp.blueyonder.co.uk/services.html&#8221;) , &#8220;_self&#8221;);<br />
}</p>
<p>contac_btn.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler3);<br />
function mouseDownHandler3(event:MouseEvent):void {<br />
navigateToURL(new URLRequest(&#8221;http://www.humper.pwp.blueyonder.co.uk/contact.html&#8221;) , &#8220;_self&#8221;);<br />
}</p>
<p>mail_btn.addEventListener(MouseEvent.MOUSE_DOWN, contact);</p>
<p>function contact(event:MouseEvent):void<br />
{<br />
var contact_req:URLRequest = new<br />
URLRequest(&#8221;mailto:face@btinternet.com&#8221;);<br />
navigateToURL(contact_req, &#8220;_self&#8221;);<br />
}</p>
<p>Thanks
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: commbot</title>
		<link>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-337715</link>
		<pubDate>Fri, 16 Jan 2009 09:03:33 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/making-buttons-work-in-flash-cs3#comment-337715</guid>
					<description>Hi David,

Thanks for all the tips, you've been a lifesaver. However, I have a problem I can't seem to work out. I have an AS3 slideshow which is loading individual swf files from an xml file. I want to put buttons in the swf files and make them work from the main movie. I used the code provided to make the buttons work in the child swf files but nothing happens when I click on the buttons from the parent.

Sure there must be a problem with heirarchy or something but I'm stumped. Hope you can help</description>
		<content:encoded><![CDATA[<p>Hi David,</p>
<p>Thanks for all the tips, you&#8217;ve been a lifesaver. However, I have a problem I can&#8217;t seem to work out. I have an AS3 slideshow which is loading individual swf files from an xml file. I want to put buttons in the swf files and make them work from the main movie. I used the code provided to make the buttons work in the child swf files but nothing happens when I click on the buttons from the parent.</p>
<p>Sure there must be a problem with heirarchy or something but I&#8217;m stumped. Hope you can help
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

