Skip to content

Commit

Permalink
clean up frame rate widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Elad Elrom authored and Elad Elrom committed Jul 20, 2010
1 parent 7c606ee commit ba228bc
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
Binary file modified bin-debug/BitmapCachingExample.swf
Binary file not shown.
Binary file modified bin-debug/CacheExternalAssetsExample.swf
Binary file not shown.
Binary file modified bin-debug/FrameRateControlExample.swf
Binary file not shown.
Binary file modified bin-debug/OptimazingTools.swf
Binary file not shown.
Binary file modified bin-debug/TrackListenersExample.swf
Binary file not shown.
33 changes: 30 additions & 3 deletions src/com/elad/optimize/memory/FrameStats.as
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
/*
Copyright (c) 2009 Elad Elrom. Elrom LLC. All rights reserved.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
@author Elad Elrom
*/
package com.elad.optimize.memory
{
import flash.display.MovieClip;
Expand Down Expand Up @@ -233,10 +259,11 @@ package com.elad.optimize.memory
private function showResults():void
{
++countSecondsSinceStart;

if (isDebugMode) trace("-------------- " + countSecondsSinceStart + " second ---------------");

if (isShowCounters)
{
trace("-------------- " + countSecondsSinceStart + " second ---------------");
trace("enterFrameCounter: " + enterFrameCounter );
trace("renderingCounter: " + renderingCounter );
trace("mouseEventCounter: " + mouseEventCounter );
Expand Down Expand Up @@ -282,7 +309,7 @@ package com.elad.optimize.memory

lineGraphs[index].graphics.lineTo( LINE_GRAPH_STARTING_POINT_X + lineGraphCounter , ( 100-dataProvider[index].time ) );

radian = Number(item.time)/total*2;
radian = Number( item.time ) / total * 2;
title = item.name;

pieGraph.graphics.beginFill( colors[index] );
Expand All @@ -293,7 +320,7 @@ package com.elad.optimize.memory
pieGraph.graphics.lineTo( Math.sin( ( numOfRadians+n ) * Math.PI ) * radius, Math.cos( ( numOfRadians+n ) * Math.PI ) * radius );

numOfRadians += radian;
pieGraph.graphics.lineTo(0,0);
pieGraph.graphics.lineTo( 0,0 );
pieGraph.graphics.endFill();

});
Expand Down

0 comments on commit ba228bc

Please sign in to comment.