/[flash]/E_viewer.sc
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /E_viewer.sc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by dpavlin, Fri Feb 22 12:18:45 2008 UTC revision 2 by dpavlin, Fri Feb 22 12:23:54 2008 UTC
# Line 1  Line 1 
1  ################################################### #  ####################################################
2  # Extended viewer  # Extended viewer
3  #  #
4  # http://technoargia.free.fr/swftools/ - june 17 - 2006 #  # http://technoargia.free.fr/swftools/ - june 17 - 2006
5  ###################################################  ###################################################
6    
7  .flash filename=E_viewer.swf bbox=100x50  .flash filename=E_viewer.swf bbox=100x50
# Line 9  Line 9 
9          .box button_idle width=20 height=60 color=blue fill=salmon line=5          .box button_idle width=20 height=60 color=blue fill=salmon line=5
10          .box button_hover width=20 height=60 color=red fill=salmon line=6          .box button_hover width=20 height=60 color=red fill=salmon line=6
11          .box button_pressed width=20 height=60 color=gray fill=salmon line=5          .box button_pressed width=20 height=60 color=gray fill=salmon line=5
12  #       .box cadre_menu width=50 height=150 color=navy fill=salmon line=2  #       .box cadre_menu width=50 height=150 color=navy fill=salmon line=2
13          .box border_left width=5 height=800 color=gray fill=white line=3          .box border_left width=5 height=800 color=gray fill=white line=3
14    
15          .edittext info text="info" color=black size=100% width=60 height=60 align=center border=none noselect variable=infoText          .edittext info text="info" color=black size=100% width=60 height=60 align=center border=none noselect variable=infoText
# Line 145  Line 145 
145          .put C_menu x=-60          .put C_menu x=-60
146          .put info x=-65 y=110 alpha=50%          .put info x=-65 y=110 alpha=50%
147    
148  .frame 40  .frame 4
149    
150          .change C_menu x=5          .change C_menu x=5
151          .change info x=0          .change info x=0
152          .stop          .stop
153    
154  .frame 80  .frame 8
155    
156          .change C_menu x=-60          .change C_menu x=-60
157          .change info x=-65          .change info x=-65
# Line 159  Line 159 
159    
160  .end  .end
161    
162    # ActionScript
163  .action:  .action:
164            // ECMA comments from here!
165    
166          _root.viewport.stop();          _root.viewport.stop();
167          _root.createEmptyMovieClip("menu",500);          _root.createEmptyMovieClip("menu",500);
# Line 168  Line 170 
170          info._alpha = 50;          info._alpha = 50;
171          info.embedFonts = 0;          info.embedFonts = 0;
172          var monStyle = new TextFormat();          var monStyle = new TextFormat();
173          monstyle.bold = false;          monstyle.bold = true;
174          monStyle.italic = false;          monStyle.italic = false;
175          monStyle.border = false;          monStyle.border = false;
176          monStyle.font = "_sans";          monStyle.font = "_sans";
177          _root.menu.info.setTextFormat(monStyle);          _root.menu.info.setTextFormat(monStyle);
178    
         _root.menu.infoText = "Page\r" + String(_root.viewport._currentframe) + "/" + String(_root.viewport._totalframes);  
   
179          function showMenu() {          function showMenu() {
180           _root.menu._y = _root.viewport._ymouse - 60;           _root.menu._y = _root.viewport._ymouse - 60;
181            if(_root.menu._y < 0) {            if(_root.menu._y < 0) {
# Line 185  Line 185 
185          };          };
186                    
187          function updateInfo() {          function updateInfo() {
188            _root.menu.infoText = "Page\r" + String(_root.viewport._currentframe) + "/" + String(_root.viewport._totalframes);            _root.menu.infoText = String(_root.viewport._currentframe) + " / " + String(_root.viewport._totalframes);
189          };          };
190    
191            updateInfo();
192    
193          // Actionscript évènements touches          // Actionscript évènements touches
194    
195          waitouches = new Object();          waitouches = new Object();
# Line 203  Line 205 
205                           _root.viewport.prevFrame();                           _root.viewport.prevFrame();
206                           updateInfo();                           updateInfo();
207                          break;                          break;
208                  case 33: //Page précédente:                  case 33: // PageUp
209                          numPage = _root.viewport._currentframe - 5;                          numPage = _root.viewport._currentframe - 5;
210                          if(numPage < 1) {                          if(numPage < 1) {
211                          _root.viewport.gotoAndStop(1);                                  _root.viewport.gotoAndStop(1);
212                          } else {                          } else {
213                          _root.viewport.gotoAndStop(numPage);                                  _root.viewport.gotoAndStop(numPage);
214                          };                          };
215                          updateInfo();                          updateInfo();
216                          break;                          break;
217                  case 34: //Page suivante:                  case 34: // PageDown
218                          numPage = _root.viewport._currentframe + 5;                          numPage = _root.viewport._currentframe + 5;
219                          if(numPage > _root.viewport._totalframes) {                          if(numPage > _root.viewport._totalframes) {
220                          _root.viewport.gotoAndStop(_root.viewport._totalframes);                                  _root.viewport.gotoAndStop(_root.viewport._totalframes);
221                          } else {                          } else {
222                          _root.viewport.gotoAndStop(numPage);                                  _root.viewport.gotoAndStop(numPage);
223                          };                          };
224                          updateInfo();                          updateInfo();
225                          break;                          break;
# Line 232  Line 234 
234    
235                          break;                          break;
236                  case 37: //Key.left:                  case 37: //Key.left:
237                          ShowMenu();  //                      ShowMenu();
238                             _root.viewport.prevFrame();
239                             updateInfo();
240                          break;                          break;
241                  case 39: //Key.Right:                  case 39: //Key.Right:
242                          ShowMenu();  //                      ShowMenu();
243                             _root.viewport.nextFrame();
244                             updateInfo();
245                          break;                          break;
246    
247          }          }

Legend:
Removed from v.1  
changed lines
  Added in v.2

  ViewVC Help
Powered by ViewVC 1.1.26