Actionscript

Code Snippet NameSort by Category CategorySort by Category Submitted BySort by Person   Date

Better Truncator

Actionscript 02/20/12
I was having trouble with my limit string snippet http://code.hyperspatial.com/143/shorten-string-in-php/

It
was not working well with long strings with no spaces, like urls. This php snippet will truncate a long url. So if you want to shorten a url for display use this. View Code

Tags

Autoload Class Class

Actionscript 07/08/11
This class will keep you out of trouble if you ever run into another script with the autoload function. Just make sure the file that contains the class has the same name as the class, so in this case = ClassName.php View Code

Tags ,

Auto Play Swf

Actionscript 04/13/11
Use this php/as2 combo to create a flash video that will auto play the first time you go to the site. A cookie will be stored that will prevent autoplay on subsequent visits. Set the cookie expiration to whatever you want.

The first snippet is for frame 1 of your .swf, it sends the movie to ... View Code

Tags

Save plugin options multisite 3.1

Actionscript 03/14/11
How to save plugin options with wordpress 3.1 multisite and buddypress?

Well i looked for a while to answer these two questions:
1) Why did my buddypress submenu dissappear when updating to wordpress 3.1 and buddypress 1.2.8
2) Why can't I save plugin options anymore, I just get a 404 error or a ... View Code

Tags , ,

Utf characters in text fields

Actionscript 03/06/11
Use an escape code to display utf-8 or special characters within your actionscript 3 and flash text areas and fields. This example adds a copyright symbol. View Code

Tags

Hyperlink Regex

Actionscript 02/27/11
This regex routine is written in actionscript 3, it allows you to convert text beginning with http:// to a hyperlink. View Code

Tags

Banned swear words

Actionscript 02/22/11
This is a php array of some banned words. If you know more add a comment to this post. View Code

Detect Carriage Returns

Actionscript 01/18/11
This is an actionscript technique for detecting carriage returns within a textarea component and replacing them with a br tag for use as html.

Basically you use this to convert the as3 text field enter keypress or return into whatever html tag you want. View Code

Tags

Style Combo Box

Actionscript 01/15/11
Use this to style the combo box text. Thank you to the original author of this code, I can never remember how to change the font of the actionscript 3 combo box component text either. View Code

Remove spaces

Actionscript 01/13/11
This is a regular expression to replace all spaces in a string with an underscore. View Code

Tags

Style Text Input Field

Actionscript 12/15/10
Use this to style a text input field, which is a component. It works a little different that styling a regular text field, but uses the same TextFormat class. View Code

Tags

Dynamic associative array key

Actionscript 12/13/10
Use this actionscript code to assign a value to an array key dynamically. This is also a great way to assign values typically set using dot syntax, where you can't use a variable after the dot. Ex: myObject.value - use myObject[value] View Code

Tags

Excerpt Length

Actionscript 10/13/10
Going into the wordpress core to edit files is not a good idea. I have noticed many developers changing the default wordpress excerpt length there. The default value is 55 words. You can easily change the length of the excerpt by using a filter. Enter the value as maximum words for the ... View Code

Tags

Stage Mouse Over/Out

Actionscript 09/02/10
Typical as3 mouse events like MOUSE_OVER, and MOUSE_OUT, don't work on the stage, use this function to simulate the mouse over and out effects for the stage. Replace the commented out code with whatever code you want to run when the mouse is over the stage. View Code

Tags

Crossdomain XML

Actionscript 08/14/10
Here is two crossdomain scripts for actionscript3.

The first snippet belongs in the root and the second belongs in the folder where the data is to be loaded. View Code

Tags

Get domain name

Actionscript 07/08/10
This uses php to get the current domain name. If you want to make this into a link, just concadnate "http:" before the server superglobal. View Code

Tags