// Drag two Button components onto the Stage (addDate_btn and
dumpDataHolder_btn), a TextInput (myDate_txt) and a DataHolder
(myDataHolder). Add the following ActionScript to Frame 1:
var dhListener:Object = {};
dhListener.click = function() {
trace("dumping DataHolder");
trace("
"+myDataHolder.myDate);
trace("");
};
var dateListener:Object = {};
dateListener.click = function() {
myDataHolder.myDate = myDate_txt.text;
trace("added value");
};
this.dumpDataHolder_btn.addEventListener("click", dhListener);
this.addDate_btn.addEventListener("click", dateListener);
DataHolder component (Flash Professional only)
289
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?