Training

"Winners make choices,
losers make excuses.
"
Decide to be a Winner!!!!

±Arrows Getting Started

± Phase 1
Planning

± Website Tools

± Phase 3
Conceptual Design

± Helpful Information

± Phase 4
Physical Design

± Phase 5
Testing

± Phase 6
Implement and Market Website

± Other Web Development Items

± Multimedia

± Useful Utilities

± Programming

± Advanced Programming

± Microsoft Office Products

± Computer Maintenance

± Other


Web Design

NOTE: This is a collection of information and links collected over the years that might provide useful information. A Safer Company LLC does not guarantee, endorse or approve any of these links or their scripts. Use these links to other websites at your own risk.

Flash - Adding Sound Example

Open Adobe Flash and Ctrl n to create a new movie using ActionScript 2.0:
open flash

Create Buttons

  1. Create 2 buttons: play button and stop button
  2. Go to Insert > New Symbol
  3. Name the new symbol play button and make sure the Type is Button
  4. Select the rectangular tool and draw a button. The example below used:
    • the Rectangle Options to give the curved corners
    • the stroke is blue
      button
  5. In the timeline at the bottom of the screen, buttons can have 4 states:
    • Up - The button
    • Over - when you mouse over the button
    • Down - when you click on the button
    • Hit - the area that allows you to click
  6. Click on Over and F6 to give a keyframe. Click on the button and change the property so it will look different when you mouse over the button.
    over
  7. Do the same for Down. Make sure you add a keyframe (F6).
  8. Hit is the area when you can click. Remember to use F6 to add a keyframe.Tthis area should be a little larger than the button to make it easy to click.
    hit
  9. Add a new layer by clicking the icon at the bottom of the Timeline; Use the Text tool to add the word "Play" to the button, Rename the layers using meaningful names.
    new layer
  10. Click on Scene 1 (see above) to return to the stage.
  11. In the Library panel, right click on the Play button and select Duplicate
    duplicate button
  12. Rename the button "stop button"
    stop button
  13. There should be two items in the Library.
  14. Double click on the button icon beside the stop button to open the symbol so it can be modified
    modify button
  15. Make sure the text layer is selected and change the word to be "Stop".
  16. Return to Scene 1.

top of page

Import the Sound

  1. Import the audio file: File > Import > Import to Library
    import audio
  2. Find your mp3 file and Open it
  3. You should see 3 items in the Library panel:
    • sound
    • stop button
    • play button

top of page

Identify the Sound

  1. Right click on your sound file and select Properties
  2. Give the sound an Identifier of music and make sure Export for ActionScript and Export in Frame1 are checked. This enables it to be called and used by ActionScript code.

top of page

Add Keyframes and Buttons to Stage

  1. Create a new layer on your stage.
  2. In frame one add a keyframe by selecting your frame 1 and pressing F6. Press F6 two more times to add keyframes in frame 2 and 3. You will see three circles in each frame.
  3. Click on Layer 2 Frame 2 and drag the play button from the Library to the stage. In the Properties panel, give it the name play. This is the name of the frame that the ActionScript will go to.
  4. Click on Layer 2 Frame 3 and drag the stop button from the Library to the stage. In the Properties panel, give it the name stop. This is the name of the frame that the ActionScript will go to,

top of page

Adding ActionScript

  1. Go to Window > Action to open the action panel.
  2. Make sure the Script Assistant is not active.
  3. Click the first keyframe and copy and paste this actionscript into the Actions - Frame panel.

    NOTE: music is the name Identifier that you gave to your music file.
  4. Go to the second keyframe and copy and paste this actionscript into the Action panel.
    stop()
    frame 2 stop
  5. Go to the third keyframe and copy and paste this actionscript into the Action panel.
    stop()
  6. In the second frame, select the play button on the stage and copy and paste the following actionscript into the actions panel.

    NOTE: This tells the Flash movie to start the sound when you release this button and go to the frame in the timeline named stop.
  7. In the third frame, select the stop button on the stage and copy and paste the following actionscript into the actions panel.

    NOTE: This tells the Flash movie to stop the sound when you release this button and go to the frame in the timeline named play.

top of page

Test the Movie

  1. Play your movie - Ctrl Enter.

    Content on this page requires a newer version of Adobe Flash Player.

    Get Adobe Flash player

  2. Download Example Flash File and SAVE to your computer - Then change the extension from .doc to .fla and open in Flash.

top of page

Page last updated: May 31, 2012 10:52 AM

It is all about:
Content and Navigation...

Web Site by: A Safer Company LLC