Flash notes by Edzis

ActionScript programmer / Flash developer Edgars Simsons on professional stuff

Archive for the ‘flash’ Category

Get your questions answered by Flashers on Aardvark

with 2 comments

Start using Aardvark and join the Flashers group

Start using Aardvark and join the Flashers group

I know there are sometimes problems and questions you get stuck with and there is nobody around to help. Ask your flash questions directly to your fellow Flashers on Aardvark or try any other type of questions!

Once you join, you can send Aardvark any question (via IM, email, or web) and Aardvark will find someone to answer it. Aardvark looks for someone who is online and wants to answer, so you get a response in a few minutes.

You can help other people with their questions too. Just tell Aardvark what you want to answer about – actionscript, web development, baseball, tee, spain or anything else – and Aardvark will contact you when it thinks you might be able to answer.

I have been using Aardvark for 5 months now and the community has helped me frequently in flash development and other cases with FFMPEG preset path, batch files, travel recommendations, 72dpi png photoshop bug, recruitment, NTFS in OSX etc.

Sign up here and enjoy aardvarking!

Written by edzis

September 11th, 2009 at 3:47 pm

Posted in flash

Tagged with , , , ,

Google Analytics for Myspace

with 46 comments

myspaceGA

Tracking without JavaScript using gaforflash

I offer you a ready-made tracker for Google Analytics (GA) that can be used in Myspace or any other place where you are not allowed to use JavaScript. For those who speak geek this is nothing new, this is mainly dedicated to non-users of flash.

As I was customizing the myspace profile for by friends’ punk rock band Cacophonics I realized the need to track users. As Google Analytics (my tracking system of choice) uses JavaScript but Myspace does not support that I set up a small tracker using gaforflash.

Once you have a GA account and have uploaded somewhere the myspaceGA.swf file you only need to copy the following code in your About section in Myspace and modyfie the highlighted values to represent your GA account number, url to locate the myspaceGA.swf and the color of the 1 by 1 pixel area the swf file will take to match the background.

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" height="1" width="1">
<param name="movie" value="http://www.edzis.com/random/myspaceGA.swf?account=UA-XXXXXXXX-Y" />
<param name="bgcolor" value="080808" />
<embed type="application/x-shockwave-flash" src="http://www.edzis.com/random/myspaceGA.swf?account=UA-XXXXXXXX-Y" height="1" width="1" bgcolor="080808" />
</object>

In case you do not have your own hosting server where to keep your own copy of myspaceGA.swf you can risk to use the current url for it. However but I do not guarantee that the file will always be there and available to you. In case of any changes I will notify everyone who posts a comment on this blog.

And just in case you want to know how this was done – here is the code you can use:

package {
	import com.google.analytics.AnalyticsTracker;
	import com.google.analytics.GATracker;
	import flash.display.Sprite;
	import flash.events.Event;

	/**
	 * ...
	 * @author Edgars Simsons, edzis on edzis (dot) com, www.edzis.com
	 */
	public class Main extends Sprite {
		private var tracker	:AnalyticsTracker;

		public function Main():void {
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}

		private function init(e:Event = null):void {
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point

			var account:String = loaderInfo.parameters.account;

			if (account == null || account == "") return;
			tracker = new GATracker(this, account);
			tracker.trackPageview();
		}
	}
}

Written by edzis

August 25th, 2009 at 9:27 am

Posted in flash

Tagged with ,