Welcome To Snipplr


Everyone's Recent ActionScript 3 Snippets



1 2 3 4 5 6 7 ... 19
Replace "-" with anything you want to. Useful for amending URLs.
0 226 posted 9 years ago by gromitski
Simple usage: var xmlLoader:LoadXMLUtil = new LoadXMLUtil("path_to_xml.xml"); xmlLoader.addEventListener(Event.COMPLETE, onLoaderComplete); private function onLoaderComplete(event:Event):void{ trace("Loaded XML: "); trace(xmlLoader.xml...
2 89 posted 9 years ago by burnandbass
This function will keep an image that is larger than the stage dragging within the stage view, stopping at any edge of the image.
0 88 posted 9 years ago by CammoKing
Quite trivial but can be needed sometimes. At least I know where to look when i'll forget it
1 107 posted 9 years ago by gandreini
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 217 posted 9 years ago by adrianparr
Full credit for this class goes to Deva Raj (@nsdevaraj). Many thanks.
1 172 posted 9 years ago by adrianparr
Adobe AIR offers an ability to save small snippets of data locally (eg. users' settings). Works also on Android. EncryptedLocalStore is stored encrypted using AES-CBC 128-bit method. It is not recommended to store more than 10 MB of data because of r...
0 99 posted 9 years ago by MaRmAR
Full credit for this code goes to Scratchbrain (http://www.scratchbrain.net/blog/ver2/)
0 125 posted 9 years ago by adrianparr
Very simple and basic TextHandle class, extends TextField... You can extend to fit your needs. Basic usage: var a:TextHandle = new TextHandle("some text"); addChild(a) Optional params: _size: uint ( default 22 ) - size of the textfiled...
1 133 posted 9 years ago by burnandbass
Give your for-loops a label so you can break them individually
1 101 posted 9 years ago by JaaQ
This function returns a new instance of the class it receives.
2 118 posted 9 years ago by JaaQ
Listen to the Navigation keys and save their values in local Booleans
2 103 posted 9 years ago by JaaQ
- Get the charCode in a String - Navigate to an external URL
0 100 posted 9 years ago by JaaQ
1 2 3 4 5 6 7 ... 19