Which Ones to Use?
Examples that I think will be most useful to your project are in
BOLD
View Source
All examples have view source enabled (right-click application).
Directory Listing
Here
Flash Builder 4 Examples
Previous projects examples developed in Flex Builder 3 are
here.
Unit 1 - buttons
Unit 2 - flick book examples
-
Example Images: a set of images of the blue man is zipped here:
exampleImages.zip
-
p2.1 -
mxmlFlickBookSparkV002
(sequence of images loaded inside an <mx: Canvas> control.
Images accessed using Spark 'getElement' method. Animation works via
ENTER_FRAME event handler, making images
visible or invisible)
-
p2.2 -
twoFlickBookBehavioursSparkV001
(as above - image sequence contains two behaviours each invoked
by its own button)
-
p2.3 -
flickbookComponentSparkV001
(as above but some code moved into a custom mxml component so
that we can have two characters on the screen)
-
p2.4 -
arraysOfSparkCharacters
(as above but creates an array of custom mxml components so that
we can have as many of them as we like and so that we can loop
through this group of characters using an integer index. Use this for your images from Sandy's class - its similar to
the example above, except without the complication of the custom events.)
-
p2.5 -
customEventSparkCharacters
(dispatches a custom event from the character component which is
tells the application when the character has completed its
'fall' behaviour)
Unit 3 - basic bouncing ball
-
p3.1 -
bouncing Ball SparkV001 (one fire ball)
Basic 2nd order dynamics with vertical acceleration set to
gravity. Down-clicking the ball provides a 'fire' function in
which the new ball velocity (vx, vy) is set to 5 times the
vector (x, y) from the ball centre to the mouse.
-
p3.2 -
bouncing Ball Spark V002 (array of fire balls)
Similar to above except that 'fire' code has been moved into the
ball component to make it easy to have an array of these
components.
-
p3.3 -
drag BallSpark array V001
Basic 2nd order dynamics but no inertia, spring or velocity
friction effects. Vertical acceleration set to gravity.
Down-clicking the ball provides a 'fire' function in which the
new ball velocity (vx, vy) is set to 5 times the vector (x, y)
from the ball centre to the mouse.
Unit 4 - 2nd order dynamics
-
singleSetPointBallSparkV002
(Simple demo. of array of bouncing balls with drag function.
Down-clicking the ball moves the centre of the ball to the mouse
position of the parent window )
Unit 5 - Collisions
-
sparkCollisionDetectionV001 an array of 'fire balls'
(taken from p3.2)that have collision detection and code similar
to Peter's collision dynamics added to the main application
file.
-
bitmapCollisionDetectionExample use of bitmaps to
detection collisions at the pixel level (rather than just
intersection of bounding boxes)
Unit 6 - Forward Kinematics
Unit 7 - Inverse Kinematics
Flex Builder 3 Examples
Unit 8
-
crowdV002.html (randomly moving silhouettes of people with
perspective and z-display ordering)
Older examples
Unit 9
Miscellaneous
|