Skip to content

Instantly share code, notes, and snippets.

Created March 15, 2014 16:48
Show Gist options
  • Save anonymous/9570281 to your computer and use it in GitHub Desktop.
Save anonymous/9570281 to your computer and use it in GitHub Desktop.
package state
{
import flash.events.MouseEvent;
import flash.net.navigateToURL;
import flash.net.URLRequest;
public class Title extends UIState
{
public function Title() {
super();
MusicHandler.play(Assets.hotdog);
Display.stage.addEventListener(MouseEvent.MOUSE_DOWN,this.click);
}
private var frames:int = 0;
override public function draw() : void {
Assets.title.blit(Display.screen);
var _loc1_:Number = 0;
if(this.frames % 60 >= 30)
{
_loc1_ = (this.frames % 60 - 30) * 0.3;
}
if(this.frames % 60 < 30)
{
_loc1_ = (60 - this.frames % 60 - 30) * 0.3;
}
Assets.dawg.draw(Display.screen,400,300 + Math.abs(Math.sin(this.frames / 15)) * 20,this.frames % 60 < 30?0:1,0.9,0.9,_loc1_ * Math.PI / 180);
super.draw();
}
public function click(param1:MouseEvent) : * {
if(param1.stageX >= 164 && param1.stageX < 210 && param1.stageY > 240 && param1.stageY < 324)
{
navigateToURL(new URLRequest("http://abeardforevervoyaging.com/"),"_self");
}
}
override public function tick() : void {
super.tick();
this.frames++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment