Much of the Flash community has been less than impressed with the changes made to the help and documentation functionality of Flash CS4. Workarounds like offline only mode and third party applications have started popping up online since this debacle began. I have tried almost every solution I have come across but I always end up feeling like I’m missing something. Thankfully two members of the Flash community, Jeroen Beckers and Michiel Vancoillie, just released their AIR application called Doc?
Archive for the 'ActionScript 3.0' Category
I frequently visit the labs.bigspaceship.com blog and back in November they posted a great idea for a link dump. These are great because they often lead to things you might never have found otherwise. One link in particular leads to a .pdf download of some AS3 tips called, “The Nooks and Crannies of Actionscript 3,” written by Branden Hall over at Automata Studios. Branden gives examples covering just about the whole AS3 api. I have a feeling just about anyone working in AS3 could get something out of this.
Check it out over at labs.bigspaceship.com or visit the Automata Studios post here.
I received an email from Google this evening announcing that my Analytics Account is part of a limited release currently only available to select profiles. This means that I now have access to a set of features within Google Analytics called “Event Tracking” that do pretty much what they sound like they would, track events.
This is really cool, because for the past few years I have been basically building a fake directory structure that mimicked page views. There wasn’t anything necessarily wrong with this approach, but it was nowhere as ideal as event tracking.
Event Tracking allows you to track interactions with Web 2.0 style content such as Flash, AJAX, Silverlight, social networking apps, etc. We recently made tracking Adobe Flash even easier with the release of a new Flash Tracking client library. It allows for much simpler tracking of Flash content with drag and drop functionality and an open source framework.
To use Event Tracking, you will need to upgrade your site to use the new ga.js javascript. Detailed instructions on how to set up Event Tracking on your site are available on our CodeSite.
To find your ga.js code snippet, edit the settings for your profile and click the “Check Status” link on the upper right corner of the page. You can now track interactions beyond just pageviews.
Thank you Google, this is a most needed addition to your Analytics.
I recently needed to shuffle the contents of an array and end up with a randomly sorted or shuffled result. After doing some research and looking at examples of others I noticed that there are several ways to achieve the same goal, but there are clear performance advantages to some methods. Below is an example based off of inspiration of others and what I developed as a test for a commercial project. This example is compatible with both AS2 and AS3.
var input:Array = ["item1", "item2", "item3", "item4", "item5"]; var output:Array = new Array(); function shuffle():Array { while(input.length > 0) { var n:Number = Math.floor(Math.random() * input.length); output.push(input[n]); input.splice(n, 1); } return output; } shuffle();
Download the .fla for fully-commented example.