advanced actionscript for flash 5 by dr sc li n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Advanced Actionscript for Flash 5 by Dr SC Li PowerPoint Presentation
Download Presentation
Advanced Actionscript for Flash 5 by Dr SC Li

Loading in 2 Seconds...

play fullscreen
1 / 17

Advanced Actionscript for Flash 5 by Dr SC Li - PowerPoint PPT Presentation


  • 107 Views
  • Uploaded on

Advanced Actionscript for Flash 5 by Dr SC Li. Exercise 1 (Creating sound objects). Download and unzip the file sound1-ex.zip Open the library window by clicking Windows > Library

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Advanced Actionscript for Flash 5 by Dr SC Li' - thea


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
exercise 1 creating sound objects
Exercise 1(Creating sound objects)
  • Download and unzip the file sound1-ex.zip
  • Open the library window by clicking Windows > Library
  • To establish a linkage for the sound symbol, highlight “technoloop” and right click it and choose the “Linkage” option.
  • To create an action for Frame 1: Highlight Frame 1 and right click it, then choose “Actions”
exercise 1 creating sound objects1
Exercise 1(Creating sound objects)
  • Select the “Expert Mode” for the script editor and type in:
      • function mysound(music){
      • soundobject=new Sound(this);
      • soundobject.attachSound(music);
      • soundobject.start(0,50);
      • soundobject.setVolume(100);
      • }
      • mysound("soundtrack")
exercise 1 creating sound objects2
Exercise 1(Creating sound objects)
  • To select buttons from the Common Libraries, click Windows > Common Libraries > Buttons > (Oval) Button Set
  • Drag the “Oval-stop” and the “Oval-play” symbols on to the main stage
  • To create an action for the stop button: highlight and right-click it, then select “Actions”.
  • On the script editor, type in:
    • on (press){
    • _root.soundobject.stop("soundtrack");
    • }
exercise 1 creating sound objects3
Exercise 1(Creating sound objects)
  • Save and preview the file.
exercise 2 creating simple controls for sound object
Exercise 2 (Creating simple controls for sound object)
  • Download and unzip the file sound2-ex.zip
  • To select buttons from the Common Libraries, click Windows > Common Libraries > Buttons > (Rectangle) Button Set
  • Drag two “Grey-button Play” symbols (volume-up; volume-down) on to the main stage
  • To create actions for the buttons: highlight and right-click it, then select “Actions”.
exercise 2 creating simple controls for sound object1
Exercise 2 (Creating simple controls for sound object)
  • For the volume-up button, type in:
    • on (press){
    • dummy=_root.soundobject.getVolume;
    • _root.soundobject.getTransform();
    • mySoundTransformObject.ll=
    • mySoundTransformObject.ll+10;
    • mySoundTransformObject.rr=
    • mySoundTransformObject.rr+ 10;
exercise 2 creating simple controls for sound object2
Exercise 2 (Creating simple controls for sound object)
  • if(mySoundTransformObject.ll <= 100 && mySoundTransformObject.rr <= 100){
  • _root.soundobject.setTransform(
  • mySoundTransformObject);
  • }
  • }
exercise 2 creating simple controls for sound object3
Exercise 2 (Creating simple controls for sound object)
  • For the volume-down button, type in:
      • on (press){
      • dummy=_root.soundobject.getVolume;
      • _root.soundobject.getTransform();
      • mySoundTransformObject.ll=
      • mySoundTransformObject.ll-10;
      • mySoundTransformObject.rr=
      • mySoundTransformObject.rr- 10;
exercise 2 creating simple controls for sound object4
Exercise 2 (Creating simple controls for sound object)
      • if(mySoundTransformObject.ll >= 0 && mySoundTransformObject.rr >= 0){
      • _root.soundobject.setTransform(
      • mySoundTransformObject);
      • }
      • }
  • Then save and preview the file
exercise 3 creating sound preloader
Exercise 3(Creating sound preloader)
  • Download and unzip the file sound3-ex.zip
  • Create a pre-loading animation while the sound movie clip is being downloaded.
  • Open the “attachsound.fla” file and insert a key fame for Frame 1.
  • Drag the preloading symbol onto the stage and name the instance as “preloader”.
  • Insert an action for the preloader instance:
exercise 3 creating sound preloader1
Exercise 3(Creating sound preloader)
  • onClipEvent(load){
  • loadMovieNum("soundsource3.swf",1)
  • }
  • onClipEvent(enterFrame){
  • percentloaded=Math.floor(
  • (_level1.getBytesLoaded()/
  • _level1.getBytesTotal())*100);
  • percentdisplay=percentloaded + "%”;
exercise 3 creating sound preloader2
Exercise 3(Creating sound preloader)
    • if(percentloaded == 100 && !initialize){
    • _level1.mysound("soundtrack")
    • initialize=true;
    • _visible=false;
    • }
    • }
  • Save and preview the file
exercise 4 creating smart mc movie clip
Exercise 4(Creating smart MC movie clip)
  • Download and unzip the file smart-mc-ex.zip
  • Open the file “smart-mc.fla”and create a smart MC flash movie clip as shown in http://ited.hkubu.edu.hk/hkbu-ited/session5/actions/smart-mc/smart-mc.swf
exercise 5 creating simple scrolling text
Exercise 5(Creating simple scrolling text)
  • Download and unzip the file scrolltext1-ex.zip
  • Open the file “scrolltext1.fla”and create a movie clip with scrolling text as shown in http://ited.hkubu.edu.hk/hkbu-ited/session5/actions/scrolltext1/scrolltext1.swf
exercise 6 creating auto scrolling text 1
Exercise 6(Creating auto scrolling text 1)

Download and unzip the file scrolltext2-ex.zip

  • Open the file “scrolltext2.fla”and create a movie clip with auto-scrolling text as shown in http://ited.hkubu.edu.hk/hkbu-ited/session5/actions/scrolltext2/scrolltext2.swf
exercise 7 creating auto scrolling text 2
Exercise 7(Creating auto scrolling text 2)

Download and unzip the file scrolltext2-ex.zip

  • Open the file “scrolltext3.fla”and create a movie clip with auto-scrolling text as shown in http://ited.hkubu.edu.hk/hkbu-ited/session5/actions/scrolltext2/scrolltext3.swf