Cascading Style Sheets Tutorial

Flash music player can be even more Qu original document release

  Simply say something, I look at the specific source files. 
  1. Into four music files in the library right - link identifiers are: s01 s02 s03 s04 
  2. Do a volume control, and click Control AS: 
  On (press) ( 
  StartDrag (this, true, left, top, right, bottom); 
  ) 
  On (release) ( 
  StopDrag (); 
  ) 
  OnClipEvent (load) ( 
  = _y Top; 
  = _y Bottom; 
  _x Left =; 
  _x Right = 150; 
  _x = 75; 
  ) 
  OnClipEvent (enterFrame) ( 
  _root.mySound.setVolume (_x-Left); 
  ) 3. Audio visual effects do a green rectangular, F8 to films, the name for the entity: line 
  AS the first frame plus: 
  _root.lineMc.line._visible = False; 
  _root.lineMc.onEnterFrame = Function () ( 
  For (var i = 0; i <20; i) ( 
  DuplicateMovieClip ( "line" and "line" i, i); 
  With (_root.lineMc [ "line" i]) ( 
  _x = 4 * i; 
  _y = 0; 
  _yscale = Math.round (Math.random () * 100); 
  ) 
  ) 
  ); 
  Stop (); second frame and AS: 
  _root.lineMc.line._visible = False; 
  _root.lineMc.onEnterFrame = Function () ( 
  For (var i = 0; i <20; i) ( 
  DuplicateMovieClip ( "line" and "line" i, i); 
  With (_root.lineMc [ "line" i]) ( 
  _x = 4 * i; 
  _y = 0; 
  _yscale = 25; 
  ) 
  ) 
  ); 
  Stop (), 4. Placement of all accessories, and the music control buttons entity name: btnPrev btnPlay btnPause btnNext 
  The third step to control the audio visual effects for the name of the entity: lineMc 
  Rafah three dynamic text, variables are: pauseTotalTime soundName txtBtn 
  AS increase in the first frame: 
  I = 1; / / initial value s1 = "Wenbie position - Hacken Lee"; 
  S2 = "kill the phone - Kelly"; 
  S3 = "there is only - Joey Yung." 
  S4 = "kiss the more sad - Jacky Cheung"; 
  MySound = new Sound ();// create Sound object mySound.attachSound ( "s01 ");// call identifier for the links in the audio files s01 mySound.start ();// broadcast mySound.onSoundComplete = function ( ) (/ / Automatic Call i; 
  If (i> 4) ( 
  I = 1; 
  ) 
  MySound.attachSound ( "s0" i); 
  MySound.start (); 
  ); 
  OnEnterFrame = function () ( 
  PauseTimes = Math.round (mySound.position/1000); / / sound files have been broadcast totalTimes = Math.round (mySound.duration/1000); / / sound files total time pauseTotalTime = pauseTimes "s", "/" totalTimes " s "; 
  SoundName = eval ( "s" i); / / simulation trace array (pauseTotalTime); 
  Trace (i); 
  ); 
  Var song = true; / / declare a variable, the song is true that the voices of documents are being broadcast btnPlay.onRelease = function () ( 
  If (song == false) ( 
  MySound.start (pauseTimes); / / Seconds suspended from the broadcast song = true; 
  ) 
  _root.lineMc.gotoAndStop (1); 
  ); 
  BtnPause.onRelease = function () ( 
  If (song == true) ( 
  PauseTimes = Math.round (mySound.position/1000); 
  MySound.stop ();// suspended players song = false; 
  ) 
  _root.lineMc.gotoAndStop (2); 
  ); 
  BtnNext.onRelease = function () ( 
  I; 
  If (i> 4) ( 
  I = 1; 
  ) 
  MySound.stop (); 
  MySound.attachSound ( "s0" i); 
  MySound.start (); 
  _root.lineMc.gotoAndStop (1); 
  ); 
  BtnPrev.onRelease = function () ( 
  I -; 
  If (i <1) ( 
  I = 4; 
  ) 
  MySound.stop (); 
  MySound.attachSound ( "s0" i); 
  MySound.start (); 
  _root.lineMc.gotoAndStop (1); 
  ); 
  BtnPrev.onRollOver = function () ( 
  _root.txtBtn = "1"; 
  ); 
  BtnPlay.onRollOver = function () ( 
  _root.txtBtn = "Player"; 
  ); 
  BtnPause.onRollOver = function () ( 
  _root.txtBtn = "Suspended"; 
  ); 
  BtnNext.onRollOver = function () ( 
  _root.txtBtn = "Next first"; 
  ); 
  BtnPrev.onRollOut = function () ( 
  _root.txtBtn = ""; 
  ); 
  BtnPlay.onRollOut = function () ( 
  _root.txtBtn = ""; 
  ); 
  BtnPause.onRollOut = function () ( 
  _root.txtBtn = ""; 
  ); 
  BtnNext.onRollOut = function () ( 
  _root.txtBtn = ""; 
  ); 

  If that much paper can be read loadSound attachSound, external load music files, for the partial revision of the code, the same principle. 
  The document, occupation of source files to delete music files.    Open source files, import sound files of four, plus links identifier.    Original documents: 

  Click here to download the source files 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • DotNetKicks
  • DZone

Popular Articles

  • Tapestry Spring + + + CSS + Ibatis Ajax == Chinese version of Digg
  • Dreamweaver MX 2004 Guide outlines the use of CSS
  • Flash MX 2004 Video Collection Guide (9) was born chicken
  • Flash sync the lyrics a significant player code
  • Fireworks easily drawn animation banner advertising

This entry was posted on Sunday, September 30th, 2007 at 12:00 am and is filed under Css+Div Web Design. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Louver effects animation, Flash production methods without AS
Flash production of rolling buffer zone »

Leave a Reply

  • Categories

    • CSS Properties (491)
    • CSS Tutorial (1154)
    • CSS Tutorial By Examples (1201)
    • Css+Div Web Design (3274)
    • Xhtml and Web Design (1797)
  • Archives

    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • June 2007
    • May 2007
    • April 2007
    • March 2007
    • February 2007
    • January 2007
  • Pages

    • About us

Cascading Style Sheets Tutorial