Vixiom Axioms

January 7, 2008

Introducing ActionSnip

My new year’s resolution is to organize my ActionScript snippets, so I made a website to do just that actionsnip.com.

I know yes another snippet site, but none of the others highlight ActionScript properly. And because I don’t only collect snippets but blog posts about ActionScript as well there’s a feature called scraps which lets you save useful posts along side your snippets.

Other features include saving favorite snippets/scraps that others have posted, and a ’steal this code’ link which gives you highlighted code to embed in your blog just like the example below (here’s the original on ActionSnip)

Returns true if inputed email is valid.

function emailValid( email:String ):Boolean
{

    var emailRegExp:RegExp = /(A(s*)Z)|(A([^@s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})Z)/i;
    return emailRegExp.test(email);

}


Usage …

// returns true
trace(emailValid("user@domain.com"));
// returns false
trace(emailValid("user@domaincom"));

// returns false
trace(emailValid("user%domain.com"));



If you don’t like the Flex Builder styling you can overide it with your own styles. Currently it supports just ActionScript but I’m working on MXML and MXML/ActionScript.

Most of the bugs are squashed but if you see anything let me know (it seems to bug out with a snippet over 500 lines of code so please just snippets for now). Constructive (and even destructive) criticism is welcome.

Snip away!

Digg! submit Introducing ActionSnip to stumbleupon.com submit Introducing ActionSnip to del.icio.us submit Introducing ActionSnip to reddit.com Like this post? subscribe to the feed.

14 Comments »

  1. […] from the heavy hitters at Vixiom, comes the website ActionSnip which allows you to save your AS online: I know yes another snippet […]

    Pingback by ScribeLabs » ActionSnip — January 8, 2008 @ 1:42 am

  2. […] empezar el año con buenas noticias Alastair Dawson de Vixiom Axioms dice que estaba queriendo ordenar todo su código con el comienzo de año y creo está página […]

    Pingback by Akelarreweb » Blog Archive » ActionSnip : guardando tus scripts — January 8, 2008 @ 5:01 am

  3. :), Nice! yet another reason to visit Kreek’s website!
    Yoz, U’ve done any papervision? Can’t have an AS library without it: http://blog.papervision3d.org/
    ~ Si, que buena manera de eprender el año! con codigo organizado! Viva Kreekus!!

    Comment by Tomo — January 8, 2008 @ 12:37 pm

  4. Kreek, “Steal this code” gives me some html stuff, what’s that about?
    By the way, I just added two new snips, I hope they’re useful.

    Comment by Tomo — January 8, 2008 @ 2:22 pm

  5. Great idea! I have one request, RSS feeds to let us know when new snippets/scraps have been added. Otherwise I love it :)

    Comment by Paulo — January 8, 2008 @ 4:46 pm

  6. Tomo, yeah I wasn’t sure what to call it, it’s not copy the code of the snippet (which I think some people think it is), it’s copy the marked-up code with highlighting which you can then use on another blog or site.

    I saw your snippets, thanks for posting!

    Comment by Alastair — January 8, 2008 @ 4:46 pm

  7. Yeah, At first glance, it looks like a “Copy” shortcut. Maybe call it “Snip + CSS” or something like that… Hey, I like Paulo’s idea W/the RSS. I know you got to feed the pixels, but maybe move the big-ass banners to the right :P
    - How about adding a category list? Some of the stuff I posted is more or less AS2, not Flex, or MXML. Just a thought

    Comment by Tomo — January 8, 2008 @ 6:41 pm

  8. Hey Paulo, ask and you shall receive! http://www.actionsnip.com/feed :)

    Comment by Alastair — January 8, 2008 @ 6:54 pm

  9. Hey sorry to spam jer blog here… but how do I search for snips?…….Cool site duh, ….. I promise, I won’t spam more :P

    Comment by Tomo — January 8, 2008 @ 6:54 pm

  10. heh Tomo as a former colleague of FirstInternetMedia/Innuity/FirstMediaWorks/MediaSpan :P joo are always welcome here my friend…

    Search is coming soon, just want to get some snippets in the db first, the more popular ActionSnip is the more work I’ll put in!

    Comment by Alastair — January 8, 2008 @ 6:58 pm

  11. Love the site.

    What do we do with the Steal this code? Its not for TextMate right? And this is crazy but Flex does not offer the code snippets… ouch.

    Comment by Jonathan Spooner — January 9, 2008 @ 10:37 am

  12. Hey Jonathan thanks,

    Yeah ’steal this code’ has not been the best implemented (maybe named) idea, it’s to grab code that you can post on your blog all highlighted up.

    Comment by Alastair — January 9, 2008 @ 11:17 am

  13. Hey, thanks kreek, just in case u’re at it w/the search……an option to search the code as well would be pretty cool. Ho, by the way, the RSS feeds works great on my psp.

    Comment by Tomo — January 9, 2008 @ 2:25 pm

  14. Wee, loving the feed! Thanks Alastair :)

    Comment by Paulo — January 16, 2008 @ 6:24 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image

Powered by WordPress