Blogroll

This blog is created for education about engineering students.All the engineering students are get free downloadable books here. not only books and also different software also available here

Create a TextField


Procedure:
step 1: Open flash 8
step 2: Select flash document

step 3: Create a Button from window->Components tool
step 4: Write the source code under the control of Button
step 5: To check output press ctrl+enter(test movie)

Source code:


on(click)
{
this.createTextField("t1",1,100,100,200,100);
t1.bordercolor=0xff0000;
t1.border=true;
t1.size=16;
t1.text="chiru kumar";
f=new Textformat();
f.size=20;
f.italic=true;
f.setTextformat(f);
}

Making a Lava Lamp


Making a Lava Lamp

A. Create the bulb
  1. Using the rectangle tool, create one tall rectangle for your bulb with a black stroke color and  no fill for now.
  2. Using the line tool, draw a horizontal line through the rectangle at about 1/3 from the bottom. Place a vertical line down the middle of your rectangle from above the top to below the bottom.
  3. Grab the intersection of the horizontal line and the rectangle, drag that corner out from both sides, as equal as possible, about 1/2 the width of the rectangle. Do the same to the top and bottom sides of the original rectangle, dragging out about 1/4 the width of the original rectangle. Using the arrow tool mouse over in he middle of the top and bottom halves and drag them out to create smooth arcs.
  4. Click the center vertical line one and remove the line by hitting delete. Remove The other three sections of that center vertical line by repeating the process.
     
  5. Click on the fill tool (paint bucket) and select the background color. Open the Fill tool. Select Linear Gradient. A black to white gradient should come up. Move the white slider to the middle of the gradient. Click on the area where the white slider WAS and a new color swatch comes up. Click on the swatch and then the color pallet on the right and select black as your color. (The example used a Dark green in place of the black.)
     
  6. Using the fill tool, fill the TOP part above the horizontal guide line with this gradient.
     
  7. Click on the options for "Transform Fill" while your fill tool is selected and then click on your gradient. move the center point to the right of center of your image, still within the borders of the gradient, and rotate the gradient so the white line is parallel with the right line. squeeze or stretch your gradient so that there is grey on either side of the white, and no black shows.
     
  8. Click on the fill tool (paint bucket) and select the background color. Open the Fill tool. Select Linear Gradient. The previous gradient will come up. Move the white slider slightly so the gradient is not identical (this prevents the grouping of the two gradients as one).
     
  9. Using the fill tool, fill the Bottom part above the horizontal guide line with this gradient
     
  10. Click on the options for "Transform Fill" while your fill tool is selected and then click on your gradient. move the center point to the right of center of your image, still within the borders of the gradient, and rotate the gradient so the white line is parallel with the right line. squeeze or stretch your gradient so that there is grey on either side of the white, and no black shows.
     
  11. Using the arrow tool mouse over the horizontal line inside the image and drag it from the  center to give it a rounded appearance.
     
  12. Using your arrow tool, click once on the Horizontal line separating the top and bottom and click delete. Do the same for the horizontal lines outside the object
     
  13. Highlight your work and select the menu INSERT => CONVERT TO SYMBOL. Call it bulb and give it the properties of a graphic.
B. Create the Base
  1. Create a square using the rectangle tool with black line color, and white to black to white linear gradient (see gradients above)
     
  2. Draw a Vertical line down the middle of your square (as a guide).
     
  3. Drag the top and bottom lines down about 1/4 of the height along the vertical line.
     
  4. Bend the top two lines inward and the bottom outward to give each a smooth curve.
     
  5. Click the line tool and add a line from the top left corner to the top right corner. bend this outward slightly.
     
  6. Remove all parts of the vertical line (guide)
     
  7. Using the fill tool =>transform gradient to adjust your gradient to move the center to the right side of center of your image and squeeze to make the black to show up on the image.
     
  8. Using the Fill tool and the fill panel create a new gradient. You will need to adjust the gradient that is default or when you use it this will be grouped with the adjacent gradient. Move the center white color over a small amount.
     
  9. Add This linear gradient to the top oval.
     
  10. Adjust the top gradient using the gradient options => transform tools.
    Place the white vertical line just off (right) center in the main part of the shape. with black way off the image. Rotate the gradient so the center white is going from the off center line on the main fill part back to the opposite side ( like 5 and 11 o'clock, or 7 and 1 o'clock.)
     
  11. Highlight all and click INSERT => convert to symbol. Call it base
C. Animating the Lava
Creating the Lava Shape change.
  1. Create a new symbol. Call it lava and select movie clip.
  2. Create an oval shape using the Oval Tool of in Frame one of Layer 1.
  3. Highlight the oval and click on Insert=> convert to symbol. Call it Lava Stop.
  4. Step back in your movie clip by clicking Edit => Undo to back up so that your oval is no longer a symbol.
  5. Highlight frame 25. Right click on Frame 25 and select INSERT  KEYFRAME.
  6. Right click on Frame 60 and select INSERT  KEYFRAME.
  7. Click on Frame 25. Edit the shape in Frame 25 to an odd shape like a horseshoe by bending the stroke lines.
  8. Click on Frame 1 and open your properties inspectorl by clicking windows => properties. Select tweening = shape. Do the same for frame 15.
Creating the Lava Movement.
  1. Create a New Symbol and call it Moving Lava. Set this as a Movie clip. Open this symbol.
  2. In Frame 1 drag the Lava Symbol from the library to your stage
  3. Right click on frame 30 and insert a KEYFRAME.
  4. Right click on frame 45 and insert a KEYFRAME.
  5. Right click on Frame 60 and Insert KEYFRAME
  6. Right click on frame 75 and insert a KEYFRAME.
  7. Right click on frame 100 and insert KEYFRAME
  8. Right click on Frame 120 and Insert KEYFRAME.
  9. Click on frame 45. Highlight the image and using the move tool, move it to the top of your bulb image. Align the lava from frame 60 in the same location.
  10. On frames  30 and 75 you will resize the image to a very narrow and long image so it nearly fills the bulb inb height, but has gotten narrow in width.
  11. Select the frame properties of Motion tween for frames 1, 30, 60, 75.
Creating a Second Lava Movement
  1. Open your library by clicking Windows => Library
  2. Right click on the symbol Moving Lava and select duplicate. Name this Moving Lava 2.
  3. Open the symbol moving lava 2 to edit it.
  4. We will need to have a second lava on a different time interval then the first.
  5. Highlight frame 1. Click the menu Edit => Copy. Grab the dot representing a keyframe for frame1 and drag it to frame2.
  6. Click back on frame 1 and select edit paste in place.
  7. While frame 1 is highlighted, insert frames by hitting the F5 key about 35 or more times.
  8. Now you are ready to construct your movie.
D. Construct the movie
Setting up your layers
  1. Clean off all symbols from your main movie stage.
  2. Rename layer1 BASE
  3. Insert a layer and call it Bottom Bulb
  4. Insert a layer above that called lava1
  5. Insert a layer above that called lava2
  6. Insert a layer above that called top bulb and top
  7. Insert a layer above that called Labels
  8. Insert a layer above that called Actions
.FRAME 1: Creating the lava lamp in the OFF state.
  1. The first frame will be your lava lamp when it is off. Click on frame 1 layer 1 and drag the base into this frame.
  2. Click on layer bottom bulb, frame1, and place the bulb on top the base. Resize the base as needed. highlight the bulb and opent he effects panel. Set tint to black at 50%
  3. Click on lava2 layer frame 1 and drag the "lava stop" symbol onto the stage. position it atop the base. Resize as needed.
  4. Click on layer 1 of frame top bulb and top. Drag the bulb from the library onto the stage and position it above the bulb. You may want to highlight both and use the align tool to orient them in identical positions. Lock the bottom bulb layer and click on the bulb. Open the effects panel and Set the alpha to 37.
  5. Drag the base onto the stage and resize it to fit the top of the lamp.
  6. On frame 1 of the labels layer set the FRAME name to OFF.
  7. On frame 1 of actions insert an action of STOP by pulling up the actions panel (windows => actions) click the + symbol and then basic actions => stop.
FRAME 2: Creating the lava lamp in the ON state.
  1. Click on the base frame 2. Hit your F5 key. This will insert another frame into the keyframe on 1
  2. Click on Frame 2 of the bottom bulb layer and then hit F6. This will insert a new keyframe exactly like the one before it. click elswhere on the stage.
  3. Click directly on the bulb to select the symbol. Open your properties inspector. Set color to Advanced. Click on the settings button to bring up the advanced settings. Set the values as follows
    1. R 51
    2. G 255
    3. B 0
    4. Alpha 47%

  4. Click on Frame 2 of the lava 1 panel and drag moving lava 1 there. Double click the symbole and ajust the frames for the height of the Lamp bulb.
  5. Click on Frame 2 of lava 2 and drag the moving lava there. Align both lava using onion skinning to where the lava stop is on frame1.
  6. On frame 2 of  the top bulb and top, hit the F5 key.
  7. On the labels layer on frame two insert Blank Keyframe and on the frames panel, name it ON.
  8. On the actions layer for frame two, insert a Blank Keyframe, and then add a stop action like described above.
Now you are ready to make and script the button.

Creating the control mechanism/buttonMaking a button.
1. Select frame 1 of the bottom bulb layer.  Select the Rectangle tool.
2. Set the fill color to be the green radial gradient on the bottom of the color palette. Select the line color as black.
3. Draw a rectangle on the stage where it is blank.
4. Using your arrow tool, highlight the rectangle and select the menu Insert => convert to symbol. Call it Button and select the property of button for this symbol.
5. Double click on the button symbol on the stage. In the Button, right click on the second frame and INSERT KEYFRAME. Click on the fourth frame and hit your F5 key.
6. On Frame number two, highlight the button and select the fill color of the white to black radial fill color.
7. Double click on the stage to bring you back to the movie.
8. Highlight just the button on the stage, select edit=>copy.
9. Click on frame 2 of the bottom bulb layer. Select Edit Paste in Place.
Action Scripting the button.
1. Click on the button on frame 1 to select it. Open your actions panel by clicking the menu window=> actions.
2. Click the + symbol on the actions panel and select actions=> Movie Control=> goto..
3. Select the following settings
  • Select GotoAnd Stop
  • type = frame label
  • frame = off

4. Click on frame 2, and highlight the button.
5.Click the + symbol on the actions panel and select actions=> Movie Control=> goto.
6. Select the following settings
  • Select GotoAnd Stop
  • type = frame label
  • frame = off


7. Publish your movie.

Shape Tween Vortex


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.

Learning PHP, MySQL, and JavaScript Free downloaded pdf book

Learning PHP, MySQL, and
JavaScript


The combination of PHP and MySQL is the most convenient approach to dynamic, database-driven web design, holding its own in the face of challenges from integrated frameworks—such as Ruby on Rails—that are harder to learn. Due to its open source roots (unlike the competing Microsoft .NET framework), it is free to implement and is therefore an extremely popular option for web development.
Any would-be developer on a Unix/Linux or even a Windows/Apache platform will need to master these technologies. At the same time, the JavaScript is important, as it provides the hidden communication with the web server to create seamless interfaces.

With PHP, it’s a simple matter to embed dynamic activity in web pages. When you give
pages the .php extension, they have instant access to the scripting language. From a
developer’s point of view, all you have to do is write code such as the following:
echo "Hello World. Today is ".date("l").". ";
?>
How are you?
The opening
following code up to the ?> command. Outside of this construct, everything is sent to
the client as direct HTML. So the text “How are you?” is simply output to the browser;
within the PHP tags, the built-in date function displays the current day of the week
according to the server’s system time.
The final output of the two parts looks like this:
Hello World. Today is Wednesday. How are you?

PHP is a flexible language, and some people prefer to place the PHP construct directly
next to PHP code, like this:
Hello World. Today is . How are you?
There are also other ways of formatting and outputting information, which I’ll explain
in the chapters on PHP. The point is that with PHP, web developers have a scripting
language that although not as fast as compiling your code in C or a similar language,
is incredibly speedy and that also integrates seamlessly with HTML code.




Perl Cookbook free downloaded

Perl Cookbook freely available here


Tom Christiansen and Nathan Torkington

Many programming languages force you to work at an uncomfortably low level. You think in lines, but your language wants you to deal with pointers. You think in strings, but it wants you to deal with bytes. Such a language can drive you to distraction. Don’t despair; Perl isn’t a low-level language, so lines and strings are easy to handle.
Perl was designed for easy but powerful text manipulation. In fact, Perl can manipulate text in so many ways that they can’t all be described in one chapter. Check out other chapters for recipes on text processing. In particular, see Chapters 6 and 8, which discuss interesting techniques not covered here. 
Perl’s fundamental unit for working with data is the scalar, that is, single values stored in single (scalar) variables. Scalar variables hold strings, numbers, and references. Array and hash variables hold lists or associations of scalars, respectively. References are used for referring to values indirectly, not unlike pointers in low-level languages. 
Numbers are usually stored in your machine’s double-precision floating point notation. Strings in Perl may be of any length, within the limits of your machine’s virtual memory, and can hold any arbitrary data you care to put there— even binary data containing null bytes.
A string in Perl is not an array of characters—nor of bytes, for that matter. You cannot use array subscripting on a string to address one of its characters; use substr for that. Like all data types in Perl, strings grow on demand. Space is reclaimed by Perl’s garbage collection system when no longer used, typically when the variables have gone out of scope or when the expression in which they were used has been evaluated.
In other words, memory management is already taken care of, so you don’t have to worry about it.


Total Pageviews