Posts Tagged ‘actionscript’
StomperNet has been a ‘buzz’.

After Andy’s ‘Mea Culpa‘ why wouldn’t it be…
But this is so much better and bigger, learning many lessons from the last launch – StomperNet strikes again!
Teamed up with Paul Lemberg a new product called FormulaFIVE (F5 for short).
Just launched a video to excite the industry!
So check out stomperf5.com now!


Author: Evan Mullins | Filed under: portfolio, work
Tags: actionscript, as2, css, dreamweaver, film, flash, graphic design, html, interactive, movie, portfolio, review, seo, stompernet, video, web design, website, work
Rich Shupe and Zevan Rosser’s Learning ActionScript 3.0: A Beginner’s Guide.
This book is published by O’Reilly and is part of the Adobe Developer Library.

This book was a great way for me to move into as3. I’m coming from a visual design background with little formal programming training, to know more of my background check my about page. Being mostly self taught, I found myself learning about basic programming skills with this book. This book helped me catch up to the as3 world and I began doing some really cool things in flash once I had a base for understanding all the differences and new things in as3.
I really enjoyed the visual aspects of this book as well. Many of the diagrams and illustrations have the hand drawn look. Like so:


I would recommend this book to anyone who wants to better understand actionscript and actionscrip3 more specifically. It’s a great helper at migrating from as2 to as3. On the cover, it claims to teach “everything needed for non-traditional programmers–web designers, GUI-based Flash developers, those new to Actionscript, visual learners–to understand how Actionscript works and how to use it in everyday projects.” I would agree with that whole-heartedly. All I can say is that after reading it and working through some of the samples included, I better understand AS3 and am confident that through the foundation it has helped me lay I will soon become an actionscript ninja.
Thanks Ryan and Zevan!

Author: Evan Mullins | Filed under: review
Tags: actionscript, as3, book, flash, review
Clean slick preloader. Rounded bar with gradient fill and bevel and glow filter. All actionscript driven, no animations to bloat file size. Rounded corners don’t distort as width changes.
Includes loading statistics for download.
Calculates the following:
- Percent Loaded
- Loaded kilobytes
- Total kilobytes
- Average kilobytes per second download speed
- Remaining dowload time in seconds
- Gives kilobytes to 2 decimal places without dropping zero’s
To Use:
Easy to use, just paste in frame 1 of your file. (actionscript code included!)
Customize:
Customize color easily. Edit the fill color of the preloader_bar movie clip in the library.
Customize font easily. Edit the font for the text box named feedback on the text layer of the preloader mc.
Other Circlecube Items at FlashDen


Author: Evan Mullins | Filed under: portfolio
Tags: actionscript, as2, download, flash
See my previous post about how to do this with as2: Detect Flash Player Version | Actionscript based detection method (as2)
Overview
Recently I had a requirement that I had to detect which version of the flash player was currently installed. This is a normal thing, we do it all the time when embedding flash into html, we detect which version of the player is installed and if the user has an old version they are invited to upgrade…
But what about finding the flash version from within flash? An actionscript based detection method? I hadn’t ever thought about doing that…
Actionscript 3 now uses the flash system capabilities class to report all it’s “capabilities”. First we have to import it and then we have access to all the details through the Capabilities object, such as operating system, language, pixel aspect ration and flash player version. There are a ton of others and I’ve included them in the trace statements.
Steps
- import the class
1
| import flash.system.Capabilities; |
- read the version from the Capabilities object
1
| var flashPlayerVersion:String = Capabilities.version; |
This returns a string, 3 letter operating system, a space, and then the version number as four numbers seperated with commas. (just like eval(‘$version’); in as2)
I display the flashPlayerVersion and to split it out I split the string on the space, and then split the version number with the comma delimiter and display them all.
Example
Here’s what mine is (gif):

And here’s what yours is (swf):
Actionscript (as3)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| import flash.system.Capabilities;
var flashPlayerVersion:String = Capabilities.version;
var osArray:Array = flashPlayerVersion.split(' ');
var osType:String = osArray[0]; //The operating system: WIN, MAC, LNX
var versionArray:Array = osArray[1].split(',');//The player versions. 9,0,115,0
var majorVersion:Number = parseInt(versionArray[0]);
var majorRevision:Number = parseInt(versionArray[1]);
var minorVersion:Number = parseInt(versionArray[2]);
var minorRevision:Number = parseInt(versionArray[3]);
vers.text = flashPlayerVersion;
feedback.text = "Operating System: "+osType + "\n" +
"Major Version: "+majorVersion + "\n" +
"Major Revision: "+majorRevision + "\n" +
"Minor Version: "+minorVersion + "\n" +
"Minor Revision: "+minorRevision;
trace("Operating System: "+osType);
trace("Major Version: "+majorVersion);
trace("Major Revision: "+majorRevision);
trace("Minor Version: "+minorVersion);
trace("Minor Revision: "+minorRevision);
trace("--other capabilities--");
trace("avHardwareDisable: " + Capabilities.avHardwareDisable);
trace("hasAccessibility: " + Capabilities.hasAccessibility);
trace("hasAudio: " + Capabilities.hasAudio);
trace("hasAudioEncoder: " + Capabilities.hasAudioEncoder);
trace("hasEmbeddedVideo: " + Capabilities.hasEmbeddedVideo);
trace("hasMP3: " + Capabilities.hasMP3);
trace("hasPrinting: " + Capabilities.hasPrinting);
trace("hasScreenBroadcast: " + Capabilities.hasScreenBroadcast);
trace("hasScreenPlayback: " + Capabilities.hasScreenPlayback);
trace("hasStreamingAudio: " + Capabilities.hasStreamingAudio);
trace("hasVideoEncoder: " + Capabilities.hasVideoEncoder);
trace("isDebugger: " + Capabilities.isDebugger);
trace("language: " + Capabilities.language);
trace("localFileReadDisable: " + Capabilities.localFileReadDisable);
trace("manufacturer: " + Capabilities.manufacturer);
trace("os: " + Capabilities.os);
trace("pixelAspectRatio: " + Capabilities.pixelAspectRatio);
trace("playerType: " + Capabilities.playerType);
trace("screenColor: " + Capabilities.screenColor);
trace("screenDPI: " + Capabilities.screenDPI);
trace("screenResolutionX: " + Capabilities.screenResolutionX);
trace("screenResolutionY: " + Capabilities.screenResolutionY);
trace("serverString: " + Capabilities.serverString); |
Download
Here’s the source fla file: flash version detection actionscript method (as3)

Author: Evan Mullins | Filed under: tutorial
Tags: actionscript, as3, download, experiment, flash, open source, tutorial
Overview
Integrating the clipboard of the operating system with your flash projects is sometimes essential. It’s a very simple and boils down to one basic method… System.setClipboard(). I’ve found a couple other things help the user experience though, such as selecting the text that gets copied and giving the user some sort of feedback to let them know that the text was successfully copied. Here’s a simple way to do it. Have any suggestions to make it better?
I’ve included an as2 version as well as as3. I’ve promised myself to migrate to as3, so I’m not coding anything in 2 that I don’t do in 3 also. This was to discourage me from coding in as2 and to encourage me to code as3, but also let me learn by doing it in both to see the actual differences if I was stuck doing a project in as2. I figured this could help others see the differences between the two versions of actionscript a bit easier and make their own migration as well!
Steps
- copy to OS clipboard = System.setClipboard(“Text to COPY”) of System.setClipboard(textBoxToCopy.text)
- set selection to text that is copied
- give user feedback
Examples and Source
AS2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| textBox.textBox.text = "Click this text box to copy the text or click the COPY button below. You will see feedback to the user and this text copied to your clipboard!\n\n"+
'copyButton.onRelease = textBox.onPress = function(){\n\tSelection.setFocus("textBox");\n\tSelection.setSelection(0, textBox.text.length);\n\tSystem.setClipboard(textBox.text);\n\ttrace("copied: "+textBox.text);\n\tfeedback("Text Copied!");\n}';
copyButton.onRelease = textBox.onPress = function(){
Selection.setFocus("textBox.textBox");
Selection.setSelection(0, textBox.textBox.text.length);
System.setClipboard(textBox.textBox.text);
trace("copied: "+textBox.textBox.text);
textFeedback("Text Copied!");
}
function textFeedback(theFeedback:String){
feedback.text = theFeedback;
setTimeout(function(){feedback.text="";}, 1200);
} |
AS3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| textBox.text = "Click this text box to copy the text or click the COPY button below. You will see feedback to the user and this text copied to your clipboard!\n\n"+
'function copyText(e:MouseEvent):void{\n\ttextBox.setSelection(0, textBox.text.length)\n\tSystem.setClipboard(textBox.text);\n\ttrace("copied: "+textBox.text);\n\ttextFeedback("Text Copied!");\n}';
//set it so the textBox selection will show even when textBox has no focus
textBox.alwaysShowSelection = true;
textBox.addEventListener(MouseEvent.CLICK, copyText);
copyButton.addEventListener(MouseEvent.CLICK, copyText);
function copyText(e:MouseEvent):void{
textBox.setSelection(0, textBox.text.length)
System.setClipboard(textBox.text);
trace("copied: "+textBox.text);
textFeedback("Text Copied!");
}
function textFeedback(theFeedback:String):void {
feedback.text = theFeedback;
setTimeout(function(){feedback.text="";}, 1200);
} |
Download
Source files: clipboard_as3.fla clipboard_as2+as3.zip

Author: Evan Mullins | Filed under: tutorial
Tags: actionscript, AIR, as2, as3, download, experiment, flash, flex, interactive, open source, tutorial