Welcome To Snipplr


Everyone's Recent ActionScript Snippets



This code was adapted from a snippet I found somewhere awhile back... can't claim complete credit
1 925 posted 15 years ago by iloveitaly
basic structure of the actionscript function to listen for cuepoints embedded in a piece of FLV [flash video]. note: cuepoints need to have been embedded when the video was converted from its original format to FLV - prior to importing it into flash
1 1004 posted 15 years ago by stiobhart
this is a handy snippet to trace the info about any cuepoints actionscript encounters, embedded in a FLV [flash video]. these traces will display the name, type and time of the cuepoint - in a nicely formatted list
1 919 posted 15 years ago by stiobhart
actionscript3 version of the basic button action. in actionscript3, button actions can no longer be attached to the buttons themselves or called from the main timeline. you need to put an 'addEventListener' in the timeline to 'listen' for interacti...
1 994 posted 15 years ago by stiobhart
basic actionscript button action that can be attached directly to a button on the stage. this will NOT work in actionscript 3, which does not allow actionscript to be attached directly onto buttons. make sure you're attaching this action to a but...
0 725 posted 15 years ago by stiobhart
load in XML and style the text via CSS
1 950 posted 15 years ago by stiobhart
actionscript date object and some date calculations
1 834 posted 15 years ago by stiobhart
code to implement a paypal button in flash
0 801 posted 15 years ago by stiobhart
an external javascript sort function, which you can import into flash to help sort arrays of objects. include the script thus: #include "objSort.js"
2 994 posted 15 years ago by stiobhart
this will loop through an object and get all its properties
0 690 posted 15 years ago by stiobhart
shows the basic structure of a switch statement. switches are useful when you want to respond to a series of possible values that a variable might have, without having to write a shitload of "if(blah blah){do blah}" code which, as we know soon end...
0 903 posted 15 years ago by stiobhart
This works with the standard video player component in Flash CS3. Throw this actionscript in the first frame. Name your video player "videoPlayer" within Flash. Then in the HTML markup object tag: param name=FlashVars value="url=PathToVideo.flv...
0 706 posted 15 years ago by relaxasaurus
This is a CS3/AS2 Flash file containing a simple particle system. It requires the use of MC Tween (http://hosted.zeh.com.br/mctween/).
0 835 posted 16 years ago by Winkyboy
Because onDragOver in AS2 doesn't really work, here is some script for actually detecting whether the mouse button is held down when rolling over something. NOTE that for ideal usage, you will have to write some actual collision detection between th...
0 722 posted 16 years ago by Winkyboy
0 1579 posted 16 years ago by Paco
Tracy from FlexCoders advises against using lastResult. This property is intended for use in binding expressions, and you cannot depend on its value when you access it in AS code (though it usually works). Note that if you ever decide to use bi...
0 657 posted 16 years ago by nextstep
This function takes a string containing a date in "mm/dd/yyyy" or "m/d/yyyy" format and converts it to a date object in AS2.
0 1174 posted 16 years ago by Winkyboy
0 716 posted 16 years ago by sicbot
0 616 posted 16 years ago by manec
0 656 posted 16 years ago by manec
2 660 posted 16 years ago by manec
0 583 posted 16 years ago by swfgeek
0 619 posted 16 years ago by mattkenefick
Recursively trace an array or object in Actionscript.
0 749 posted 16 years ago by mattkenefick
Small function that returns a random rounded value between two given numbers.
0 902 posted 16 years ago by Wiederkehr
1 785 posted 16 years ago by imhugo
I was looking for a simple time delay in ActionScript, and I found this one to be useful (and working). The logic is plain simple to understand. ASv1.
1 963 posted 16 years ago by webStruck_