<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - flash - 9.0 - main - 00000023.html</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-25T20:04:36</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#81483" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#80734" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#80122" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#80039" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#80038" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#79773" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#79116" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#79109" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#78817" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000023.html#78781" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#81483">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#81483</link>
		<description>unPull, the navigateToURL() function has a second, optional parameter, and in your case you want to set it to &quot;_self&quot;, as in: navigateToURL(contact_req, &quot;_self&quot;). This is documented in the language reference entry for flash.net.navigateToURL().</description>
		<dc:creator>swartz1999</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2008-03-04T17:54:28</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#80734">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#80734</link>
		<description>Using the following Actionscript 3 for set up with a simple email button in &lt;br /&gt;Flash CS3:&lt;br /&gt;&lt;br /&gt;linkButton.addEventListener(MouseEvent.MOUSE_DOWN, contact);&lt;br /&gt;&lt;br /&gt;function contact(event:MouseEvent):void &lt;br /&gt;{&lt;br /&gt;	var contact_req:URLRequest = new &lt;br /&gt;URLRequest(&quot;mailto:v@unpull.com&quot;);&lt;br /&gt;	navigateToURL(contact_req);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This apparently works to open the users mail browser, but also opens a &lt;br /&gt;troublesome &quot;blank&quot; internet browser window. I am using a CS3 manual &lt;br /&gt;from Todd Perkins, but cannot determine how to defeat this extra window.</description>
		<dc:creator>unPull</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-02-14T18:01:43</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#80122">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#80122</link>
		<description>sneakyimp,&lt;br&gt;&lt;br&gt;Actually, it depends on the context for the code, because &quot;this&quot; refers to the parent container. In the case where you paste it in the Actons panel of the Timeline without attaching it to other display objects, then &quot;this&quot; does refer to the main timeline. However, that isn't always the case. Refer to the entry for &quot;this&quot; in the ActionScript Language Reference for more information: &lt;br&gt;http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#this&lt;br&gt;&lt;br&gt;In fact, if you find yourself confused about keywords, statements, methods or properties, it's generally a good idea to use the ActionScript Language Reference in tandem with Programming AS3 as you learn.</description>
		<dc:creator>djtechwriter</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2008-01-30T08:01:26</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#80039">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#80039</link>
		<description>Or you guys could add a comment indicating that this refers to the main timeline.  It would certainly make your example clearer.</description>
		<dc:creator>sneakyimp</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-01-28T15:55:46</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#80038">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#80038</link>
		<description>You can find out by using a trace() statement such as:&lt;br&gt;    trace(&quot;the value of this is: &quot; + this);&lt;br&gt;&lt;br&gt;In both instances in the example, it refers to:&lt;br&gt;[object MainTimeline]</description>
		<dc:creator>extdw_doc</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2008-01-28T15:46:28</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#79773">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#79773</link>
		<description>I find the use of 'this' confusing in the first example inside function playMovie.  Is this behavior different than one would expect in Actionscript 2?  I'm not sure, but I would expect 'this' in that context to refer to playButton or some object related to the event that was dispatched.</description>
		<dc:creator>sneakyimp</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-01-21T21:44:04</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#79116">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#79116</link>
		<description>Although it's obviously not clear from the error message, the problem is that your instance name is the same as the class name for the symbol, so there's a conflict between the two.&lt;br&gt;&lt;br&gt;If you rename your button to something like &quot;btn&quot; and change the last line of code as follows, it works:&lt;br&gt;btn.addEventListener(MouseEvent.CLICK, gotoLC);&lt;br&gt;&lt;br&gt;Alternatively, you can just rename the class name in the button symbol's Linkage dialog. For instance, it's a very common convention to start class names with an upper-case letter, so you could change the class name to &quot;BtnMenuCurve1&quot; and the code will also work (without changing the symbol name or your code). It's enough for the two names to be different only by one letter, and since ActionScript 3.0 is case sensitive, the difference can be as small as making one letter uppercase.&lt;br&gt;If you make that change then of course your class name won't match the symbol name, so that's a tradeoff to consider.&lt;br&gt;&lt;br&gt;Assuming you're going to have several different buttons with different symbol and class names, I would suggest using the same name for the symbol name and class name, and picking a different (but similarly consistent) naming scheme for the instance names. While, as I mentioned, it works to have names that are different only in terms of upper and lower case, it makes the code harder to read so it's not something I'd recommend.</description>
		<dc:creator>adbe_paul</dc:creator>
		<dc:type>1 0</dc:type>
		<dc:date>2008-01-02T11:46:36</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#79109">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#79109</link>
		<description>Sir / Madam:&lt;br /&gt;&lt;br /&gt;I am using Flash CS3.  I have a defined a button as follows:&lt;br /&gt;&lt;br /&gt;Name:  btnMenuCurve1&lt;br /&gt;Class:  btnMenuCurve1&lt;br /&gt;Base Class:  flash.display.SimpleButton&lt;br /&gt;&lt;br /&gt;Export for Action Script is CHECKED&lt;br /&gt;Export in First Frame is CHECKED&lt;br /&gt;&lt;br /&gt;I created a layer to hold the Action Script called &quot;ACTIONS&quot;&lt;br /&gt;&lt;br /&gt;There is an instance of this button on the stage with instance name &quot;btnMenuCurve1&quot;&lt;br /&gt;&lt;br /&gt;In the first frame of the ACTIONS layer, I modified the sample code for navigating to a website by clicking a button:&lt;br /&gt;&lt;br /&gt;CODE BEGINS:&lt;br /&gt;*******************&lt;br /&gt;import flash.events.MouseEvent;&lt;br /&gt;&lt;br /&gt;function gotoLC(event:MouseEvent):void&lt;br /&gt;{&lt;br /&gt;   var lcURL:URLRequest = new URLRequest(&quot;http://www.LaurenCard.com/index.html/&quot;);&lt;br /&gt;   navigateToURL(lcURL);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;btnMenuCurve1.addEventListener(MouseEvent.CLICK, gotoLC);&lt;br /&gt;******************&lt;br /&gt;CODE ENDS:&lt;br /&gt;&lt;br /&gt;I received the error:&lt;br /&gt;&lt;br /&gt;1046: Type was not found or was not a compile-time constant: btnMenuCurve1.&lt;br /&gt;&lt;br /&gt;I then (based upon a google of the error above:) added the code&lt;br /&gt;&lt;br /&gt;public class btnMenuCurve1{}&lt;br /&gt;&lt;br /&gt;and received the error:&lt;br /&gt;&lt;br /&gt;1114: The public attribute can only be used inside a package.&lt;br /&gt;&lt;br /&gt;Please help.&lt;br /&gt;&lt;br /&gt;Thanks!</description>
		<dc:creator>mcofano</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-01-02T10:19:02</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#78817">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#78817</link>
		<description>ASEVBill,&lt;br&gt;&lt;br&gt;You need an instance of a button with instance name linkButton. In other words, &lt;br&gt;1. Drag a button component from the Components panel, User Interface set of components.&lt;br&gt;2. Give it the instance name linkButton in the Properties panel.&lt;br&gt;3. Paste the code from this page into the Actions panel for the first frame in the Timeline.&lt;br&gt;4. Test movie.</description>
		<dc:creator>djtechwriter</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2007-12-21T16:40:12</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000023.html#78781">
		<title>flash/9.0/main/00000023.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000023.html#78781</link>
		<description>I tried the method above for making a button that opens a web page, but I get the following error:&lt;br /&gt;&lt;br /&gt;TypeError: Error #1009: Cannot access a property or method of a null object reference.&lt;br /&gt;&lt;br /&gt;I can not seem to find a way around this.</description>
		<dc:creator>ASEVBill</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-12-20T16:14:10</dc:date>
	</item>
	</rdf:RDF>

