flash on 2010-5-28
♥0 |
Line 19 |
Modified 2010-05-28 18:52:21 |
MIT License
archived:2017-03-30 02:20:05
ActionScript3 source code
/**
* Copyright kihon ( http://wonderfl.net/user/kihon )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/nGeC
*/
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import spark.events.IndexChangeEvent;
[Bindable]
private var list:ArrayCollection = new ArrayCollection(["技"]);
private var data:Array = ["サンダーボルト", "アイスストーム", "インフェルノ"];
protected function bar_changeHandler(event:IndexChangeEvent):void
{
list.addItem(data[int(Math.random() * data.length)]);
}
]]>
</fx:Script>
<s:ButtonBar x="104" y="119" id="bar" change="bar_changeHandler(event)" dataProvider="{list}" fontFamily="MS 明朝" />
</s:Application>