Thursday, October 3, 2013

Lesson 10

SOUND

One of Flash's hidden strengths is that it can consistently and reliably play back sound across a wide variety computer plateforms and environments. Flash works with a variety of sound formats, including WAV, AIFF & MP3 files. MP3 is the best format because it produces smaller files while maintaining excellent sound quality.

Crontrolling sound with On/Off buttons using:-
- Behaviors
- Action Scripts

Control with OFF button using Behaviors:
  • On the Timeline, insert new layer & name it buttons. Drag the buttons (must first convert to button symbol) to the stage.
  • On the stage, click on the OFF button, go to Window > Behaviors > Sound (change to actions script 2.0) > Stop All Sounds > OK.
  • Choose Control > Test Movie to test the sound OFF button.
Control ON button using Action Scripts:
  • On the Timeline, add new layer & name it actions. Make sure action layer is above all the other layers.
  • Click on Frame 2 of the actions layer, press F5 to add frame, repeat the same step for the rest of layers (for this technique to work, at least two frames on the Timeline).
  • Select Frame 2 on actions layer, press F7 to add a blank keyframe.
  • Press F9 to open Actions panel.
  • Select Global Functions > Timeline Control > double-click the stop action to add it to the Script pane ((this action tells the playhead to stop action to stop when it gets to Frame 2).
  • On the stage, click the ON button to select it. In Actions panel, select Global Functions > Movie Clip Control & double-click the on action to add it to the Script pane. Select Event: Release.
  • Select Global Functions > Timeline Control & double-click the play action to add it to the script pane. (this action tells the playhead to move to the next frame, which is Frame 1, causing the sound to begin to play again.

VIDEO

Flash can import video in the most popular file formats including MOV, AVI, MPG/MPEG, WMV. If the file format not supported, use Adobe Media Encoder for conversion.

Import video with playback component
  • Import video > On your computer > Load external video with playback component > File path Browse > (select the video file location)  Next > Skinning (can change the colour of controller & type of skin) > Next > Finish Video Import.
  • Video that do not support flash were required to convert video file to FLV or F4V format. Click on Launch Adobe Media Encoder for conversion.
  • Go back to Load external video with playback component to reselect the FLV/F4V video again.


Video Demo: http://www.youtube.com/watch?v=_6LfWz0QL1M&hl=en-GB&gl=SG

To create simple picture slider in Flash
Video demo:

Further reading:

PUBLISHING & EXPORTING



You test movie in flash using Control > Test Movie to generate a SWF file.
Publishing offers many more options & greater control over the final output

Publish Preview Versus Test Movie

The Publish Preview command gives you the most accurate representation of how your movie will look on the web. The preview you see when use Control > Test Movie does not always appear exactly the same as the published movie appears on a Web server. For example, sound in your movie may vary slightly, and complex animations may animate slightly slower when using Test Movie command. To be safe, use the Publish Preview or Publish command to view the movie before you upload it to the Web.

 
File > Publish Settings > check Publish flash (swf) & check Other Formats HTML
Target > Flash Player 9 (Dreamweaver CS6 doesn't support anything higher than player 9)

 
File > Publish Preview > Default HTML
 

Integrating with Dreamweaver:


 
Create SWF files using Flash and then use Dreamweaver to integrate the SWF file with the required HTML documents.
Open DW doc.

Insert > Media > SWF > select swf file.

No comments:

Post a Comment