Today I finally realized oop’s polymorphism and how this is used in AS3. Really cool. I had some help getting there.. and if you care to see my struggle, see: http://flexdiary.blogspot.com/2008/11/implementing-ieventdispatcher.html
anyway, it was just what I needed to help me, so thanks to Amy’s Flex Diary!
So here is something every beginner needs, debugging using trace and alert.
here is the code:
 <?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application
xmlns:mx=”http://www.adobe.com/2006/mxml”
layout=”absolute”
pageTitle=”Read My Xml”
creationComplete=”initApp()”
>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function initApp():void
{
trace("Hello From within Debuggin?");
}
]]>
</mx:Script>
<mx:Button id=”mybutton” label=”Click Me” click=”Alert.show(’Hello From Flex’);”/>
</mx:Application>
<mx:Application
xmlns:mx=”http://www.adobe.com/2006/mxml”
layout=”absolute”
pageTitle=”Read My Xml”
creationComplete=”initApp()”
>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function initApp():void
{
trace("Hello From within Debuggin?");
}
]]>
</mx:Script>
<mx:Button id=”mybutton” label=”Click Me” click=”Alert.show(’Hello From Flex’);”/>
</mx:Application>
Â
Need more? http://learn.adobe.com/wiki/display/Flex/Debugging+tutorial
painful.
Post a Comment