首先建立一個新的Package 名為 com.pomodo.model 之後在底下建立 Task.as 作為 mxml的溝通管道 package com.pomodo.model { public class Task { [Bindable] public var name:String; public function Task(name:String=""){ this.name=name; } } } 資料結構如下: 新增一個 mxml 名為 guestbook <?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" minWidth="955" minHeight="600"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <fx:Script> <![CDATA[ import com.pomodo.model.Task; import mx.collections.ArrayCollection; [Bindable] private var tasks:ArrayCollection=new ArrayCollection(); private function createTask(...