Thanks Roger; I figured that out through some sneaky use of the debugger.
Tobias. --- In [email protected], "Roger Gonzalez" <[EMAIL PROTECTED]> wrote: > > You always need to embed onto a variable of type class or string. Using > [Embed] on XML is actually an undocumented trick, I believe, but it > works something like this: > > [Embed('Data/Summary.xml')] > private var summaryClass:Class; > > If I remember correctly, it creates a class with a (static?) "data" > member of type XML. > > -rg > > > > ________________________________ > > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of tobiaspatton > Sent: Tuesday, December 12, 2006 1:55 PM > To: [email protected] > Subject: [flexcoders] Embedding XML document in Actionscript > > > > Hello list; > > I can't do this in MXML: > > <mx:XML id="summary" source="Data/summary.xml"/> > > But I can't do this in ActionScript > > [Embed( 'Data/Summary.xml' )] > private var summary : XML > > (I get this compiler error: Embed only supported with variables > of > type Class or String. ) > > Any workarounds? >

