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

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
29Aug/090

AS3 video player =D

I made a video player in AS3..

I want to know how you all like it!

http://fighterlegend.com/thax/videoPlayer/

Filed under: Uncategorized No Comments
22Aug/093

Chat up!

I put up a chat!

Well, an Instant Messenger.. But you get the idea..

http://chat.fighterlegend.com

=D

Filed under: Uncategorized 3 Comments
18Aug/095

WEBSITE TEMPLATE IS UP!

I successfully made my very first template for a website!

More will come!

http://www.fighterlegend.com/

Filed under: Uncategorized 5 Comments
18Aug/094

Making the template to my website!

I'm creating the template to my website.
Next, I'm going to add a template of my own to the Forums.
Then to this blog ;D

Filed under: Uncategorized 4 Comments
15Aug/092

Car Physics AS3

http://fighterlegend.deviantart.com/art/AS3-car-physics-Top-View-133523129

There ya are! It's my newest car physics test!

Filed under: Uncategorized 2 Comments
15Aug/090

Making multiplayer car game

I'm creating a multiplayer car game =D

It's going to use my own physics engine, and yeah..

I think it's going to be a cool thing..

I got the multiplayer thing, and the car sim. Just gotta make all the graphics and all... Then connect the variables to send to the other players.

Filed under: Uncategorized No Comments
13Aug/096

Forums updated

Forums almost complete! Just gotta add some more addons, and I'm basically done!

Filed under: Uncategorized 6 Comments
12Aug/092

Forums up and in the making!

I just got the forums up.

They're working, and right now, I'm working on them.

I might need to have more mods >=D

http://forums.fighterlegend.com

Filed under: Uncategorized 2 Comments
11Aug/090

Hello world!

Hello to all who is visiting my first, and very, website.

And blog post =D

I successfully set up my site with the help of the very kind Fat Cow customer assistance group..

I'm going to update this every single day..

I hope I get more people on this blog and Forums!

http://forums.fighterlegend.com

Your's truly,

Fighterlegend

Filed under: Uncategorized No Comments
5 visitors online now
5 guests, 0 members
Max visitors today: 5 at 06:44 pm GMT+5
This month: 5 at 09-08-2010 06:44 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