This user is yet to take control of their account and provide a biography. If you are the author of this article, please contact us via support AT actionscript DOT org. How to use shape hints
How to animate along a motion path
Creating buttons
Using simple actions
How to use shape hints
How to animate along a motion path
Creating buttons
Using simple actions
Press the play button below to see an example of what we will be making. Scroll down to begin.










This will add a small red circle with the letter a on it. To see shape hints select View/Show Shape Hints from the menu above. (The layer and keyframe that contain shape hints must be active for Show Shape Hints to be available.)
Move the first shape hint to the top of the petal. Add three more shape hints and as they appear in alphabetical order, arrange the letters as they are in the image below.

Once the shape hints have been placed on frame 1 of the right layer we must adjust the shape hints that now appear on frame 16. The shape hints will all be on top of one another so just drag them around as they will all be there. The shape hints for frame 16 should look like something like this.

Each shape hint in the first frame of the shape tween will direct itself to the corresponding shape hint on the next keyframe. If you test your shape tween it should look something like the example A shape tween with Shape Hints above.
• To remove a shape hint, drag it off the Stage or outside the flash application all together.
• To remove all shape hints, go to the above menu and Select Modify/Shape/Remove All Hints. You must be on an active layer that contains shape hints for this to be effective. It will not remove every shape hint in your entire movie just those on the selected layer.
• As general rule shape hints are yellow in a starting keyframe, green in an ending keyframe, and red when not on a curve.
I can guarantee you will be a master of shape hints buy the time you have added all the remaining petals. They can be quite temperamental at times and as our remaining petals require a few different shapes we should go through some of the tricks you may need to use. The next petal to create will be simple as it will be the opposite of the one we just created. On the left layer you can copy the two petal frames, adjust their position around the stem, add a shape tween and reapply the shape hints. You could try copying everything and modifying it to sit on the left hand side of the stem but copying the shape hint information can be a little messy and unsuccessful.
The next best petal to create and tween would be the centre front petal on the front centrelayer. The images below give you a guide to the shape hints order for this particular petal. I only used two shape hints for this petal as the shape tween is a more simple shape for flash to tween. You will notice that a and b have been reversed to stop the petal from flipping over. This will also depend on how you create your graphics and scale them on frame 16.



The front centre tween can now be modified quite easily for the centre back layer. The next petal is a little tricky as it is for the corner petals and because of their shape and positioning they can take a while to get right. You really only have to get one right and the rest will follow. Below is a guide for the shape hints for the petal on the centre left layer. You will notice that the shape hints b and d swap positions on the 16th frame, this is because the shape began to filp. To prevent a shape from twisting or flipping it usually helps to swap the hints around. This will also apply for the shape hints on the centre right layer.


The Lucky last petals to add will be the front corner petals on the layers front right and front left. You could manipulate the centre right and centre left tween as a starting point. The images below are a guide for the front right shape hints.

Now that all our petals are tweening beautifully with the addition of shape hints your layers should look something like this.

To add a little more animation to our flower it would be nice to have a petal to float to the ground after it opens. To control the direction of how a petal floats to the will require the use of a motion guide. It is time to create a motion guide.








On the buttons layer use the text tool to type "play". Select "play" and hit F8 to convert it to a button. Make sure you have button selected and call it play_btn and hit okay.

Double click on play_btn to edit the button in place. Hit F6 to create keyframes for the over, down and hitstates. Make sure you draw a square shape on the hit state frame to cover the height and width of the text. Simple text isn't always recognised as a true hit area in flash so it is always a good idea to add a shape to the hit area when using text buttons.

![]()

We must add an instance to our button so that our actionscript can tell it what to do. Select play_btn and in the property inspector where you see <instance> type play_btn.

Time to add some actions to our buttons.
Select on the actions layer and hit F9 to open the actions window.
Cut and paste the text below into the actions window
[as]//this stops the main timeline
stop();
//when we click the play button start playing the main tileline
play_btn.onRelease=function(){
play();
} [/as]

[as]//this stops the main timeline
stop();
//when we click the play button go to frame 2 and play the main timeline
play_btn.onRelease=function(){
gotoAndPlay(2);
}
[/as]
