home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Effects / ActionScript / Scale / ElectronicWave.sqe < prev    next >
Encoding:
Text File  |  2004-06-14  |  2.4 KB  |  89 lines

  1. ========== Description Part Begin ==========
  2. name = "Electronic Wave";
  3. description = "The sizes of characters are changed regularly.";
  4. version = "1.00";
  5. bin = "ElectronicWave.bin";
  6. ========== Description Part End ==========
  7.  
  8. ========== Parameter Part Begin ==========
  9. $nCharacterCount(EDIT,INT,1,1 10000,"Total Characters ","The total characters using the special effect. The value is defined by the selected characters in the movie, but can not be changed in the property box.");
  10. $nFrameCount(EDIT,INT,3,3 3,"Total Frames","It indicates the total frames of actions. The total frames of the effect is probably more than it.");
  11.  
  12. $nSpeed(EDIT,INT,10,1 10000,"Speed","To control the speed of changing the character size.");
  13. $nSizeMax(EDIT,INT,400,1 10000,"Max Size","The maximum size that a character will change into.");
  14. $nSizeMin(EDIT,INT,100,1 10000,"Mini Size","The minimum size that a character will change into.");
  15. $nInterval(EDIT,INT,6,1 10000,"Interval","The time difference between the former character and the latter one beginning to change.");
  16.  
  17. ========== Parameter Part End ==========
  18.  
  19. ========== Function Part Begin ==========
  20. nCharacterCount = 8;
  21. nFrameCount = 8;
  22. nSpeed = 10;
  23. nSizeMax = 400;
  24. nSizeMin = 100;
  25. nInterval = 6;
  26.  
  27.  
  28.  
  29. nIsRun = new Array(nCharacterCount);
  30. nMode = new Array(nCharacterCount);
  31.  
  32. for (i = 1; nCharacterCount >= i; i++)
  33. {
  34.     this["c" + i]._alpha = 100;
  35.     this["c" + i]._rotation = 0;
  36.     //this["c" + i]._xscale = 100;
  37.     //this["c" + i]._yscale = 100;
  38.     if(i == 1)
  39.         nIsRun[0] = nInterval;
  40.     else
  41.     {
  42.         nIsRun[i - 1] = nIsRun[i - 2];
  43.         nIsRun[i - 1] += nInterval ;
  44.     }
  45.     nMode[i - 1] = true;
  46.     
  47. }
  48.  
  49.  
  50. function fun()
  51. {
  52.     for (i = 1; nCharacterCount >= i; i++)
  53.     {
  54.         if (nIsRun[i - 1] <  0)
  55.         {
  56.             if(nMode[i - 1])
  57.             {
  58.                 this["c" + i]._yscale += nSpeed;
  59.                 if(this["c" + i]._yscale >= nSizeMax)
  60.                     nMode[i -1]  = false;
  61.             }
  62.             else
  63.             {
  64.                 this["c" + i]._yscale -= nSpeed;
  65.                 if(this["c" + i]._yscale <= nSizeMin)
  66.                     nMode[i -1]  = true;
  67.             }
  68.             
  69.         } 
  70.         else
  71.         {
  72.             nIsRun[i - 1] --;
  73.         }
  74.     } 
  75.  
  76.  
  77. function again()
  78. {
  79.     gotoAndPlay(2);
  80. }
  81.  
  82. ========== Function Part End ==========
  83.  
  84. ========== Frame Part Begin ==========
  85. $frame(fun,1,-1,"fun");
  86. $frame(fun,2,-1,"fun");
  87. $frame(again,3,-1,"again");
  88. ========== Frame Part End ==========