Welcome To Snipplr
Everyone's Recent ActionScript 3 Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This code shows how not only to create a text file onto the local computer desktop, but also how to post the contents of a 'text box' object into the file.
0
971
posted 8 years ago by SinVerguenzaGames
This script allow you copy to the clipboard current layer properties in format:
&selectionBounds.x = &layerx; &selectionBounds.y = &layery; // &selectionBounds.width = &layerwidth; // &selectionBounds.height = &layerheight;
0
1388
posted 10 years ago by TheRabbitFlash
This script allow you copy to the clipboard current layer properties in format:
&layer_name.x = &layer_x;
&layer_name.y = &layer_y;
// &layer_name.width = &layer_width;
// &layer_name.height = &layer_height;
0
1053
posted 10 years ago by TheRabbitFlash
Allows for EXIT function on mobile device via mobile device BACK key button.
0
1088
posted 10 years ago by RiveraEraGames
A simple utility class that will help you convert a color value (from numbers) to hexadecimal color value.
0
1095
posted 11 years ago by vamapaull
Just a simple example script for populating a bunch of MapMarker objects on a Map using the distriqt NativeMaps ANE
0
965
posted 11 years ago by koriner
A complete example of how we can create a Preloader in actionscript3 to load an external .swf file.
STRUCTURE
------------------
Source Swf
|_ Main.fla
|_ Main.as
|_ Main.swf
Preloader Swf
|_
0
1084
posted 11 years ago by jquery404
Credit for this goes to Adobe, Ric Ewing, Kevin Williams, Aden Forshaw and Sidney de Koning.
0
1862
posted 12 years ago by adrianparr
This function returns the trimmed bounding box of a bitmap which contains all non-transparent pixel which color values are higher than the specified treshold (default 0xFF333333 in ARGB notation).
0
970
posted 12 years ago by tinytiger
Algunas veces se quiere comprobar si un numero esta entre un rango de otro número menor y otro mayor.
0
799
posted 12 years ago by fenixkim
Removes duplicating elements from Array, containing only objects of Point class
0
873
posted 12 years ago by romech
Easily breaks a string into an array of words.
*If your string has special characters such as latin, add those characters to the r var. Just like var r:RegExp = /[^\wçà áâãèéêìÃîòóôõùúûüÀÃÇÂÃÈÉÊÌÃÎÒÓÔÕÙÚÛÜ¡]+/...
0
1407
posted 12 years ago by izaiasdotcom
I’m sharing with you a little utility that I find myself using a lot lately. This utility is a value convertor that you can use in those times when you need to make a volume slider or something similar where you’ll need to change a value and a va...
0
1196
posted 12 years ago by vamapaull
Recently I needed to capture a JSON feed of the top artists from Last.fm. The script makes a request for a JSON response which I later treat as a dictionary object. You'll probably need to sign up for an API Key before using this script
0
1033
posted 12 years ago by chrisaiv
Hi;
Sometimes you need to "trim" textifield for specific height... This solves just this, perfect for news, news-readers, rss etc
1
1142
posted 12 years ago by burnandbass
If you want to tween an object relatively, but the new value changes and needs to be a variable, just cast it as a string.
0
1077
posted 12 years ago by yannxou
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
1037
posted 12 years ago by adrianparr
ActionScript 3
AS3 Convert TextField LineBreaks to CRLF for Display as Plain Text (Notepad) on Windows
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
1389
posted 12 years ago by adrianparr
It's very useful if you build a FLV player for example, and want to convert the time into minutes:seconds (example: 6:13)
//apply it to your project like this (and don't forget to import the class):
time.text = TimeUtil.getTimecode(timeValue);
0
979
posted 12 years ago by vamapaull
simple as3 class that help you to avoid repeat add MouseEvent each time
0
991
posted 12 years ago by mgraph
Retrieve remote image from an URL and store it locally.
Use this class for managing offline mode.
2
1432
posted 12 years ago by spawnrider
An easy way to detect shakes on mobile devices with equipped accelerometer.
0
1070
posted 12 years ago by vamapaull