Archive for the 'Uncategorized' Category

28
Mar
08

Flash Tutorial: Animating a button using a mask effect

Posted by Mike in ActionScript tutorials, Flash, Flash Tutorial, Tutorials, Web Design on: March 26th, 2008

Flash Tutorial: Animating a button using a mask effect

Level: This is a beginner lesson, but I will assume that the reader is familiar with the basic use of the Flash software including stage, timeline, drawing tools, property window, etc..

Version: I will be using Flash CS3 and AS2 (although tut is compatible with earlier versions of Flash) and instructions are for the Mac. Windows users would use the PC counterparts for specific instructions on Flash Menu/Shortcut instuctions.

Description: In this tutorial, I will explain how to give a button animation on rollover by creating a button as a movie clip symbol and using a mask effect.

Demo:

var vswf = new SWFObject(“http://mikestickney.com/wordpress/wp-content/uploads/2008/03/btnWithMask_tut1.swf”, “id1″, “250″, “100″, “8″, “#FFFFFF”); vswf.addParam(“wmode”, “window”); vswf.addParam(“menu”, “false”); vswf.addParam(“quality”, “high”); vswf.write(“swf68ac_1″); Let’s get started!

Select “File > New” (command-”N”) and select Flash File (ActionScript 2.0) to open a new Flash document file. Save the file, and give it the appropriate name. I will call this “btnWIthMask_tut1.fla”. Feel free to change the document dimensions to whatever you like (”Modify > Document or “command-J”), but for the purpose of this tutorial, I will use 250×100 pixels.

The first thing we will need to do is draw a simple shape for our button. Select the rectangle tool, set your fill color to the black and white linear gradient and a stroke of none. In the property window (Window > Properties > Properties or command-F3), set the corners to slightly rounded, I chose a 5 pixel rounded corner. Draw out a rectangle approximately 100×20 pixels. Tip: You can use the up or down arrows on your keyboard when dragging out your rectangle shape to increase or decrease the roundness of your corners. You should have a rectangle similar to Fig. 1.

Select the rectangle, and convert to a movie clip symbol (Modify > Convert to Symbol or F8). Remember, we are creating a movie clip button, so be sure to select the “movie clip” radial. Give your symbol an appropriate name, I called mine “mc_btn1″. Double click on your rectangle to bring you into the symbol editing mode. Select your rectangle and let’s adjust the gradient and on our button with the “Gradient Transform” tool. Tip: the Gradient Transform tool is grouped with the Free Transform tool in the tools pallette. With the Gradient tool selected, click on your rectangle and in the color pallete, set your gradient scale to be 100% black on one end and 100% dark grey (#666666) on the other. With the rectangle still selected, rotate your linear gradient to be vertical (Tip: Hold shift when rotating to snap to 45º angles), with the 100% black on the top and the grey on the bottom. Also, shrink the gradient tool so that it is the height of your rectangle. Fig. 2 shows what your rectangle should look like with the gradient tool selected.

Let’s add a little additional styling to our button by going to our tool palette and choosing the Selection Tool (V), selecting our entire rectangle, choose “Edit > Copy” (cmd-C), add a new layer and choose “Edit > Paste in Place” (shift-cmd-V) to paste a new rectangle on top of our original. Now, select the new rectangle, rotate it 180º and cut the height in half (about 10 pixels). Tip: You can adjust the height of your rectangle using the Info pallette (”Window > Info” or cmd-I) and inputting the “H” field. Lastly, move the smaller rectangle so it aligns with the top of your original. You should now have a shape that looks similar to Fig. 3. This will be the base of our button.

For our animation, we will just do a simple “highlight” effect when the user rolls over the button. Before we start doing the animation, let’s set up our timeline. Let’s start by labeling our rectangle layers… the bottom one we can label “lower button”, the top one “upper button”. Now, add 4 new layers above these. The top one should be labeled “actions”, the second layer “labels”, the third one “mask” and the 4th “highlight”. Extend the keyframes for all layers to frame 30 by selecting Frame 30 on all layers and choosing “Insert > Timeline > Frame” (F5). On the “labels” layer, insert a new key frame (”Insert > Timeline > Keyframe” or F6) at frame 10 and 21. Select frame 1 of your labels layer, and in the Properties panel (”Window > Property > Properties” or cmd-F3), give your frame a label of “off”. Next label frame 10 “over” and frame 21 “down”. Finally, on the “actions” layer, let’s add a new keyframe at frame 20 and on our last frame. On frame 1 of our actions layer, add the following code to our Actions panel (”Window > Actions” or alt-F9):

stop();

Do the same thing on frame 20 and the last frame of our “actions” layer. All this code does is stop our movie clip from playing on these particular frames, since for our end result we want the users mouse to control our timeline. Your symbol timeline should now look similar to Fig. 4.

Now that our timeline is set, let’s build our animation. Let’s lock all our layers, except the one labeled “highlight”. On our “highlight” layer, insert a new keyframe at frame 10. Select our rectangle tool, with a fill of linear gradient and a stroke of none. Draw a rectangle on the stage with a height of about 40 and a width of about 20. With our new rectangle still selected, use the gradient transform tool and set the gradient as left side 0% white, center 30% white and right side 0% white. (Fig. 5). Choose “Modify > Convert to Symbol” (F8) and make your new rectangle into a “graphic” and give it an appropriate name. With your rectangle symbol selected, rotate your rectangle and move it just off the top left corner of your button. Finally scale your rectangle to about 50%. When your rectangle is selected with the transform tool, it should look similar to Fig. 6.

Next, add a new keyframe to frame 20 of our highlight layer. On frame 20, move your rectangle to the bottom right corner of your button (Fig. 7). Click on your timeline anywhere between frame 10 and 20, choose “Insert > Timeline > Create Motion Tween”. Finally, add a new keyframe at frame 15, select our rectangle symbol (it should be about 1/2 way across your button), and scale it to about 200%. This will now be our button animation. What about the “mask” layer we made? Well, I’ll get to that shortly, but let’s make our menu and set our ActionScript so you can see why we will need a “mask” layer.

Return to the main timeline (Scene 1). Let’s add 2 new layers and label the top layer “actions”, the second layer “text” and the bottom layer “buttons” (with our “mc_btn1″ symbol on the “buttons” layer). Next, add 2 more instances of our “mc_btn1″ symbol to our “buttons” layer, and postion all 3 button symbols so they are left aligned and stacked (Fig. 8). Click on the top button, and in our Properties panel, give it an instance name of “btn_home”. Give the second button an instance name of “btn_about” and the bottom button and instance name of “btn_contact”.

On the “text” layer, draw a text box over the top button and type the word “Home”. On the second button, draw a text box and type the word “About”, and on the bottom button, draw a box and type the word “Contact” (Fig. 9).

Our buttons are now ready to have the ActionScript added for the mouse events. There are multiple ways of adding this script, and I have written a previous tutorial about creating buttons with movieclips where the actions are applied directly to the button. For this tutorial, I’ll show you another way, which is by adding the actions to the “actions” layer of our main timeline. Either way is suitable and there are advantages to both, so what I suggest is you experiment with both ways and decide for yourself what you like better.

—- ads by google —-

On frame 1 of the “actions” layer of our main timeline, add the following code to the Action panel:

btn_home.onRollOver = function() {
_root.btn_home.gotoAndPlay(”over”);
}
btn_home.onPress = function() {
_root.btn_home.gotoAndPlay(”down”);
}
btn_home.onRollOut = function() {
_root.btn_home.gotoAndStop(”off”);
}
btn_home.onRelease = function() {
_root.btn_home.gotoAndStop(”off”);
}

btn_about.onRollOver = function() {
_root.btn_about.gotoAndPlay(”over”);
}
btn_about.onPress = function() {
_root.btn_about.gotoAndPlay(”down”);
}
btn_about.onRollOut = function() {
_root.btn_about.gotoAndStop(”off”);
}
btn_about.onRelease = function() {
_root.btn_about.gotoAndStop(”off”);
}

btn_contact.onRollOver = function() {
_root.btn_contact.gotoAndPlay(”over”);
}
btn_contact.onPress = function() {
_root.btn_contact.gotoAndPlay(”down”);
}
btn_contact.onRollOut = function() {
_root.btn_contact.gotoAndStop(”off”);
}
btn_contact.onRelease = function() {
_root.btn_contact.gotoAndStop(”off”);
}

Let me try to explain the code:

What we are doing is setting up some functions to control the timeline of each button. For instance:

btn_home.onRollOver = function() {

is saying “whenever the users mouse rolls over the “btn_home”, perform the actions between the curly brackets”.

_root.btn_home.gotoAndPlay(”over”);
}

This is saying “play our “btn_home” timeline starting at the frame labeled “over””

Hopefully from that explanation, you can figure out that the rest of the code is setting up the different actions (play or stop) for the different mouse events (onRollOver, onPress, onRelease and onRollOut) for the different buttons (btn_home, btn_contact and btn_about).

When you test your movie, you should have something that looks similar to this:

var vswf = new SWFObject(“http://mikestickney.com/wordpress/wp-content/uploads/2008/03/btnWithMask_tut1_stage1.swf”, “id2″, “250″, “100″, “8″, “#FFFFFF”); vswf.addParam(“wmode”, “window”); vswf.addParam(“menu”, “false”); vswf.addParam(“quality”, “high”); vswf.write(“swf68ac_2″); Looks pretty good, except one problem… when we rollover the second and third buttons, we see our animation spill over onto the buttons above. What do we do now? Well, remember that “mask” layer we created in our button movieclip? That’s how!

I’ve written a previous tutorial on working with masks in Flash that gets a little more in-depth about creating masks, so I will only go through it quickly here, but you should get the jist of it. Of course I suggest you check out my working with masks tutorial if you would like more information.

Returning back to our .fla file, double click on any of our button symbols to bring us into the symbol editing mode. On our “lower button” layer, select the rectangle and choose “Edit > Copy” (cmd-C). Click on frame 1 of our “mask” layer and choose “Edit > Paste in Place” (shift-cmd-V) to place our rectangle on the stage. Again on our “mask” layer, double click on the icon next to the layer name to bring up our Layer Properties window. In our Layer Properties, click on the “Mask” radial button. Now on our “highlight” layer, open the Layer Properties window and select the “Masked” radial. (Again, for further explanation on working with masks, please refer to this tutorial).

That’s it! Our menu is done. Now when you test your movie, you should see the highlight animation on only the button your mouse rolls over.

I hope you enjoyed this tutorial and as always, comments are welcome. Thanks for reading!

Source Files (Flash 8): Flash Tutorial: Button with Mask Animation

captured from :mikestickney.com

28
Mar
08

3D Blue LCD Alarm Clock – Illustrator Tutorial

A 3D neon blue digital lcd clock created in Illustrator with a final step in Photoshop. This tutorial covers the Illustrator portion. Some skills to learn here are how to create perspective, blending, and adding gloss.

  1. Start out by drawing a rounded rectangle (which I’ll be calling the clock base):
  2. Duplicate the clock base and paste the duplicated object on top of the original (press ‘ctrl+c’ to copy then ‘ctrl+f’ to “paste in front”) and reduce the size. Add a medium blue to light blue 90 degree linear gradient using the colors shown. This new object will be called the clock face.
  3. Add some text. Whatever floats your boat. I chose RationalInteger, 48pt. You can download this font for free here: 1001 Fonts.
  4. Now draw an ellipse with the ellipse tool like the one below. The idea is to get the ellipse to intersect the lower left and upper right corners of the clock face.
  5. Duplicate the clock face and move the duplicated clock face to the top of all objects (this is done by dragging it in the Layers window). Now select both the duplicated object and the ellipse. To select multiple objects, either shift click both objects, or shift click the circles next to each object in the Layers window.
  6. With both objects selected, open the pathfinder window (under ‘windows > pathfinder’) and ‘ctrl+click’ on the ‘Minus Back’ pathfinder. Holding control will create a new object that is a combination of the two previous objects.

    This resulting object will be used to make gloss. Fill it with a black to white linear gradient, using the gradient tool as shown:
  7. Change the transparency mode to ’screen.’ Screen is very useful for glossy effects. Experiment with it a little if you never have before. See how changing the direction and size of the gradient affects the object. Or don’t.
  8. Now select your text and go to ‘Type > Create Outlines.’ This will turn your text in to paths which makes it easier to modify.
  9. Select all objects with the ’selection tool’ (just drag it around all objects), then use the ‘free transform tool’ to add some perspective. Grab the lower left corner, hold ‘ctrl+shift’, and drag the corner point down a little bit. Control lets you skew the object, while shift constrains so you can’t move it all over the place (in this case, you just want to move it straight down). See the image for how far I dragged it down:
  10. Duplicate the original clock base, send it below all other objects, and move it to the left. The quickest way to do this is to select it, copy it, then press ‘ctrl+b’ to “paste in back.” Then use the arrow keys to move it left. Fill the duplicated clock base with #5C5D5E.
  11. Make the duplicated clock base a little smaller.
  12. Select the old clock base and the duplicated clock base. Now you will blend the 2 objects together, giving the 3D look. First, go to ‘Object > Blend > Blend Options’ Make sure ‘Smooth Color’ is selected.
  13. With the objects still selected, go to ‘Object > Blend > Make’ (or hit ‘alt+ctrl+b’).
  14. Just a couple of finishing touches left. First, click the arrow next to the ‘blend’ object in the Layers window. This should show the 2 objects that make up the blend: the orginal clock base and the duplicated clock base. Select the original clock base, and “copy” (‘ctrl+c’) then “paste in front” (‘ctrl+f’). Give the new object a black to white gradient. Use the gradient tool if you need to make adjustments. In mine, it’s just the default gradient.
  15. As a final touch, to give the front of the clock a little bevel, select the gloss object and move it just one pixel right and one pixel down.
  16. And you have yourself a clock. Just for an idea of what to do with it, here is a little scene I threw together in Photoshop:

captured from:www.slicktutorials.com

28
Mar
08

Imitating A Scanner Darkly

Tutorials, Free October 04th, 2006 By Aaron SaccoUsing Illustrator’s pencil tool and shapes of solid color, you can imitate the graphic novel styling of A Scanner Darkly. An animator from the film shows us how.

Continue reading ‘Imitating A Scanner Darkly’

28
Mar
08

Creative Text Masking – Illustrator CS2 Tutorial

llustrator Tutorials  

Carl Grivakis


This tutorial is meant to help you create a creative mask with text, something that you can use in a variety of mediums, both print and web based.

Open a new document in Illustrator, This particular tutorial uses version CS2, but the steps should be the same in previous versions.

First you need to find an image that you’d like to use as a mask, for the purpose of this tutorial we’ll use a nice textural image of sheet music. Simply place this image and lock it in place.

Next you’ll type out the text that you’d want to use as the mask, I recommend a nice bold font that will allow for a lot of the texture to show through. I also added a musical note from another font to substitute in place of the ‘S’ in music. Place the text over the part of the image you want the mask to show through.

After this select all of the text with the arrow tool, it should be highlighted all together as shown. Choose from the text menu, create outlines. This will convert all the letters to shapes, and will not edit with the Type Tool once this is done.

Next group the outlined letters and select from the Object menu, Compound path, Make.


Now in the object menu, unlock all so your background can be selected again. Using the black arrow tool select the outlined letters and the background together. Choose the Object Menu, Clipping Mask, Make.

Your result will be the letter shapes masking out the background we used. I’ve added a background behind to better show the results.

I hope this tutorial helps you create more interesting designs, look for more tutorials from me in the near future.

Carl Grivakis is owner of PowderKeg Graphic Design, and runs a blog called Tapp-d at www.grivakisgraphics.com/html/wordpress.

 

Copyright (c) 2006, Carl Grivakis , All Rights Reserved

25
Feb
08

Badass Bling Effect in Photoshop

Written by guest author Barton Damer.

Bad Ass Bling Effect

Introduction:

This tutorial will show you step by step on how to create a “Badass Bling Effect” using layer styles in Photoshop. Once you create the layer style, you can easily “blingify” any layer. There is also a video tutorial as well.

Video Tutorial

STEP 1

Choose an image you want to sprinkle with golden Photoshop magic. In this case i chose a full color image of a boombox and I’m going to make it look like it is solid gold. Make the image into a grayscale image by “Desaturating” the layer in the Image/Adjustments/Desaturate menu.

image

STEP 2

Apply a color overlay Layer Style by clicking the FX button at the bottom of your Layers Palette.

2

STEP 3

Set the color overlay to a rich golden color and make sure the Blend Mode is set to Color Burn

3

STEP 4

Adjust your levels like so and…

4

Brace yourselves… We’ve got a solid gold boombox in less than 2 minutes! SUPER RAD!

4

STEP 5

Repeat the exact same steps for 2 different cars. I copied and flipped horizontally the radios and 90s sports car to get a symmetrical composition started.

5

STEP 6

We are creating a background for our composition that will look like a close of the boom box speaker shield. In Adobe Illustrator, draw 2 circles and separate them a descent width. Keep them aligned horizontally. Then choose Object/Blend/Make. You can also choose the blend tool from your tools palette.

6

Once you have a blend, you’ll want to open the blending options by going to Object/Blend/Blend Options or double clicking the Blend tool in the tools palette will bring up the same dialog box. Choose a # of blends that will leave some space between your circles.

5

STEP 7

Expand your blend by choosing Object/Blend/Expand. Now Each circle is treated individually and can be edited. Select your entire row of circles. Hold down option and drag it down a good distance. Hold down shift at the same time to keep the layer aligned vertically. Then repeat the steps to make a blend. I chose 15 steps. You can see that I have now blended my 2 rows of circles to make a grid of evenly spaced circles.

7

Select the entire grid and hold down option & shift while dragging on a 45 degree angle. You now have a circle pattern that should look like the pic below

dots

Copy and paste it into your Photoshop document

7

STEP 8

Apply Bevel & Emboss layer style to your grid of circles. Choose Outer Bevel.

8

Add a black background… and get crunk!

8

STEP 9

This is the hardest part of the tutorial… and it’s all trial and error… at least for me it was. We’re going to create our own layer style that take a solid 2d object and make it look all bling’d out. I chose this amazing vector artwork from Go Media’s Arsenal Set 1 Crests.

9

First use a Gradient Overlay from the FX Layer Style tab in your layers palette. I created this gradient of different hues and values of Gold. Make sure you have contrast in your gradient.

9

This is what the Go Media vector crest will look like after the gradient has been applied:

9

Apply a Satin layer style within the same dialog box. You will want to experiment with your settings. Each object you bling out could require tweaking the settings. You will see some depth start to take place and that is important. Choose a different Contour as well. I chose this double peaked one.

9

Choose a Bevel and Emboss from the Layer Style window. Select Inner Bevel. Adjust the size and softness. I chose 10 and 1. Set the Shadow Mode to Color Burn and you may want to decrease the opacity.

9

Check the Contour Box under Bevel and Emboss. Choose a Contour. Each one will give a different look.

9

Choose the Texture box under Bevel and Emboss as well. Select a pattern from one of the Photoshop presets. Adjust the scale and depth and watch how it effects the Go Media Crest. Again, experiment with these settings to get something that is really starting to look like gold reflections.

9

At this point I feel as though the crest is a little too orange. I could go back in and adjust my gradient overlay… but then i’d have to adjust each point in the gradient where there is a color change. Instead, add a color overlay. I chose a darker desaturated green to help tone down the red in my gold layer style. I adjusted the opacity until i felt it was beginning to match the golden cars a little better.

9

And the last layer style for our gold effect will be to add a drop shadow to help with some depth.

9

Now, before you close the Layer Style box. You are going to save this style so you can reuse it on anything! Click the New Style button just below “Ok” and give your style a name. Check both boxes – Include Layer Effects & Include Layer Blending Options.

9

Notice now that your style appears in the Styles palette! SICK!

9

And your new golden style shines so bright!

9

STEP 10

Add more bling to your design. I chose another Go Media Vector from Set 1 Wings.

9

Copy and paste into Photoshop and this time… apply your new style you just finished creating.

9

Repeat the same step for any additional elements you want to turn into gold.

9

STEP 11

We’re going to add some light effects using the airbrush and a layer style. Choose a standard airbrush and set it really large. I clicked one time at 100%.

9

Apply a Layer Style of Outer Glow from the FX tab in the layers palette.

9

Choose a color for the Outer Glow. Set the Blend mode to Add. Opacity 100%

9

Copy that layer and then place it in front of everything. Adjust the opacity to be quite a bit lower. Then use the eraser with an air brush setting that will allow you to erase over the middle of the car and near the edges. The result gives you the look of over spill from the light source.

9

STEP 12

We’re going to add some sparkle to our bling using Illustrator and more layer styles. We’ll then make a custom brush from our sparkle shape and bling this piece out with tons of rad sparkly things. Create a star shape in illustrator. I chose a 5 point star and dupicated/rotated slightly to get my final sparkle shape.

http://www.gomediahost.com/zine/tutorials/bling/Adobe%20Illustrator%20CS3ScreenSnapz005.jpg

Copy and Paste it into Photoshop. Apply a Layer Style of Outer Glow. Only this time change the Blend Mode to normal and adjust the spread/size to give a faint blur around your sparkle shape.

9

Now option click directly on the Effect of the layer. It will bring up these options. Choose Create Layer. This will make the outer glow an actual image on the layer below your sparkly image.

9

Choose the layer above blurry sparkle shape. This should be the crisp sparkle. Choose Merge Down from the Layer Palette tab in the right hand corner.

9

Now go to Edit/Define Brush Preset.

9

Name your new brush.

9

And now you will see your new brush in the brush palette. (and you can see that I’ve created some of these before)

9

Click once in your desired spot to add sparkle to your bling! However… these sparkles could look even better with… another layer style applied to it! Why not? right!

9

Apply an outer glow with some color. Set the Blending Mode to Screen. Adjust the size/spread. Ba da boom. Ba da BLING!

9

To tighten this design up a little more, I’ve added the Go Media Logo complimented by an icy hot diamond because that’s how Chris Wilson likes to roll at Go Media. ;-)

I simply applied my own style that I created earlier in the tutorial. Unfortunately, not everything is quite as successful when the style is applied to it. I actually had to tweak my style settings quite a bit to get it to match the other Go Media vectors that turned gold fairly easy.




 

November 2009
M T W T F S S
« Mar    
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Pages

Archives

Categories

Flickr Photos

acceptance

.

25/365 : Magnetism

More Photos