<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: AS3 Drop Down Menu Class</title>
	<atom:link href="http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/</link>
	<description>Chris Teso is Director of Interactive Media, Flash Designer Developer and Portland Photographer.</description>
	<lastBuildDate>Thu, 12 Aug 2010 18:51:01 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Audio Interconnect Cables</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1481</link>
		<dc:creator>Audio Interconnect Cables</dc:creator>
		<pubDate>Sat, 15 May 2010 11:44:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1481</guid>
		<description>Your weblog is so informative … maintain the perform!!!!</description>
		<content:encoded><![CDATA[<p>Your weblog is so informative … maintain the perform!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rudi Hansen</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1480</link>
		<dc:creator>Rudi Hansen</dc:creator>
		<pubDate>Sat, 15 May 2010 02:28:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1480</guid>
		<description>Nice dropdown list, but for some reason when I copy/paste the code into a AS3
script file I get an error when I want to run it

&quot;1083: Syntax error: package is unexpected.&quot;    &#124;  &quot;package com.teso.ui&quot;

I have DL the beta4 of gskinner and added the folders to my folder so that I
have both:
&quot;com/teso/ui/DropDown.as&quot;
&quot;com/gskinner/motion/*&quot;

hope someone can help me with this :)</description>
		<content:encoded><![CDATA[<p>Nice dropdown list, but for some reason when I copy/paste the code into a AS3<br />
script file I get an error when I want to run it</p>
<p>&#8220;1083: Syntax error: package is unexpected.&#8221;    |  &#8220;package com.teso.ui&#8221;</p>
<p>I have DL the beta4 of gskinner and added the folders to my folder so that I<br />
have both:<br />
&#8220;com/teso/ui/DropDown.as&#8221;<br />
&#8220;com/gskinner/motion/*&#8221;</p>
<p>hope someone can help me with this <img src='http://www.christeso.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doccie</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1472</link>
		<dc:creator>Doccie</dc:creator>
		<pubDate>Sat, 03 Apr 2010 15:09:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1472</guid>
		<description>hello chris,

Thanks for a great class. I used it as the base for my own and it turned out really well...
One of the things I changed was the callback function. I don&#039;t much like the use of callbacks, so instead I just dispatch an event now, after storing the selected item in a class variable.

So it now goes something like this:


var drop:DropDown = new DropDown(&quot;MY DROPDOWN&quot;, 180, 14, fmt, items);
drop.addEventListener(Event.SELECT, selectHandler);

private function selectHandler(evt:Event):void {
	trace(DropDown(evt.target).selectedItem.name);
	trace(DropDown(evt.target).selectedIndex);
}

and for the dropdown class itself...

private function selectHandler(e:Event):void {
			
	// set label
	_defaultText.htmlText = e.currentTarget.getChildByName(&quot;t&quot;).text;
	_defaultText.setTextFormat(_fmt);
			
	// set selected
	_selectedIndex = int(e.currentTarget.name); 
	_selectedItem = _items[_selectedIndex];
		
	// dispatch event
	dispatchEvent(new Event(Event.SELECT));
		
}

Just thought you might be interested :)</description>
		<content:encoded><![CDATA[<p>hello chris,</p>
<p>Thanks for a great class. I used it as the base for my own and it turned out really well&#8230;<br />
One of the things I changed was the callback function. I don&#8217;t much like the use of callbacks, so instead I just dispatch an event now, after storing the selected item in a class variable.</p>
<p>So it now goes something like this:</p>
<p>var drop:DropDown = new DropDown(&#8221;MY DROPDOWN&#8221;, 180, 14, fmt, items);<br />
drop.addEventListener(Event.SELECT, selectHandler);</p>
<p>private function selectHandler(evt:Event):void {<br />
	trace(DropDown(evt.target).selectedItem.name);<br />
	trace(DropDown(evt.target).selectedIndex);<br />
}</p>
<p>and for the dropdown class itself&#8230;</p>
<p>private function selectHandler(e:Event):void {</p>
<p>	// set label<br />
	_defaultText.htmlText = e.currentTarget.getChildByName(&#8221;t&#8221;).text;<br />
	_defaultText.setTextFormat(_fmt);</p>
<p>	// set selected<br />
	_selectedIndex = int(e.currentTarget.name);<br />
	_selectedItem = _items[_selectedIndex];</p>
<p>	// dispatch event<br />
	dispatchEvent(new Event(Event.SELECT));</p>
<p>}</p>
<p>Just thought you might be interested <img src='http://www.christeso.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1455</link>
		<dc:creator>Anton</dc:creator>
		<pubDate>Thu, 07 Jan 2010 03:10:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1455</guid>
		<description>hii..

its realy great class
i have been try and its workss.. 

i am new in AS3.. how to make link to another movieClip at the button??? 

thanks... 

anton</description>
		<content:encoded><![CDATA[<p>hii..</p>
<p>its realy great class<br />
i have been try and its workss.. </p>
<p>i am new in AS3.. how to make link to another movieClip at the button??? </p>
<p>thanks&#8230; </p>
<p>anton</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Morgan Sutherland</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1450</link>
		<dc:creator>Morgan Sutherland</dc:creator>
		<pubDate>Thu, 17 Dec 2009 06:14:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1450</guid>
		<description>NOTE: does not work with new version of GTweener. I got it working with Beta 4 (could work with later betas, but I didn&#039;t test): http://www.gskinner.com/libraries/gtween/versionHistory.html

Working Example:

	var fmat:TextFormat = new TextFormat;
	var dropDown;

	// array for drop
			var dropOtherArray:Array = new Array()
			dropOtherArray.push( {title:&quot;&lt;i&gt;i&lt;/i&gt;Work&quot;, name:&quot;folio&quot;} )
			dropOtherArray.push( {title:&quot;&lt;i&gt;i&lt;/i&gt;Experiment&quot;, name:&quot;lab&quot;} )
			dropOtherArray.push( {title:&quot;&lt;i&gt;i&lt;/i&gt;Write&quot;, name:&quot;blog&quot;} )
			dropOtherArray.push( {title:&quot;&lt;i&gt;i&lt;/i&gt;Photograph&quot;, name:&quot;photo&quot;} )
			dropOtherArray.push( {title:&quot;&lt;i&gt;i&lt;/i&gt;Flickr&quot;, name:&quot;flickr&quot;} )
			dropOtherArray.push( {title:&quot;&lt;i&gt;i&lt;/i&gt;Record&quot;, name:&quot;vimeo&quot;} )
			dropOtherArray.push( {title:&quot;&lt;i&gt;contact&lt;/i&gt;Me&quot;, name:&quot;contact&quot;} )

			fmat.color = 0xffffff;
			fmat.font = &quot;Arial&quot;;
			fmat.size = 11;

	dropDown = new DropDown( 180, 25, &quot;&lt;i&gt;i&lt;/i&gt;LiveElsewhere:&quot;, fmat, 0x000033, dropOtherArray, &quot;down&quot;, dropTest );

	addChild( dropDown );

        //callback function
	function dropTest() {
		trace(&quot;works!&quot;);
	}</description>
		<content:encoded><![CDATA[<p>NOTE: does not work with new version of GTweener. I got it working with Beta 4 (could work with later betas, but I didn&#8217;t test): <a href="http://www.gskinner.com/libraries/gtween/versionHistory.html" rel="nofollow">http://www.gskinner.com/libraries/gtween/versionHistory.html</a></p>
<p>Working Example:</p>
<p>	var fmat:TextFormat = new TextFormat;<br />
	var dropDown;</p>
<p>	// array for drop<br />
			var dropOtherArray:Array = new Array()<br />
			dropOtherArray.push( {title:&#8221;<i>i</i>Work&#8221;, name:&#8221;folio&#8221;} )<br />
			dropOtherArray.push( {title:&#8221;<i>i</i>Experiment&#8221;, name:&#8221;lab&#8221;} )<br />
			dropOtherArray.push( {title:&#8221;<i>i</i>Write&#8221;, name:&#8221;blog&#8221;} )<br />
			dropOtherArray.push( {title:&#8221;<i>i</i>Photograph&#8221;, name:&#8221;photo&#8221;} )<br />
			dropOtherArray.push( {title:&#8221;<i>i</i>Flickr&#8221;, name:&#8221;flickr&#8221;} )<br />
			dropOtherArray.push( {title:&#8221;<i>i</i>Record&#8221;, name:&#8221;vimeo&#8221;} )<br />
			dropOtherArray.push( {title:&#8221;<i>contact</i>Me&#8221;, name:&#8221;contact&#8221;} )</p>
<p>			fmat.color = 0xffffff;<br />
			fmat.font = &#8220;Arial&#8221;;<br />
			fmat.size = 11;</p>
<p>	dropDown = new DropDown( 180, 25, &#8220;<i>i</i>LiveElsewhere:&#8221;, fmat, 0&#215;000033, dropOtherArray, &#8220;down&#8221;, dropTest );</p>
<p>	addChild( dropDown );</p>
<p>        //callback function<br />
	function dropTest() {<br />
		trace(&#8221;works!&#8221;);<br />
	}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Armegalo</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1444</link>
		<dc:creator>Armegalo</dc:creator>
		<pubDate>Mon, 02 Nov 2009 15:42:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1444</guid>
		<description>What a lovely class :)
To anyone with problems implimenting the class, here&#039;s how I did it

the example given above leaves out a coupla variable definitions that need to go
above the rest of the code.

var fmat:TextFormat;
var _dropOther;

Also, don&#039;t forget you need to obtain gskinners motion package from
http://gskinner.com/libraries/gtween/

both gskinners motion package and your new DropDown.as package need to be
placed correctly in your folder structure to work.
com/teso/ui/DropDown.as
com/gskinner/motion/*

Finally, you will need a function called &quot;other&quot; to accept the mouseEvent triggered
when a menu item is clicked. Thus event.currentTarget.name will be the name of
button clicked and you can add your functionality from there.

I think that&#039;s it... have fun!

armegalo</description>
		<content:encoded><![CDATA[<p>What a lovely class <img src='http://www.christeso.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
To anyone with problems implimenting the class, here&#8217;s how I did it</p>
<p>the example given above leaves out a coupla variable definitions that need to go<br />
above the rest of the code.</p>
<p>var fmat:TextFormat;<br />
var _dropOther;</p>
<p>Also, don&#8217;t forget you need to obtain gskinners motion package from<br />
<a href="http://gskinner.com/libraries/gtween/" rel="nofollow">http://gskinner.com/libraries/gtween/</a></p>
<p>both gskinners motion package and your new DropDown.as package need to be<br />
placed correctly in your folder structure to work.<br />
com/teso/ui/DropDown.as<br />
com/gskinner/motion/*</p>
<p>Finally, you will need a function called &#8220;other&#8221; to accept the mouseEvent triggered<br />
when a menu item is clicked. Thus event.currentTarget.name will be the name of<br />
button clicked and you can add your functionality from there.</p>
<p>I think that&#8217;s it&#8230; have fun!</p>
<p>armegalo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1420</link>
		<dc:creator>Damien</dc:creator>
		<pubDate>Sun, 30 Aug 2009 22:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1420</guid>
		<description>Hi again Chris, but now I&#039;ve got some problems with the package because with the var DropOtherArray. I think that&#039;s the package must be in the beginning of the class. I tried some few changes but that&#039;s still not work. Is it possible that&#039;s you give us a Fla with the class ?</description>
		<content:encoded><![CDATA[<p>Hi again Chris, but now I&#8217;ve got some problems with the package because with the var DropOtherArray. I think that&#8217;s the package must be in the beginning of the class. I tried some few changes but that&#8217;s still not work. Is it possible that&#8217;s you give us a Fla with the class ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1419</link>
		<dc:creator>Damien</dc:creator>
		<pubDate>Sun, 30 Aug 2009 16:39:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1419</guid>
		<description>Hi Chris, thanks for this class . You had make a very good work. However I&#039;ve got a question with the name of the package. I never had some package with a name like this. What I have to do with the name of the package if I want to use it by myself.

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Chris, thanks for this class . You had make a very good work. However I&#8217;ve got a question with the name of the package. I never had some package with a name like this. What I have to do with the name of the package if I want to use it by myself.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: m</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1296</link>
		<dc:creator>m</dc:creator>
		<pubDate>Thu, 07 May 2009 04:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1296</guid>
		<description>looks like nice code, but I&#039;m still learning as3. how exactly do you implement this.

cheers for the example.</description>
		<content:encoded><![CDATA[<p>looks like nice code, but I&#8217;m still learning as3. how exactly do you implement this.</p>
<p>cheers for the example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eric</title>
		<link>http://www.christeso.com/blog/index.php/lab/as3-drop-down-menu-class/comment-page-1/#comment-1223</link>
		<dc:creator>eric</dc:creator>
		<pubDate>Wed, 01 Apr 2009 16:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.christeso.com/?p=455#comment-1223</guid>
		<description>Hello this looks really interesting.
I am sadly, somewhat clueless as to how to implement your
fine example in a fla file.

It seems you have a class there, which could be DropDown.as stored in
a class path, but I am unable to properly use the class, and always get errors.

How would I structure my fla actionscript to use this class?

thanks for a great example</description>
		<content:encoded><![CDATA[<p>Hello this looks really interesting.<br />
I am sadly, somewhat clueless as to how to implement your<br />
fine example in a fla file.</p>
<p>It seems you have a class there, which could be DropDown.as stored in<br />
a class path, but I am unable to properly use the class, and always get errors.</p>
<p>How would I structure my fla actionscript to use this class?</p>
<p>thanks for a great example</p>
]]></content:encoded>
	</item>
</channel>
</rss>
