Profile

Achievement

first submission:submitting first snipplet

adrianparr's Recent Snippets



« Prev 1 2 3 4
This JavaScript gets you the percentage position of the browser's scrollbar.
1 3004 posted 13 years ago by adrianparr
Font Squirrel is a great place to convert your fonts to the different formats required. http://www.fontsquirrel.com/fontface/generator
0 1902 posted 13 years ago by adrianparr
Credit for this goes to Adobe, Ric Ewing, Kevin Williams, Aden Forshaw and Sidney de Koning.
0 5450 posted 13 years ago by adrianparr
Credit goes to Bruno Imbrizi.
0 2378 posted 14 years ago by adrianparr
Credit goes to Bruno Imbrizi.
0 4805 posted 14 years ago by adrianparr
Basic setup code for jQuery, linking to Google APIs for the jQuery library.
2 2357 posted 14 years ago by adrianparr
TimedText (TT) XML captions files can have namespaces that cause problems when parsing them in AS3. To get around this you can use this code to remove the namespace from the root XML node using Regex. This example uses
0 4214 posted 14 years ago by adrianparr
Linebreaks differ between Flash TextField and a plain text file like Notepad. In this example we convert the html linebreaks in Flash to \r\n
0 4615 posted 14 years ago by adrianparr
This code gets the current caretIndex in the textfield and then inserts the specified string at that point. The caretIndex position is then updated using setSelection, ready for the next insertion. This was developed to be used with an on-screen keyb...
0 2992 posted 14 years ago by adrianparr
0 2916 posted 14 years ago by adrianparr
Examples of different ways to truncate/round a decimal number.
0 2473 posted 15 years ago by adrianparr
These two classes demonstrate how to create an external font SWF that contains embedded fonts, and how to then load that external font SWF and access and use the fonts inside it.
0 2833 posted 15 years ago by adrianparr
This font SWF was created using the handy tool FontSwffer (http://blog.madebypi.co.uk/2011/02/28/fontswffer-1-1/)
0 2018 posted 15 years ago by adrianparr
If you don't deal with namespaces in XML correctly they can break your parsing in AS3. One way of getting around this is to remove the namespace from the XML a using regular expression.
0 2280 posted 15 years ago by adrianparr
I was working on a project where the timestamp string I was getting from the backend developer was pretty dirty in the way it was formatted. For example, it looked like "/Date(1310127448000+0100)/". I needed to get a nicely formatted time from it in...
0 2398 posted 15 years ago by adrianparr
For this to work you need the as3corelib classes from here ... https://github.com/mikechambers/as3corelib
0 5518 posted 15 years ago by adrianparr
This example expects there to be a dynamic textfield on the stage with the instance name of 'myTextFieldOnStage'. Remember to embed the fonts (Numerals and Colon).
0 2673 posted 15 years ago by adrianparr
All credit for this class goes to Ben Kanizay (http://bk4d.com)
0 1883 posted 15 years ago by adrianparr
0 1862 posted 15 years ago by adrianparr
All credit for this goes to Rob at calypso88.
0 2128 posted 15 years ago by adrianparr
Full credit for this goes to Deva Raj (@nsdevaraj). This is also a good function for doing a similar thing, http://snipplr.com/view/27954/as3-convert-a-number-to-a-string/
2 2779 posted 15 years ago by adrianparr
Full credit for this class goes to Deva Raj (@nsdevaraj). Many thanks.
1 2417 posted 15 years ago by adrianparr
« Prev 1 2 3 4