I'm not an old-school Flash developer, so I'm sure you'll get
better-informed replies, but I would just note that if all you care about is
back-end connection, HttpService, Binding etc. can be all instantiated in
AS3, with no markup required. Also, this in the script block is going to
refer to a class which descends from UIComponent which descends from
DisplayObject.
On Mon, May 31, 2010 at 4:52 PM, Clark Stevenson a.scots...@gmail.comwrote:
Hey all.
Can someone please help me understand how to work with the display list?
Im an AS3 developer and very fond of the freedom i have with AS3. MXML
has a great deal of useful components for connection to the backend
and so on. These components could be handy for me and thus i need to
use the MXML framework.
So you start a new MXML Project and under the Script tag you add this code:
fx:Script
![CDATA[
private var circle:Sprite;
circle = new Sprite();
circle.graphics.beginFill(0x00);
circle.graphics.drawCircle(100, 100, 100);
circle.graphics.endFill();
addChild(circle);
]]
/fx:Script
Everything from the begin fill is an error.
Can someone explain to me why Sprite() is AS3, why its available to
the Script tags but why its not really supported?
I just feel that MXML is screwing up my understanding of the player.
Main.as is a game and it extends Sprite So if MXML was AS3, id
simply add an instance of
var main:Main = new Main(); --- this is my entire game.
So you think, well Main extends Canvas but the Script tags on
Canvas dont understand addChild either
Is what i am trying to do just impossible? I know that MXML is a time
saver and so on, but to be honest, i hate markup and i just cant find
a way to go back what what i know.
This is something which has bugged me for years... Id love to
understand flex more, but after investing so many years in AS3
development, its just another AS2 AS3 jump to start rewriting every
single project in MXML and to be honest, i cant be bothered right now.
If i cant use MXML i cant use them and that great, but theres
trillions of forum posts on google with a trillion views on this
subject and none of them really agree.
Cheers