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
985
posted 9 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
1406
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
1073
posted 10 years ago by TheRabbitFlash
Allows for EXIT function on mobile device via mobile device BACK key button.
0
1108
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
1106
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
987
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
1094
posted 11 years ago by jquery404
Credit for this goes to Adobe, Ric Ewing, Kevin Williams, Aden Forshaw and Sidney de Koning.
0
1894
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
990
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
814
posted 12 years ago by fenixkim
Removes duplicating elements from Array, containing only objects of Point class
0
891
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
1429
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
1219
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
1044
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
1161
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
1096
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
1051
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
1410
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
992
posted 12 years ago by vamapaull
simple as3 class that help you to avoid repeat add MouseEvent each time
0
1007
posted 12 years ago by mgraph
Retrieve remote image from an URL and store it locally.
Use this class for managing offline mode.
2
1452
posted 12 years ago by spawnrider
An easy way to detect shakes on mobile devices with equipped accelerometer.
0
1082
posted 12 years ago by vamapaull