LocalConnection - A New Nightmare?

I have been using Flash MX 2004 and have just purchased Flash CS3, I am just making changes to an existing AS 2.0 project, but I have discovered a bit of a nightmare.

I had an swf called login.swf load another another swf which is dependent on user input, below is a small bit of code:

login.swf (AS 2.0)

_global.nUserID = this.myID;
_global.sUserName = this.myName;

if(_root.test == undefined){
_root.createEmptyMovieClip(“test”, 0);
}
_root.test.setDepthBelow(_root.frame_mc);
_root.test.loadMovie(“flash_mx/”+_global.sSelectMC+".swf");

The above code works fine creates a new mc called test and loads “+_global.sSelectMC+”.swf", but the next bit is where it falls down.

I have some variables which “+_global.sSelectMC+”.swf" needs to read:

var sUserIDDisplay:Number = _root._global.nUserID;
var sUserNameDisplay:String = _root._global.sUserName;

This is where I found out that Adobe have stopped swf’s talking to other swf’s and a class called LocalConnection needs to be used.

The second swf in this case represented by “+_global.sSelectMC+”.swf" needs to retrieve the global variables from login.swf automatically as the second swf plays, there is no user intervention here at all.

Could someone please show me how to pass the variables from one to another?

Any help here would be much appreciated.

Regards, NewAS.