Hi matt, try this
<mx:Script source="brandnewas.as"/> Omar Ramos Technology Manager www.itacon.net <http://www.itacon.net/> _____ From: Matt Horn [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 12:07 PM To: [email protected] Subject: RE: [flexcoders] Learning to connect actionscript pages to mxml pages Try putting quotes around the {this} in the brandnewas tag: <brandnewas id="bna" bnaview="{this}" /> matt h _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 10:46 AM To: [email protected] Subject: [flexcoders] Learning to connect actionscript pages to mxml pages I am trying to teach myself how to make an mxml page and connect it to an action script page. To do this I am trying out the simplest program possible. I will show you all the code I have written for both files and what I did was just make a simple mxml page with no extra code and linked it to an action script page with what I believed to be the correct syntax. Here is the mxml file: <?xml version="1.0"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" width="1738" height="1412" xmlns="*" > <brandnewas id="bna" bnaview={this} /> </mx:Application> Here is the .as file I am trying to link it to // ActionScript Document class brandnewas { public var bnaview:Object; public function brandnewas() {} } The error message I have been getting is that an mxml tag must be embedded within an application tag to either run or debug it. I also get an error message at the bottom for the mxml file that says in the description "Expected an attribute value[xml]" I am confused for a few reasons one being I thought I had an application tage around the brandnewas tag, and two I am not sure what var needs the attribute value? Yahoo! Groups Sponsor ADVERTISEMENT <http://us.ard.yahoo.com/SIG=129si8uoo/M=298184.6018725.7038619.3001176/D=gr oups/S=1705007207:HM/EXP=1109347647/A=2593423/R=0/SIG=11el9gslf/*http://www. netflix.com/Default?mqso=60190075> click here <http://us.adserver.yahoo.com/l?M=298184.6018725.7038619.3001176/D=groups/S= :HM/A=2593423/rand=495013317> _____ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . ------=_NextPart_001_0019_01C51A9A.2A0518B0 Content-Type: text/html; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dus-ascii"> <META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR></HEAD> <BODY> <DIV dir=3Dltr align=3Dleft><SPAN class=3D171295521-24022005><FONT face=3DA= rial=20 color=3D#0000ff size=3D2>Hi matt,</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D171295521-24022005><FONT face=3DA= rial=20 color=3D#0000ff size=3D2></FONT></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D171295521-24022005><FONT face=3DA= rial=20 color=3D#0000ff size=3D2>try this</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D171295521-24022005><FONT face=3DA= rial=20 color=3D#0000ff size=3D2></FONT></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D171295521-24022005><FONT face=3DA= rial=20 color=3D#0000ff size=3D2> <mx:Script=20 source=3D"brandnewas.as"/></FONT></SPAN></DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV> <DIV> </DIV> <DIV align=3Dleft><FONT face=3D"Book Antiqua" color=3D#0000a0 size=3D4><EM>= Omar=20 Ramos</EM></FONT></DIV> <DIV align=3Dleft><FONT face=3DArial size=3D2>Technology Manager</FONT></DI= V> <DIV align=3Dleft><FONT face=3DArial color=3D#0000ff=20 size=3D2>www.itacon.net</FONT></DIV> <DIV align=3Dleft><A href=3D"http://www.itacon.net/"><IMG=20 src=3D"http://www.itacon.net/images/itacon.jpg" width=3D120 border=3D0=20 heigth=3D"25"></A> </DIV> <DIV> </DIV><BR> <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft> <HR tabIndex=3D-1> <FONT face=3DTahoma size=3D2><B>From:</B> Matt Horn [mailto:[EMAIL PROTECTED] a.com]=20 <BR><B>Sent:</B> Thursday, February 24, 2005 12:07 PM<BR><B>To:</B>=20 [email protected]<BR><B>Subject:</B> RE: [flexcoders] Learning to= =20 connect actionscript pages to mxml pages<BR></FONT><BR></DIV> <DIV></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D818110616-24022005><FONT face=3DA= rial=20 color=3D#0000ff size=3D2>Try putting quotes around the {this} in= the=20 brandnewas tag:</FONT></SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D818110616-24022005><FONT face=3DA= rial=20 color=3D#0000ff size=3D2></FONT></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D818110616-24022005><FONT face=3DA= rial=20 color=3D#0000ff size=3D2><FONT face=3D"Courier New" color=3D#000000=20 size=3D3><brandnewas id=3D"bna" bnaview=3D"{this}"=20 /></FONT><BR></FONT></SPAN></DIV> <DIV><SPAN class=3D818110616-24022005><FONT face=3DArial color=3D#0000ff si= ze=3D2>matt=20 h</FONT></SPAN></DIV> <DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT><BR> </DIV> <BLOCKQUOTE=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px soli= d; MARGIN-RIGHT: 0px"> <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft> <HR tabIndex=3D-1> <FONT face=3DTahoma size=3D2><B>From:</B> [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] <BR><B>Sent:</B> Thursday, February 24, 2005 10= :46=20 AM<BR><B>To:</B> [email protected]<BR><B>Subject:</B> [flexcoder= s]=20 Learning to connect actionscript pages to mxml pages<BR></FONT><BR></DIV> <DIV></DIV><TT>I am trying to teach myself how to make an mxml page and=20 connect it to an action script page. To do this I am trying out the simpl= est=20 program possible. I will show you all the code I have written for b= oth=20 files and what I did was just make a simple mxml page with no extra code = and=20 linked it to an action script page with what I believed to be the correct= =20 syntax. <BR>Here is the mxml file:<BR><?xml=20 version=3D"1.0"?><BR><mx:Application xmlns:mx=3D"<A=20 href=3D"http://www.macromedia.com/2003/mxml">http://www.macromedia.com/20= 03/mxml</A>"=20 width=3D"1738" height=3D"1412" xmlns=3D"*" ><BR><BR><brandnewas id= =3D"bna"=20 bnaview=3D{this} /><BR><BR></mx:Application><BR><BR>Here is the = .as=20 file I am trying to link it to<BR>// ActionScript Document<BR>class=20 brandnewas<BR>{<BR> public var=20 bnaview:Object;<BR> public function=20 brandnewas()<BR> {}<BR>}<BR><BR><BR><BR><BR><BR><BR>The= =20 error message I have been getting is that an mxml tag must be embedded wi= thin=20 an application tag to either run or debug it. I also get an error message= at=20 the bottom for the mxml file that says in the description "Expected an=20 attribute value[xml]" I am confused for a few reasons one being I=20 thought I had an application tage around the brandnewas tag, and two I am= not=20 sure what var needs the attribute value?<BR><BR></TT><BR><BR></BLOCKQUOTE= ></BODY></HTML> ------=_NextPart_001_0019_01C51A9A.2A0518B0--
<<image/jpeg>>

