# Uploading name and game time to Twitter

**URL:** <https://forum.kirupa.com/t/uploading-name-and-game-time-to-twitter/327920>\
**Category:** flash\
**Created:** [April 5, 2012, 5:16pm UTC](https://forum.kirupa.com/t/uploading-name-and-game-time-to-twitter/327920 "2012-04-05T17:16:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antsuperhack](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@Antsuperhack](https://forum.kirupa.com/u/Antsuperhack)\
**Post date:** [April 5, 2012, 5:16pm UTC](https://forum.kirupa.com/t/uploading-name-and-game-time-to-twitter/327920/1 "2012-04-05T17:16:29Z")

</div>

Hey all,

Still working on a series of games and ran into a problem with uploading from AS3 to Twitter.

What I want to happen is the player enters their name at the start of the game. When the player completes the game their time and name are sent to Twitter to be posted.

The code for the timer handler:

```auto
function TimerHandler(e:TimerEvent):void{
	var TotalCounts:uint = MyTimer.currentCount+penalty*10;
	var Seconds:String = String(uint(TotalCounts%60));
	var Minutes:String = String(uint((TotalCounts/60)%60))
	var Hours:String = String(uint((TotalCounts/60)/60));
	
	SecondText.text = (uint(Seconds)< 10) ? "0" + Seconds:Seconds;
	MinuteText.text = (uint(Minutes)< 10) ? "0" + Minutes:Minutes;
	HourText.text = (uint(Hours) < 10) ? "0" + Hours:Hours;
}

```

The code I have to send info to Twitter:

```auto
navigateToURL(new URLRequest('http://twitter.com/home?status='+encodeURIComponent('INPUT NAME completed '+"Art Colour Mixing Game"+' and finished in a time of '+Hours+''+Minutes+''+Seconds+'')),'_blank');

```

What I get back from Twitter:

INPUT NAME completed the Art Colour Mixing Game and finished in a time of 0undefinedundefined

Sorry if this makes little sense please let me know if you can’t understand.
