Showing posts with label MacromediaFlash. Show all posts
Showing posts with label MacromediaFlash. Show all posts

Saturday, November 14, 2009

Tutorial Flash : Shape Hints for Morphing

Shape hints are used with shape tweening to tell flash where specific points should start and end up. This gets pretty important in more complex shape tweening, however, shape tweening is not intended to do complex shapes at all.

1. Select your oval tool with line color as black and fill color as white to black radial gradient. Hold your shift key down and draw a circle that is about 1/4 the height of your movie in the center of your stage.
2. Right click on frame 25 and insert a blank key frame. Select your rectangular tool with line color black and fill the blue to black radial gradient.


3. Click on frame 1 and insert a SHAPE tween by opening properties and selecting tweening => shape. (Flash 5 has it on the frames panel.)

You will notice that if you play the movie, the rectangle comes out of the circle while color changes. There usually is a problem with skewing because at this point, we have let it up to flash to deside where the points are coming from/going to. We need to add shape hints to tell flash where we want the points to go.


4. Click on frame 1 and then click Modify=> shape=> add shape hint. Move the red hint to the 10 o'clock position on the outside line of the circle. Click on frame 25 and drag the shape hint to the upper left hand corner of your rectangle. The red hint will turn green when the hint is set on a line.

Back on frame 1 you will see the red shape hint has turned yellow. It is set.

5. Add a new shape hint(b) to frame 1 and set in the 8 o'clock position. Move the hit in frame 25 to the lower left corner. Add shape hint (c) to the 2 o'clock position in frame 1, then put the hint in the upper right hand corner of hte rectangle in frame 25. Add shape hint (d) to the 4 o'clock position and put the hint on frame 25 in the lower right corner of the rectangle.

Preview your movie and watch how straight your box forms.

6. Select the line tool and draw a line from the middle right edge of the rectangle in frame 25 our to the edge of your stage.

Select the arrow tool and grab the line right where it meets the rectangle and drag it out to the end. This will create a point on the right side.

Check your movie. If the tween is not going where it needs to go, Add a shape hint between c and d on your frame 1, and at the outter newest point of frame 25

7. Draw a vertical line through your rectangle near the end.

8. Use your arrow tool to drag the top intersection down and right, and the bottom intersection up and right. Remove your extra lines by clicking them one at a time and hitting your backspace key.Apply a Similar technique to the tail end of the developing arrow, making sure you remove the excess lines.

Check your movie. If the tween is not going where it needs to go, Add a shape hint between a and c on your frame 1, and at the inside top newest point of frame 25. Add a shape hint between b and d in frame 1, and the lowest new point on frame 25.



Source : http://www.developingwebs.net/flash/shape_hints.php
Read More..

Shape Tween Vortex

This is a lesson in shape tweening gradients, and frame manipulation. Practice the frame manipulations and you will become very fast and proficient at flash.


1. Open a new movie. Open the properties inspector and set the movie properties to a square,

  • 500 wide by
  • 500 high.
  • 12 fps,
  • background = Black.

Save your file.


2. Double click your hand tool on your tool box so your stage fits to screen.

3. Select your oval tool. Set the stoke color to black, stroke thickness = 5, solid. Set your fill to a radial rainbow gradient fromt he gradient presets.

4. Hold your shift key down and draw a circle that is larger then the stage so all of the stage is covered.


5. Use your line tool set at 5 pixel thickness and black color to draw a line through the center to split the circle in two. Use the line tool to split those sections so you end up with 4. Split those sections again to end up with 8. Split one more time so you end up with 16.

6. Select your arrow tool. Double click the lines in the middle being careful to only get the lines. hold your shift key down and double click the outline of the circle. This should select all the black lines without any fill. Click Modify=> Shape=> convert lines to fill. Deselect all by clicking somewhere else on the work area.

7. Click one on the black area. This should select all the black fill. Hit your backspace key to delete the black fill. This should leave a sliced pie.

8. We need to separate the sliced pie to their own dishes so to speak. Click right on frame one of layer 1 so highlight all the contents on the stage and work area. Click Modify=> distribute to layers. Ea slice should now have it's own layer and the original layer should be empty.

9. We need to identify the layers and place them in order so our vortex will go smoothly. We will need to click on them in order and change the name of the layer. Click on the top left slice. Find the highlighted layer in the layers palette and rename it 1. Click on the Number 2 slice, going counter clockwise on the circle. Find it's layer and call it 2. Continue around the circle locating each layer for each slice in order until all the slices are labeled but layer 1. Highlight the unused layer 1 and Click the trash can on the bottom of the layers palette.

10. Open your layers palette up long so you can see most all of the layers if possible. reorder the layers so that 1 is on top and 16 is on bottom. Just click and drag each layer to the new position.


11. Use your arrow tool to Click-drag over all the frame 1 frames on the layers. This will highlight all the layers. Be careful to click-drag from the get go. If you click then clickdrag you will drag the contents of the frame. Open the properties inspector and select Tween = Shape.

12. Click and drag the frame 17 column on the timeline. There is nothing there but there will be in a second. When all the frame 17's are highlighted, hit your F6 key once to insert keyframes in each of the layers on frame 17.

13. With frame 17 highlighted, and keyframes present there, go to the color mixer. The fill color is Radial rainbow. On the gradient editor, click the first color carrot and then set alpha to 0%.

Click on the second color carot and set alpha to 0%. Do the same for each of the color carrots below the gradient editor.

14. Click back on frame 1 on any layer. Use the arrow tool to Marquee select all of the pie slices on the stage. Select the transform tool. Select the scale option for transform. Hold your shift key down and scale your shapes to a smallish circle in the center.


15. Click-drag in a single motion on Layer 2 from frames 1 to 17 to highlight them all. Then mouse over the layer so you can see the rectangle form beneath the cursor. When you see this, you can drag the selected frames to a new location. Drag the frames to the right 1 frame over.

16. Do the same on layer 3 but drag the content over 2 frames. On layer 4 drag 3 frames. Layer 5 drag 4 frames. Keep going until you have completed the bottom, layer 16. The only layer that has not been moved is the top or first layer.

17. Click-Drag in one motion from layer1 frame 17 straight down to layer 16, frame 17. Hit F6 to insert keyframes on the highlighted frames. The frame on layer 1 will not change. (If your having trouble highlighting the column together, just click on each frame separately in frame 17 and hit F6.)

Click-Drag The frame 18 Column starting at layer2 and drag down to layer 16. Hit F6 to insert keyframes on that column.

Concept:: Our Movie is going to be 17 frames long, with the frames to the right of frame 17 being transported or moved to the blank keyframe prior to the start of the tween on the layer. This will allow us to make a flowing animation for our vortex with no pauses.

18. Click on the frame on layer 2, frame 18. Since it is a keyframe, and the previous frame is a keyframe we can simply clickdrag the frame over to frame 1 an drop it there. For now ignore the incomplete shape tween leftr on frame 18.

19. Click-drag to select the layer 3 frames 18-19. Click drag the frames to over frames 1-2 and drop. These frames will fill 1 and two. For now, ignore the incomplete shape tween left on frame 18-19.

20. Click-drag to select the layer 4 frames 18-20. Click drag the frames to over frames 1-3 and drop. These frames will fill 1 and two. For now, ignore the incomplete shape tween left on frame 18-20.

21. Click-drag to select the layer 5 frames 18-21. Click drag the frames to over frames 1-4 and drop. These frames will fill 1 and two. For now, ignore the incomplete shape tween left on frame 18-21.

Continue working down the layers, moving the frames from 18 up to the beginning of the animation. Leave the residual incomplete shape tween frames at the end of these layers for the next step.

22. Click drag in the single motion to highlight all the incomplete shape tweens from frame 18 to 32 or higher.
23. Right click and select Remove Frames from the menu.

24. Your project file is ready to publish.

  • Click File=> save
  • Click File Publish. Your movie and html files should be in the same folder as the .fla you saved.
Source : http://www.developingwebs.net/flash/vortex.php Read More..

Friday, November 13, 2009

Making Bubble Wrap in Flash MX

Making Bubble Wrap

  • A Flash drawing and simple scripting project
  • Written for flash MX although adaptable for 2004
  • You will need this file to complete this project

Drawing the Inflated bubble.
1 Open your movie file which you downloaded.
2. Click insert=> new symbol. Name the symbol "bubble" and set it to the behavior of a movie clip.
3. Open your bubble movie clip. Drag a copy of your basecircle onto the stage. Use the align panel set to stage, to align horizontal center and vertical center.

3. Lock layer 1. Click the new layer button on the bottom of the layers palette.

4. Click in frame 1 of Layer 2. Magnify your stage to 500% by typing in the magnification box. Select our Paint brush. Set your paint brush to white, #FFFFFF. Select your largest round brush. Pain an arc around the upper left part of the circle. Try to stay within the circle.
5. Use your arrow tool to highlight the fill you just painted. Click modify => shape => Soften Fill Edges. Set the following:
  • Distance: 5px
  • Steps: 5
  • Inset is selected.
6. Lock layer 2 and insert a new layer, layer 3.

7. Select your ellipse tool. Set the stroke to no stroke. Set the fill to radial gradient on the color mixer panel. Set the left color slider to white at 100% alpha. Move the left slider about 1.3 way to the right. Set the right color slider to white with 0% alpha.
9. Draw a circle that is about 2/3 the side of the basecircle.   Use the arrow tool to select and drag the new circle down and to the right of the original circle.
10. Add a new layer on top of layer 3, called layer 4. Drag a copy of the basecircle out on to the stage. Use the alignment tools to center it to stage, horizontally and vertically. Right click on the name layer 4, and select mask.
11. Insert a layer above layer 4 called layer 5, and rename it Buttons. Drag a copy of the basecircle onto the stage and center it horizontally and vertically. Select it on the stage. Click insert=> convert to symbol. Name the symbol bubblebutton and give it the behavior of a button.
12. Double click the button on the stage. Click to highlight the upframe of the button. Click-drag the frame to the hit frame without releasing your cursor.
Back on the bubble timeline, lock all layers. Turn the eye off on The buttons layer.

Drawing the deflated Button
13. In the bubble movie clip, click in frame 2 of the bottom layer, layer 1, and hit your F6 key to duplicate frame. Unlock layer 1.
14. Highlight the symbol on layer one and click modify=> break apart.
15. Use the move tool to highlight the line surrounding the circle. Change the color of the stroke to #CCCCCC. gray.
16. Click in the middle of the circle to highlight the fill. Set the fill on the color mixer to radial fill, let the left slider to gray #999999. Set the right slider to Gray #CCCCCC. Fill the circle from the center. Lock this layer
17. Click the button to add a layer. Make sure the magnification is about 500%. Click in frame 2 of the new layer 6. Hit F7 to insert a keyframe. Select the paint brush set to the middle size, round, brush. Set the fill color to white.  Draw radiating lines from center of the circle.
18. Click on frame 2 of the new layer to highlight all the file. Click modify=> shape=> soften fill edges. Set it it inset, 3 pixels, 3 steps. Lock this layer,
19. Click on the to layer in this bubble symbol. Add a layer, layer 7. Rename this layer Actions.
Scripting the bubble.
20. CLick in frame 1 of the Actions layer. Open the Actions panel and select Actions=> Movie control=> Stop. Click in frame 2 of the actions layer and hit F7. Add the actionscript Actions=> Movie control=> Stop.
21. Unlock the buttons layer and turn the eye on on it. Highlight the button so it is active. Open your action script panel. Click Actions=> Movie control=> goto. Set the goto action to gotoAndStop. Set the frame number to 2.

Adding Sound
22. Click on the buttons layer. Add a layer. Call this layer Sounds. Click in frame 2 of the sounds layer and hit F7 to insert a keyframe.
23. While frame 2 is highlighted, open the property inspector. Set the sound to the bubblewrappop sound and synch it as an event.








Source : http://www.developingwebs.net/flash/makingbubblewrap.php Read More..

Full Color Rollovers in Flash

header-image
In this tutorial, we will create a Flash file with a simple, yet eye-catching effect — a black & white photo with full-color rollovers. We will initially edit the photo in Photoshop, then import and complete the file in Flash. I wanna send a shout-out, and special thank you to the band Today the Moon, Tomorrow the Sun for the use of their photo.
Download the sample file band_photo.jpg (310) and open in Photoshop.
band_photo jpeg
Save this document as band_photo.psd

Isolate The Figures

Using the pen tool, create a path around one of the band members
I’m making a selection just around the person, not the chair. The goal here is to create a selection of a band member. I’m using the pen tool, however you may use whatever selection tools you prefer.
Right-click or control-click on the path, and choose “Make Selection…
make_selection_menu
Click OK on the Make Selection dialog box that follows
make-selection-dialog
Create a layer via copy, CONTROL+J/COMMAND+J. This creates a layer from the
selection
Select the background layer, and then repeat this for each band member
Be sure to name each layer.
For simplicity, I named them band-1, band-2, etc, going from left to right
band layers Full Color Rollovers in Flash
Create The Grayscale Background
Select the background layer, press CONTROL+D/COMMAND+D to deselect everything.
Duplicate this layer via copy, CONTROL+J/COMMAND+J
Name this duplicate layer “black & white”
dup-layer-black-n-white
Next, create a new layer, CONTROL-SHIFT+N/COMMAND-SHIFT+N, Set this layer Mode to “Color“, click OK
new-layer-color
On the keyboard, press D to set default colors (black foreground/white
background).
Fill this layer with the foreground color, ALT+BACKSPACE/OPTION+DELETE
Merge this layer with the black & white layer, CONTROL+E/COMMAND+E
As an option, you can push this effect further by lightening the output levels on the black & white layer CONTROL+L/COMMAND+L
Set the Shadow output level anywhere from 25 to 50.
output levels 25 Full Color Rollovers in Flash
At this point, it will be visually obvious if you have selected extra space around the band members. You may see color spots around them that should be black & white. Correct this via selecting the band member’s layer that needs fixing, and use the eraser tool to get rid of any overlap.
final image Full Color Rollovers in Flash
Toggle the visibility of the Background layer to off.
background visibility Full Color Rollovers in Flash
Save this document, CONTROL+S/COMMAND+S, and close it.

Import The .psd File Into Flash

You will need at least Flash CS to import a PSD
Open Flash. Create a new document, either AS2 or AS3 will work as this effect is not dependent on Actionscript.
Import the band_photo.psd, CONTROL+R/COMMAND+R
ps_layers_to_flash
Because we turned off the visibility of the background layer in Photoshop,
this layer is unchecked when importing into Flash.

Hold down the SHIFT key, then select each band member layer, as well as the
black & white layer.
Check the box “Create movie clips for these layers”
convert_layerd_to_movieclips
For Publish Settings, set the Compression to Lossless.
Follow these settings, Convert Layers to: Flash Layers, check the boxes Place layers at original position, and Set stage size to same…
Click OK.
layers position stage Full Color Rollovers in Flash
Deselect All, CONTROL-SHIFT+A/COMMAND-SHIFT+A

Create The Buttons

Click once on one of the band members to select.
select band member Full Color Rollovers in Flash
Convert this selection to a symbol, F8, follow these settings:
Name: band #+_btn
Type: Button
Click OK
f8 convert to symbol 2 Full Color Rollovers in Flash
Repeat the BUTTON SYMBOLS steps for each band member.

Edit The Buttons

Once you have converted each band member to a button, DOUBLE-CLICK on one of them, this will take you into edit mode, in the buttons timeline:
button edit 2 Full Color Rollovers in Flash
Click-and-drag the Up frame to the Over frame
over frame Full Color Rollovers in Flash
Select the Hit frame, and insert a blank keyframe, F7
hit frame Full Color Rollovers in Flash
Select the brush tool and using the photo as a guide, paint a rough silhouette of the band member. The paint color does not matter, as the hit frame is not seen by the audience/end user, you are simply painting the active area of the button.
null
On the timeline, click the Scene 1 button, and you will see a aqua-colored overlay of the silhouette you just painted.
null
Repeat the BUTTON EDITING steps for each band member.
Here is a snapshot of the file with all 4 band member buttons edited. Though you can be as detailed or loose as you like when creating the silhouettes, do not overlap, as this can cause flickering between buttons.
final flash Full Color Rollovers in Flash
Save, and test your movie CONTROL+ENTER/COMMAND+RETURN

Source : http://www.tutorialized.com/view/tutorial/How-to-Make-Full-Color-Rollovers-in-Flash/52798 Read More..