I've got a main menu and a game which loads as a separate swf from that menu. So far when the player enters their name at the start on the main menu I can get this name to post to Twitter. Also when the player completes the game I get post their time onto Twitter.
The problem is that I want to take the name posted from the main menu and dispatch it and only when the player completed the game post their time and name to Twitter.
Code in main menu to dispatch name:
var NameTextField:TextField = new TextField();
var MyFormat:TextFormat = new TextFormat();
dispatchEvent(new Event(NameTextField.text, true));
NameTextField.selectable = false;
Code in game to receive name and post time to twitter.
navigateToURL(new URLRequest('http://twitter.com/home?status='+encodeURIComponent(+NameTextField.tex t+" completed Game"+' in a time of '+HourText.text+':'+MinuteText.text+':'+SecondText.text+'')),'_blank' );
Europe, Middle East and Africa