Trying aac stream client tutorial from Adobe dev site, syntax err unexpected package

new to ac3.0 or any version. I went through a few walkthroughs on adobe devnet site for using ac3.0 to stream music from adobe flash interactive server for single songs, that worked. Step by step, easy. I find this tutorial http://www.adobe.com/devnet/flashmediaserver/articles/audio_playlist_app.html
and it’s exactly what I want so I followed step by step but it won’t export to swf form because of 1083 syntax error: package is unexpected. (I’m using Flex 3 demo because that’s what he uses. I have flash cs3 though if it could help.) Error comes up at the first package(line 60 for me).

If I remove the package in its entireity the error comes up for the second package. If you remove all the contents of the package with a problem, the error remains. It only changes if I take out everything before the first package, and gives me different error “packages cannot be nested.” This guy who wrote it does this for a living and it’s on Adobe’s website how could it be messed up? Things to import are imported within the package and the class is created and named. These are the only fixes I could find with google search but people seem to think this is a very vauge error. could someone take a look? am I reading his directions wrong?

more code follows I can post if it would help. Thanks alot for any suggestions.

[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]private[/COLOR][/SIZE]
[LEFT][/COLOR][/SIZE][SIZE=2][COLOR=#6699cc][SIZE=2][COLOR=#6699cc]var[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] connection:NetConnection;[/SIZE]

[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]private[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#6699cc][SIZE=2][COLOR=#6699cc]var[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] musicstream:NetStream;[/SIZE]
[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]private[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#6699cc][SIZE=2][COLOR=#6699cc]var[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] _cs:String;[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] build():[/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]void[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#cc6666][SIZE=2][COLOR=#cc6666]trace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]"…make network connection…"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2]connection = [/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] NetConnection();[/SIZE]
[LEFT][SIZE=2]connection.client = [/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] NetConCalls();[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2]connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);[/SIZE]
[LEFT][SIZE=2]connection.connect([/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]“rtmp://flexplaylist/music”[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2]}[/SIZE][/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]get[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] NetCon():NetConnection[/SIZE]
[LEFT][SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#009900][SIZE=2][COLOR=#009900]//returns the net connection instance[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] connection;[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]netStatusHandler(event:NetStatusEvent):[/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]void[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]switch[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (event.info.code)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]“NetConnection.Connect.Success”[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#cc6666][SIZE=2][COLOR=#cc6666]trace[/COLOR][/SIZE][/COLOR][/SIZE]SIZE=2;[/SIZE][/LEFT]

[LEFT][SIZE=2][COLOR=#cc6666][SIZE=2][COLOR=#cc6666]trace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]":::music stream created:::"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[LEFT][SIZE=2]musicstream = [/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] NetStream(getNetCon());[/SIZE]
[SIZE=2]getNetStream().addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);[/SIZE]
[SIZE=2]getNetStream().client = [/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] NetConStreams();[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]break[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE][/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]case[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]“NetStream.Play.StreaNotFound”[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:[/SIZE]
[LEFT][SIZE=2][COLOR=#cc6666][SIZE=2][COLOR=#cc6666]trace[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]"stream not found: "[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]break[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]default[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]:[/SIZE]
[LEFT][SIZE=2][COLOR=#cc6666][SIZE=2][COLOR=#cc6666]trace[/COLOR][/SIZE][/COLOR][/SIZE]SIZE=2;[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]break[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2]getNetStream():NetStream[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] musicstream;[/SIZE]
[SIZE=2]} [/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2]getNetStream().addEventListener(NetStatusEvent.NET_STATUS,[/SIZE]
[LEFT][SIZE=2]netStatusHandler);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]} [/SIZE]
[SIZE=2][COLOR=#9900cc][SIZE=2][COLOR=#9900cc]package[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]import[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] mx.core.Application;[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]import[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] flash.net.;[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]import[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] flash.events.
;[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#9900cc][SIZE=2][COLOR=#9900cc]class[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] NetConCalls[/SIZE]
[LEFT][SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]private[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#6699cc][SIZE=2][COLOR=#6699cc]var[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] _arr:Array = [/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Arrray();[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] NetConCalls()[/SIZE]
[LEFT][SIZE=2]{[/SIZE]
[SIZE=2]arr = [/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Array();[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] makePlaylist(a:Array):[/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]void[/COLOR][/SIZE][/COLOR][/SIZE]
[SIZE=2]{[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#cc6666][SIZE=2][COLOR=#cc6666]trace[/COLOR][/SIZE][/COLOR][/SIZE]SIZE=2;[/SIZE]
[LEFT][SIZE=2][COLOR=#6699cc][SIZE=2][COLOR=#6699cc]var[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] father:* = Application.application;[/SIZE]
[SIZE=2]setArray( a);[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]for[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#6699cc][SIZE=2][COLOR=#6699cc]var[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] i:int =0; i < a.length; i++)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]getPlaylist().push({label:a*.fileid})[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]father.play_list.dataProvider = getArray();[/SIZE]
[SIZE=2]father.play_list.addEventListener(Event.CHANGE, changeEventHandler)[/SIZE]
[SIZE=2]}[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] getPlaylist():Array[/SIZE]
[LEFT][SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] getArray();[/SIZE]
[SIZE=2]}[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] getArray():Array[/SIZE]
[LEFT][SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]return[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] arr;[/SIZE]
[SIZE=2]}[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] setArray(a:Array):[/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]void[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2]{[/SIZE]
[SIZE=2]arr = a;[/SIZE]
[SIZE=2]}[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]public[/COLOR][/SIZE][/COLOR][/SIZE]****[SIZE=2][COLOR=#339966][SIZE=2][COLOR=#339966]function[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] changeEventHandler(event:flash.events.Event):[/SIZE][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]void[/COLOR][/SIZE][/COLOR][/SIZE]
[LEFT][SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#6699cc][SIZE=2][COLOR=#6699cc]var[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] selectedSong:String = event.currentTarget.selectedItem[[/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]“fileid”[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]];[/SIZE]
[SIZE=2][COLOR=#6699cc][SIZE=2][COLOR=#6699cc]var[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] songtype:String = event.currentTarget.selectedItem[[/SIZE][SIZE=2][COLOR=#990000][SIZE=2][COLOR=#990000]“type”[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]];[/SIZE]
[SIZE=2]currentSong = selectedSong;[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]try[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] {[/SIZE]
[LEFT][SIZE=2]playSong(selectedSong, songtype)[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0033ff][SIZE=2][COLOR=#0033ff]catch[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (e:Error) {[/SIZE]
[SIZE=2][COLOR=#cc6666][SIZE=2][COLOR=#cc6666]trace[/COLOR][/SIZE][/COLOR][/SIZE]SIZE=2[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2]}[/SIZE][/LEFT]

[LEFT][SIZE=2]}[/SIZE]
[LEFT][SIZE=2]father.playSong(selectedSong, songtype);[/SIZE][/LEFT]
[/LEFT]

[LEFT][SIZE=2]} [/SIZE]

[SIZE=2]}[/SIZE][/LEFT]