It would be very nice if it were possible to define behaviors for particularly events directly in the asul definition.
For example:
<button anchors="82,3,pw,ph" width="16" height="16" name="samplebutton" style="something">
<box name="$up$"/>
<box name="$over$" style="over"/>
<box name="$down$" style="down"/>
<Scripts>
<OnLoad>megazine.DoSomething_OnLoad(this);</OnLoad>
<OnLeave>megazine.DoSomething_OnLeave(this);</OnLeave>
<OnMouseOver>megazine.DoSomething_OnMouseDown(this);</OnMouseOver>
<OnMouseDown>megazine.DoSomething_OnMouseDown(this);</OnMouseDown>
<OnMouseUp>megazine.DoSomething_OnMouseUp(this);</OnMouseUp>
</Scripts>
</button>
Here I've used the Button as Example but the logic could be used for every element, boxes, frames and so on.
I know that this suggestion would break the separation of (interface and code) but in the other hand it would ease up a lot of things and raise the flexibility of plugin development.
I've tested it with this simple example on a local branch with the latest revision and as3eval
http://eval.hurlant.com/ and
http://www.riaone.com/products/deval/index.html (native as3 and flex) both works very well.
Plugins could be developed more globally by the translocation of particular logic or functionscalls to the asul. Less variants of practicaly same compiled plugins could be the result and the maintenance of the plugins core functionality would be easier without the heavy load to cover every single custom possibility that maybe someone is needing.
If someone need a custom button, lets say a "Download" Button in the Navigation Bat for example, a <button ...>...<scripts><OnClick>MygetUrl("pathtopdf.pdf", "_blank");</OnClick>... in the Navigation.asul would be your friend. Done. No canges to the Code, no compile and no extra plugin to take care of.
Sure, all this needs more rethinking and should have reasonable borders. I mean, it has to be somehow granted (iterfaces??) that only particular and simple things can be done throu the <script> Block to prevent Chaos.
