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 3030 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 1917 posted 13 years ago by adrianparr
Credit for this goes to Adobe, Ric Ewing, Kevin Williams, Aden Forshaw and Sidney de Koning.
0 5474 posted 13 years ago by adrianparr
Credit goes to Bruno Imbrizi.
0 2398 posted 14 years ago by adrianparr
Credit goes to Bruno Imbrizi.
0 4820 posted 14 years ago by adrianparr
Basic setup code for jQuery, linking to Google APIs for the jQuery library.
2 2377 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 4234 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 4633 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 3012 posted 14 years ago by adrianparr
0 2941 posted 14 years ago by adrianparr
Examples of different ways to truncate/round a decimal number.
0 2492 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 2855 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 2034 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 2295 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 2416 posted 15 years ago by adrianparr
For this to work you need the as3corelib classes from here ... https://github.com/mikechambers/as3corelib
0 5548 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 2688 posted 15 years ago by adrianparr
All credit for this class goes to Ben Kanizay (http://bk4d.com)
0 1893 posted 15 years ago by adrianparr
0 1878 posted 15 years ago by adrianparr
All credit for this goes to Rob at calypso88.
0 2138 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 2800 posted 15 years ago by adrianparr
Full credit for this class goes to Deva Raj (@nsdevaraj). Many thanks.
1 2429 posted 15 years ago by adrianparr
« Prev 1 2 3 4