Welcome To Snipplr
Everyone's Recent ActionScript 3 Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
I always forget which method does what. This is just as a quick reminder.
4
4004
posted 15 years ago by adrianparr
If the item cannot be found then the return value is NaN. This function only returns the index of the first occurence found, so it's not very good if you have multiple occurrences of the same value in the array.
0
3547
posted 15 years ago by adrianparr
In AS2 forward slashes got url-encoded to %2F when you escaped them. But in AS3 they get ignored and left as they are. In some situations I have found that this can cause problems. So you can do it manually using this regular expression.
0
1807
posted 15 years ago by adrianparr
You can replace the library item with whatever you want, or draw a shape in actionscript to use.
TweenMax is used in this snippet, get it here: http://www.greensock.com/tweenmax/ and thank Jack Doyle for being great by donating.
0
1473
posted 16 years ago by IsoJon
As of revision 11031 of the Flex 4 SDK compression is supported inline with the embed metadata tag.
0
1066
posted 16 years ago by aphex
Have fun with flash as 3.0. Don't forget to show me the result.
0
1068
posted 16 years ago by winlwin
I'm not sure whether I should be using == (Equality) or === (Strict equality) here. I haven't been able to create a situation where it makes much difference. If you know better, feel free to leave me a comment.
0
1945
posted 16 years ago by adrianparr
This is the file reference class ive been using for one of my projects
2
2439
posted 16 years ago by alvincrespo
Here is a template button class, ive been using for my projects. Cheers!
0
1784
posted 16 years ago by alvincrespo
Usage:
<code>
var newDimensions:Object = resize(800,600,320,200);
</code>
This can be adapted to pretty much any language...
1
1742
posted 16 years ago by kaptnkill
Allows easy usage of Fonts and TextField/TextFormat creation.
1
1373
posted 16 years ago by edwardhotchkiss
Based on the following references:
http://not-equal.blogspot.com/2006/08/upload-file-as3-php.html
http://www.thedanosphere.com/?p=76
I created a simple file manager class that I will be extending in the near future for an AIR App I...
0
1750
posted 16 years ago by alvincrespo
Need to download the ActionScript 3.0 library http://code.google.com/p/as3corelib/ and extract the "com" folder into the same folder as your .fla file.
1
1743
posted 16 years ago by eddequincey
This is a dynamic label generator for a project I'm working on. (Source files coming soon)
0
1363
posted 16 years ago by alvincrespo
The ByteArray class is part of the flash.utils package and supports the reading and writing of binary data. The FileReference class is part of the flash.net package and is used to upload and download files from a local computer to a server.
In t...
2
1803
posted 16 years ago by BoNzO
Grant Skinner's RegExr: Online Regular Expression Testing Tool is very handy for checking your regular expressions.
http://www.gskinner.com/RegExr/
0
2602
posted 16 years ago by adrianparr