The following example shows how you can dynamically create an instance of the FLVPlayback control, dynamically add an ActionScript cue point, listen for the ready and cuePoint events, and add the FLVPlayback control to the display list, all in delicious ActionScript 3.0.
Full code after the jump.
Tagged as:
addASCuePoint(),
cuePoint,
FLVPlayback,
MetadataEvent,
ready,
VideoEvent
by Peter deHaan on March 11, 2008
in Button
The following example shows how you can use embedded fonts (normal weight and bold weight) with a Flash CS3 Button control in ActionScript 3.0.
Full code after the jump.
Tagged as:
Button,
embedFonts,
Font,
setStyle(),
textFormat
by Peter deHaan on March 10, 2008
in DataGrid
by Peter deHaan on March 9, 2008
in ComboBox
by Peter deHaan on March 6, 2008
in Tween
The following example shows how you can override the default frame rate for a programmatic tween in Flash by setting the Tween object’s FPS property.
Full code after the jump.
Tagged as:
FPS,
start(),
Tween
The following examples show how you can dynamically load an image, calculate its width and height, and center the image on the Stage in ActionScript 2.0 and ActionScript 3.0 using the MovieClipLoader class (ActionScript 2.0) and the Loader class (ActionScript 3.0).
Full code after the jump.
Tagged as:
contentLoaderInfo,
loadClip(),
Loader,
MovieClipLoader,
onLoadInit
The following examples show how you can load external XML files at runtime using the XML class in ActionScript 2.0 and the URLLoader class in ActionScript 3.0.
Full code after the jump.
Tagged as:
dataFormat,
onLoad(),
URLLoader,
URLLoaderDataFormat,
XML
The following examples show how you can dynamically load an image in ActionScript 2.0 and ActionScript 3.0 using the MovieClip class and Loader class.
Full code after the jump.
Tagged as:
createEmptyMovieClip(),
Loader,
loadMovie(),
MovieClip
The following examples show how you can dynamically load an external MP3 file and display it’s ID3 information in ActionScript 2.0 and ActionScript 3.0 using the Sound class and id3 property.
Full code after the jump.
Tagged as:
id3,
onID3,
Sound
The following examples show how you can dynamically load MP3 files into your SWF using the Sound class in ActionScript 2.0 and ActionScript 3.0.
Full code after the jump.
Tagged as:
load(),
loadSound(),
play(),
Sound