Getting code snippets from blogs is one of my favorite ways to get cool tricks, so much faster than going over to SVN etc. Actionscript3 is pretty similar to many languages so most of these wordpress plugins work. However in testing a few, while some make it pretty, not all make it easy for others to use the code without having to jump through hoops.

I've tried several over the years.

Getting code into the blog worked fine, getting code out was another story. In particular I had issues with quotes getting converted and linenumbers. Rather than dig and fix it, switched over to another popular one named "Wp-Syntax", that like the one from Dean also uses the GeShi for the syntax highlighting.  Since they all share the same basic syntax it was easy to switch over, each code block is wrapped in a pre tag like this, with code in between

<pre lang="actionscript3" line="1">
 YOUR CODE GOES HERE</pre>

Here's an example:

/*The following example outputs 100 random integers between 4 and 11 (inclusively):
* randRange(4, 11), works for positive and negative,
*/
public static function randomInRange(min : Number, max : Number) : Number {
	var randomNum : Number = Math.floor(Math.random() * (max - min + 1)) + min;
	return randomNum;
}

Update:

Here's a new one recommended syntaxhighlighter that uses an alternate syntax:
http://wordpress.org/extend/plugins/syntaxhighlighter/installation/

[ as3 ] YOUR CODE GOES HERE[/ as3 ]

Example:

/*The following example outputs 100 random integers between 4 and 11 (inclusively):
* randRange(4, 11), works for positive and negative,
*/
public static function randomInRange(min : Number, max : Number) : Number {
var randomNum : Number = Math.floor(Math.random() * (max - min + 1)) + min;
return randomNum;
}

{ 2 comments }

http://shu-player.com/

{ 0 comments }

Took The CS4 Plunge: Only a few days left to save 20% on Adobe Products

May 29, 2009

Spring time heading into the summer is always expensive.   First the Federal Tax + IRA bite, and the yearly renewal of my webhosting and many utilities love bite. Today was the Adobe big bite, upgrading from CS3 to CS4.   These all adds up quickly.
I want to start doing more  web video, for years [...]

Read the full article →

Save 20% off of Adobe products until May 31st and World Class Actionscript Classes in LA

May 19, 2009

2 Quick things:

If you want to save 20% of all the latest Adobe products line, you’ve got 10 days left.
My friend R Blank, is teaching two relatively inexpensive classes on Essential Actionscript. It’s forwarded.

Get 20% off ANY Adobe product in their store, but only 10 days left…
I’ve been wanting to play with the Flash 3D, [...]

Read the full article →

Open Source Alternative to Adobe AIR

May 16, 2009

Like AIR but free + open source, and easy to extend.
Key Benefits:
- Use web technologies for desktop apps.
-Blur the edges between desktop and web, and online and offline.
My crystal ball, this is just one of many on the horizon.. essentially this is a unification attempt to allow web powered apps to span the huge device [...]

Read the full article →

Open Source Alternative to Adobe AIR

May 16, 2009

Like AIR but free + open source, and easy to extend.
Key Benefits:
- Use web technologies for desktop apps.
-Blur the edges between desktop and web, and online and offline.
My crystal ball, this is just one of many on the horizon.. essentially this is a unification attempt to allow web powered apps to span the huge device [...]

Read the full article →

Links: Augmented Reality in Flash and where it may go.

May 13, 2009

Just discovered the FLAR toolkit, very cool!  here are a few links
Beautiful:
http://ge.ecomagination.com/smartgrid/#/augmented_reality
Funny:
http://www.trick7.com/blog/2008/05/17-005233.php
Where it’s going? on a walk with you.
http://www.youtube.com/watch?v=Y9HMn6bd-v8
or driving at work.
http://www.bmw.co.uk/bmwuk/augmented_reality/homepage?bcsource=vanity

Read the full article →

You using Twitter for Flash / Actionscript?

April 30, 2009

Let me know I’m curious to what people talk about before actually getting a twitter account?
Update Drew pointed out these most excellent flashers, most I already know by name.   I’ve linked to them and gotten the stats, fascinating to see the size of the community!  Ashton Kusher just broke the 1Million follower so we [...]

Read the full article →

Shout out to the Thesis Theme Team

April 30, 2009

The blog is styling with the Thesis theme, so now you can…actually see hyperlinks - for some reason the previous design decided to make them invisible…brilliant eh, did I mention I love useability? just wanted to make sure you were REALLY paying attention .  Now the intense categorization system I have created is actually visible, [...]

Read the full article →

Adobe Flash secures set-top deal

April 29, 2009

Great I can finally get an excuse to get a TV…as a ah, development tool.  Strange they don’t mention which version of flash they are going to use.
http://news.bbc.co.uk/2/hi/technology/8008070.stm
Except Sony and Samsung… damn, they are one the ones that make the LCD TV’s

Read the full article →