Skip to content

Instantly share code, notes, and snippets.

@sorah
Created June 29, 2009 08:07
Show Gist options
  • Save sorah/137529 to your computer and use it in GitHub Desktop.
Save sorah/137529 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="setInterval(auau,1)" width="226" height="147">
<mx:ProgressBar x="10" y="115" width="200" id="progress_bar" label="" height="7" mode="manual"/>
<mx:Script>
<![CDATA[
private function auau():void{
var now:Date = new Date();
var milli:int;
milli = 86400000-(now.getHours()*3600000+now.getMinutes()*60000+now.getSeconds()*1000+now.getMilliseconds());
hp_label.text = String(milli);
progress_bar.setProgress(milli,86400000);
}
]]>
</mx:Script>
<mx:Label x="10" y="10" text="明日までの時間(ミリ秒)" fontSize="18" width="204"/>
<mx:Label x="10" y="46" text="86400000" fontSize="36" width="204" id="hp_label"/>
</mx:WindowedApplication>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment