<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 15:57:38 +0000</lastBuildDate>
    <item>
      <title>(ActionScript 3) Strip XML Namespaces - Activetuts</title>
      <link>https://snipplr.com/view/47069/strip-xml-namespaces</link>
      <description>&lt;p&gt;&lt;p&gt;Loading XML, specifically from 3rd party sources can sometimes prove problematic when the XML makes use of namespaces. This snippet will take an XML object and strip all namespace declarations and prefixes. This snippet leaves the input XML unchanged and returns a new XML object.&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jan 2011 23:35:51 UTC</pubDate>
      <guid>https://snipplr.com/view/47069/strip-xml-namespaces</guid>
    </item>
    <item>
      <title>(ActionScript 3) Strip HTML Markup - Activetuts</title>
      <link>https://snipplr.com/view/47068/strip-html-markup</link>
      <description>&lt;p&gt;&lt;p&gt;If there is ever a time when you load text from an external source containing unwanted HTML markup use the following function. This uses a regular expression to strip all HTML tags from the input string. The string "&amp;lt;strong&amp;gt;Click &amp;lt;a href='http://example.com'&amp;gt;here&amp;lt;/a&amp;gt; to find out more&amp;lt;/strong&amp;gt;" would simply be converted to "Click here to find out more.". This returns a new string, leaving the input string unchanged.&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jan 2011 23:34:55 UTC</pubDate>
      <guid>https://snipplr.com/view/47068/strip-html-markup</guid>
    </item>
    <item>
      <title>(ActionScript 3) Email Validation - Activetuts</title>
      <link>https://snipplr.com/view/47064/email-validation</link>
      <description>&lt;p&gt;&lt;p&gt;When accepting input from a user through a form it is often necessary to validate data before allowing it to be sent to a back-end script. This is most true for email addresses as they are often the only point of contact between yourself and the user and are important to get right. The below function makes use of a regular expression to confirm the email is of a valid format.&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jan 2011 23:29:27 UTC</pubDate>
      <guid>https://snipplr.com/view/47064/email-validation</guid>
    </item>
    <item>
      <title>(ActionScript 3) Converting Between Radians and Degrees - Activetuts</title>
      <link>https://snipplr.com/view/47062/converting-between-radians-and-degrees</link>
      <description>&lt;p&gt;&lt;p&gt;When dealing with equations involving angles you will often be dealing in radians and not degrees. Display objects in Flash use degrees when dealing with their rotation property so we need a way to convert between the two. These helper function are useful for accomplishing just that; one for converting radians to degrees and the other degrees to radians.&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jan 2011 23:28:17 UTC</pubDate>
      <guid>https://snipplr.com/view/47062/converting-between-radians-and-degrees</guid>
    </item>
    <item>
      <title>(ActionScript 3) Get URL of the Page Where SWF is Embedded: Appendix - Activetuts</title>
      <link>https://snipplr.com/view/47056/get-url-of-the-page-where-swf-is-embedded-appendix</link>
      <description>&lt;p&gt;&lt;p&gt;Alternatively, to access the URL where the SWF resides we can access the url property of the LoaderInfo object belonging to our SWF's root. Note this is the location of the SWF file and NOT the HTML page it's embedded in. It's important to make this distinction as both the SWF and HTML could reside on different domains.&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jan 2011 22:57:41 UTC</pubDate>
      <guid>https://snipplr.com/view/47056/get-url-of-the-page-where-swf-is-embedded-appendix</guid>
    </item>
    <item>
      <title>(ActionScript 3) Get URL of the Page Where SWF is Embedded - Activetuts</title>
      <link>https://snipplr.com/view/47055/get-url-of-the-page-where-swf-is-embedded</link>
      <description>&lt;p&gt;&lt;p&gt;To get the complete URL as it appears in your web browser's address bar we use AS3's &lt;a href="http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/flash/external/ExternalInterface.html"&gt;ExternalInterface&lt;/a&gt; class. Without going into too much detail, know that in this example we use ExternalInterface to access the DOM (Document Object Model) of the HTML page which contains our Flash. A downside of ExternalInterface is that the SWF must be embedded in the HTML page with the "allowscriptaccess" parameter set to either "sameDomain" or "always". This is OK when you control the embedding of a SWF but unfortunately cannot be relied upon if the SWF may be run on third party websites. Donâ€™t forget to add import flash.external.ExternalInterface at the top of your document.&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jan 2011 22:56:11 UTC</pubDate>
      <guid>https://snipplr.com/view/47055/get-url-of-the-page-where-swf-is-embedded</guid>
    </item>
    <item>
      <title>(ActionScript 3) Position Display Objects in a Grid Layout - Activetuts</title>
      <link>https://snipplr.com/view/47053/position-display-objects-in-a-grid-layout</link>
      <description>&lt;p&gt;&lt;p&gt;This is a short way of positioning display objects in a grid layout. It makes use of the modulo operator (%) to position each display object along the x axis and the floor method of the Math class for the y position.&lt;/p&gt;&#13;
&#13;
&lt;p&gt;This example creates 20 instances of a custom display object called MyDisplayObject positioning each instance in a grid 5 columns wide. As you may have guessed, the two 5's in the snippet represent the number of columns in the grid.&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jan 2011 22:52:51 UTC</pubDate>
      <guid>https://snipplr.com/view/47053/position-display-objects-in-a-grid-layout</guid>
    </item>
    <item>
      <title>(ActionScript 3) Randomize an Array - Activetuts</title>
      <link>https://snipplr.com/view/47052/randomize-an-array</link>
      <description>&lt;p&gt;&lt;p&gt;To randomize an array we loop over the length of the array, removing an object chosen at random and then adding it back onto the Array's end position. Think of this as having a deck of cards where you pick a card at random from the deck and move it to the top of the stack repeated for the total number of cards in the deck. It's important to note that the splice method returns an Array containing the removed object and not the object itself hence adding the [0] after the splice call to reference the contained object.&lt;/p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jan 2011 22:48:04 UTC</pubDate>
      <guid>https://snipplr.com/view/47052/randomize-an-array</guid>
    </item>
    <item>
      <title>(ActionScript 3) Validate Calendar Date with RegExp - Activetuts</title>
      <link>https://snipplr.com/view/46469/validate-calendar-date-with-regexp</link>
      <description>&lt;p&gt;From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)&lt;/p&gt;</description>
      <pubDate>Tue, 04 Jan 2011 12:02:09 UTC</pubDate>
      <guid>https://snipplr.com/view/46469/validate-calendar-date-with-regexp</guid>
    </item>
    <item>
      <title>(ActionScript 3) Validate Card Number with RegExp - Activetuts</title>
      <link>https://snipplr.com/view/46468/validate-card-number-with-regexp</link>
      <description>&lt;p&gt;From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)&lt;/p&gt;</description>
      <pubDate>Tue, 04 Jan 2011 12:01:58 UTC</pubDate>
      <guid>https://snipplr.com/view/46468/validate-card-number-with-regexp</guid>
    </item>
    <item>
      <title>(ActionScript 3) Validate IBAN with RegExp - Activetuts</title>
      <link>https://snipplr.com/view/46467/validate-iban-with-regexp</link>
      <description>&lt;p&gt;From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)&lt;/p&gt;</description>
      <pubDate>Tue, 04 Jan 2011 11:59:14 UTC</pubDate>
      <guid>https://snipplr.com/view/46467/validate-iban-with-regexp</guid>
    </item>
    <item>
      <title>(ActionScript 3) Validate ISBN with RegExp - Activetuts</title>
      <link>https://snipplr.com/view/46466/validate-isbn-with-regexp</link>
      <description>&lt;p&gt;From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)&lt;/p&gt;</description>
      <pubDate>Tue, 04 Jan 2011 11:57:39 UTC</pubDate>
      <guid>https://snipplr.com/view/46466/validate-isbn-with-regexp</guid>
    </item>
    <item>
      <title>(ActionScript 3) Validate a Phone Number with RegExp - Activetuts</title>
      <link>https://snipplr.com/view/46465/validate-a-phone-number-with-regexp</link>
      <description>&lt;p&gt;From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)&lt;/p&gt;</description>
      <pubDate>Tue, 04 Jan 2011 11:56:46 UTC</pubDate>
      <guid>https://snipplr.com/view/46465/validate-a-phone-number-with-regexp</guid>
    </item>
    <item>
      <title>(ActionScript 3) Validate a Web Address with RegExp - Activetuts</title>
      <link>https://snipplr.com/view/46464/validate-a-web-address-with-regexp</link>
      <description>&lt;p&gt;From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)&lt;/p&gt;</description>
      <pubDate>Tue, 04 Jan 2011 11:56:03 UTC</pubDate>
      <guid>https://snipplr.com/view/46464/validate-a-web-address-with-regexp</guid>
    </item>
    <item>
      <title>(ActionScript 3) Validate Email Address with RegExp - Activetuts</title>
      <link>https://snipplr.com/view/46462/validate-email-address-with-regexp</link>
      <description>&lt;p&gt;From the tutorial, Validating Various Input Data in Flash (http://active.tutsplus.com/tutorials/actionscript/validating-various-input-data-in-flash/)&lt;/p&gt;</description>
      <pubDate>Tue, 04 Jan 2011 11:51:50 UTC</pubDate>
      <guid>https://snipplr.com/view/46462/validate-email-address-with-regexp</guid>
    </item>
    <item>
      <title>(ActionScript 3) Data Validation: checkDate Function - Activetuts</title>
      <link>https://snipplr.com/view/44426/data-validation-checkdate-function</link>
      <description>&lt;p&gt;Today, almost everything on the web is based on user input. A contact form, a user registration form, a search box and so on. As a developer you canâ€™t just rely on the user to write everything as itâ€™s supposed to be. To be sure you always get the correct data from your users you will need to validate the input. (By Enabled)&lt;/p&gt;</description>
      <pubDate>Fri, 19 Nov 2010 19:24:03 UTC</pubDate>
      <guid>https://snipplr.com/view/44426/data-validation-checkdate-function</guid>
    </item>
    <item>
      <title>(ActionScript 3) Remove an Object, iPhone App Style - Activetuts</title>
      <link>https://snipplr.com/view/44425/remove-an-object-iphone-app-style</link>
      <description>&lt;p&gt;How to create a delete effect inspired by the iPhone iOS interface. By Carlos Yanez.&lt;/p&gt;</description>
      <pubDate>Fri, 19 Nov 2010 19:18:31 UTC</pubDate>
      <guid>https://snipplr.com/view/44425/remove-an-object-iphone-app-style</guid>
    </item>
    <item>
      <title>(ActionScript 3) Basic empty Document Class - Activetuts</title>
      <link>https://snipplr.com/view/41568/basic-empty-document-class</link>
      <description>&lt;p&gt;Using class files sets your code free. And itâ€™s really no harder than coding on the timeline; it just involves a little more setup.&lt;/p&gt;</description>
      <pubDate>Tue, 05 Oct 2010 19:19:41 UTC</pubDate>
      <guid>https://snipplr.com/view/41568/basic-empty-document-class</guid>
    </item>
  </channel>
</rss>
