Fighterlegend's Blog Just some blog that expresses myself and what I do!

27Sep/092

I MADE MY NEW WEBSITE TEMPLATE!

http://www.fighterlegend.com/

Ain't it sexy?

4 hours of work..

2 hours of experimenting with CSS..

And a whole bunch more.

I think I might add a new forum topic on the right, if I get the chance Razz

It took me a looong time of thinking and all..

Hope you all will accept this new, and awesome template..

IF YOU COMPLAIN ABOUT THE BUTTONS, YOU ARE NOT GOING TO GET IT YOUR WAY! I love em just the way they are..

-Fighterlegend

Filed under: Uncategorized 2 Comments
27Sep/090

Created a video player!

I finally finished my Flash Video Player, and it kicks butt!

Only bad thing, I forgot to set the variable right.. so now the videoID is -1..

For instance:
if you wanted to play video #3, you would need to type in ?videoID=2

http://fighterlegend.com/thax/videoPlayer/?videoID=2 Razz

3Sep/0910

How to create a Flash Performance Calculator in AS3

This is a simple AS3 performance calculator I created..

/*********************************************************\
|*Thanks for using Fighterlegends performance Calculator!*|
\*********************************************************/
var documentFPS = stage.frameRate;
var lastTime = getTimer();
var samples = new Array(30);
var frameCounter = 0;
stage.addEventListener(Event.ENTER_FRAME, update);
function update(event:Event) {
	var currentTime = getTimer();
	var timeDif = (currentTime-lastTime)/1000;
	lastTime = currentTime;
	var actualFPS = 1/timeDif;
	samples[frameCounter % 30] = actualFPS;
	frameCounter++;
	var averageFPS = 0;
	for (var i = 0; i < 30; i++) {
		averageFPS += samples[i];
	}
	averageFPS /= 30;
	var performance = Math.round(averageFPS/documentFPS *100);
	var lag = 100-performance;

	fps.text = Math.round(averageFPS) + " fps\n" + documentFPS + " target fps\n" + performance +
	"% performance\n" + lag + "% lag\n";
}

Just create this dynamic box on the stage:
Instance: fps
width: 140
height: 84

Hope you give me credit!

UPDATE:
I got a new, and better update of the script from WarKry on Kongregate!

Filed under: Uncategorized 10 Comments
   
5 visitors online now
5 guests, 0 members
Max visitors today: 5 at 08:16 pm GMT+5
This month: 5 at 07-30-2010 08:16 pm GMT+5
This year: 24 at 04-20-2010 06:01 pm GMT+5
All time: 24 at 04-20-2010 06:01 pm GMT+5