Pete Shand
  • Home
  • Contact
  • Photography
  • Portfolio
Home » Posts made in June, 2010
Jun08 1

Trace Event

Posted by Pete Shand in Actionscript

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.

?View Code ACTIONSCRIPT
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 More
Jun08 0

Circle Preloader

Posted by Pete Shand in Actionscript

Get Adobe Flash player

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

?View Code ACTIONSCRIPT
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;
}
Read More

Categories

  • 3D Flash
  • Actionscript
  • Design
  • Facebook
  • Flash
  • Javascript
  • Online Advertising
  • Photography
  • Recent Work
  • Text To Speech
  • Translation
  • Video

Recent Comments

  • Pete Shand on TextToSpeech Accessibility
  • Andre on TextToSpeech Accessibility
  • alban on Flash 11 Platform Game Prototype
  • Face on Facebook Fanpage PSD Template 2011
  • Tommy Saputra on Facebook Fanpage PSD Template 2011

What I'm Doing...

  • RT I 2nd that @karlfreeman: Painful presentation at #fotb at the moment. Should've gone to monster projects and rewatch it again from their 2010-09-28
  • @ReDrUmNZ I'd leave it at home... ya going on holiday to get any from that shit in reply to ReDrUmNZ 2010-09-14
  • @ReDrUmNZ I can honestly say i haven't had any problems with CS5, stink 2 b u huh, lol in reply to ReDrUmNZ 2010-08-17
  • More updates...
Get Adobe Flash playerPlugin by wpburn.com wordpress themes

© 2011 Pete Shand | Designed by Elegant Themes | Powered by WordPress