wonderfl - build flash online

Load HGE Font

My old experiment - try to load HGE font. (Haaf's Game Engine: http://hge.relishgames.com)

civet civet

add to favorites

Embed

Code Fullscreen

Related Images

Talk

Hello Civet, the matrix translation will end at + or - 32000 (in this range, not sure of the exact value), hence the scrolling bg will stop at some point.

  • by Hasufel
  • at 2012/04/19 00:53:28

probably 32768*

  • by Hasufel
  • at 2012/04/19 01:03:31

To avoid that, maybe change the onFrameLoop as in:

private function onFrameLoop(event:Event):void {
bgMatrix.ty -= 1;
bgMatrix.tx += 0.25;
this.graphics.clear();
this.graphics.beginBitmapFill(bg, bgMatrix);
this.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
this.graphics.endFill();
if (Math.abs(bgMatrix.tx)%bg.width == 0 && Math.abs(bgMatrix.ty)%bg.height == 0){
bgMatrix.identity();
}
}

  • by Hasufel
  • at 2012/04/19 02:31:19

@Hasufel: Thanks for your tips! I never noticed that before.

  • by civet
  • at 2012/04/23 11:29:29

Favorite by

Tags

sectKeywords

ページの先頭へ戻る