[TEST] MinimalComps0.9.6 List
フルパスで指定しないとListを生成するときにコンパイルエラー
♥0 |
Line 33 |
Modified 2012-03-05 01:29:16 |
MIT License
archived:2017-03-20 06:45:00
ActionScript3 source code
/**
* Copyright okoi ( http://wonderfl.net/user/okoi )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/oPuN
*/
/**
* [TEST] MinimalComps0.9.6 List
*/
package
{
import com.bit101.components.List;
import com.bit101.components.Style;
import flash.display.Sprite;
import flash.events.Event;
[SWF(width = "465", height = "465", frameRate = "60")]
/**
* ...
* @author okoi
*/
public class Main extends Sprite
{
private var _list:com.bit101.components.List;
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
// entry point
Style.LABEL_TEXT = 0xCCCCCC;
Style.PANEL = 0x666666;
_list = new com.bit101.components.List( this, 0, 0 );
_list.defaultColor = 0x444444;
_list.alternateColor = 0x393939;
_list.selectedColor = 0x666666;
_list.rolloverColor = 0x777777;
_list.addItem("item1");
_list.addItem("item2");
_list.addItem("item3");
_list.addItem("item4");
trace(_list.defaultColor);
}
}
}