You can pass additional variables to an upload script using either the POST or GET request method. To send additional POST variables to your upload script, you can use the following code:
The StageAlign class offers constant values that can be used for the Stage.align property.
The StageScaleMode class provides values for the Stage.scaleMode property.
http://help.adobe.com/nl_NL/AS3LCR/Flash_10.0/flash/display/StageAlign.html
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/StageAlign.html
Example:
This will add a dropshadow filter to a sprite (here symbolized as the variable oSprite):
For information on the parameters visit the actionscript pages on the dropshadow http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/filters/DropShadowFilter.html
To move a DisplayObject to the top of the displaylist use the following (where parent is the container of the object being moved to the front). This makes it appear like it's in front of any other DisplayObjects.
You should preload sounds in as3 before playing them to prevent awkward pauses while the sound effect loads for the first time. To load and play an external sound the following code suffices (in which the first line (pre)loads the file and the second line plays it). Place the first bit in your constructor function and the second in the event handler playing the sound
The stage object can only be accessed after an object has been added to the display list.
A quick example of the transitionmanager in a method:
Possible mouse events are :
to capture mouse click event and excute a function :
Use this code to show the handcursor when hovering over a displayobject in as3. The cursor turns into a pointing finger similar to the css cursor:pointer directive.
This function fades out the current stage by drawing a filled rectangle on top of it and tweening the alpha. Can be used for modal by adding a child on top of it.
This is an example showing an application of the loader class with all it's handlers - this example is from the Flash help files. Usually you don't need all of them but it's handy to have an overview.
To remove all children from a displayObect in as3 you can use the following loop:
When tweening, resizing / rescaling an image loaded with the as3 loader class in certain cases it looks neater if it rescales to the center of its parent.
This example shows what to include and some sample code for loading xml data in an AS3 class.
A Simple example of tween class usage with callback in as3:
Small example illustrating how to get to passed flash vars in AS3
Quick example on how to call a js function via URLRequest: