hey all,

i started flex and was pretty amazed by the development speed that is
possible. on the other hand i'm always sceptical if something works so
easy as this becomes unclear pretty fast... thus i tried to separate a
simple as class from the mxml to get some more structure (lets say i
tried to separate the controller from here
http://www.adobe.com/devnet/flex/quickstart/httpservice/).

now the problem is, that i did not find a possibilty to access my as
class from the xml. i.e i tried:

<mx:Object id="app">
         de.pansen.Application.getInstance()
     </mx:Object>
// ...
public function createListener():void
             {
                 btnAdd.addEventListener(MouseEvent.CLICK,
app.startRequest);
             }

then i receive a #1069 error.  the same trial would be:

public function createListener():void
             {
                 btnAdd.addEventListener(MouseEvent.CLICK,
Application.getInstance().startRequest);
             }


what gives the same error.

has anybody a glue how to bind a external eventhandler to a mxml event?

thanks in advance and best regards,
andi

Reply via email to