Trace Event
It would be great to add a way to track trace events.
when testing flash within the browser its nice to be able to see the trace output. currently there are ways to do this with plugins for firefox or air apps from De MonsterDebugger, but sometime your testing on someone elses computer who don’t have these programs installed. if we had the above event we could simply read a class that shows a debug panel when you input some key combo.
1 2 3 4 5 | stage.addEventListener(TraceEvent.UPDATE, OnTrace); function OnTrace(event:TraceEvent):void { textField.text = event.trace } |
if you’d like to see this event added to actionscript please visit the below URLs and add your support:
http://bit.ly/aEKFK9
Read MoreCircle Preloader
Here’s a nice little circle pre-loader class created recently. All you really need to do is add it to the stage and then update its percent value (between 0 and 1) on a ProgressEvent or whatever event you want really. There are also two optional values that you can set in the constructer which relate to the colour of the loader.
You can download the source here
1 2 3 4 5 6 7 8 9 10 11 12 13 | import flash.events.ProgressEvent; import net.peteshand.utils.CirclePercentLoader; var circlePercentLoader:CirclePercentLoader = new CirclePercentLoader(0xAAAAAA, 0x666666); circlePercentLoader.x = stage.stageWidth/2; circlePercentLoader.y = stage.stageHeight/2; addChild(circlePercentLoader); loaderInfo.addEventListener(ProgressEvent.PROGRESS, OnProgress); function OnProgress(event:ProgressEvent):void { circlePercentLoader.percent = loaderInfo.bytesLoaded/loaderInfo.bytesTotal; } |

Recent Comments