/[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

Annotation of /E_viewer.sc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Fri Feb 22 12:18:45 2008 UTC (16 years, 2 months ago) by dpavlin
File size: 5933 byte(s)
import upstream version from
http://technoargia.free.fr/swftools/examples/extended_viewer/E_viewer.html
1 dpavlin 1 ################################################### #
2     # Extended viewer
3     #
4     # http://technoargia.free.fr/swftools/ - june 17 - 2006 #
5     ###################################################
6    
7     .flash filename=E_viewer.swf bbox=100x50
8    
9     .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
11     .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
13     .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
16    
17     .outline o_cadre:
18    
19     M 12.3,-1.2483537
20     L 40.130855,-1.2483537
21     C 46.945055,-1.2483537 52.430855,4.2374464 52.430855,11.051646
22     L 52.430855,123.77055
23     C 52.430855,130.58475 46.945055,136.07055 40.130855,136.07055
24     L 12.3,136.07055 C 5.4858001,136.07055 0,130.58475 0,123.77055
25     L 0,11.051646 C 0,4.2374464 5.4858001,-1.2483537 12.3,-1.2483537 z
26    
27     .end
28     .outline o_arrow:
29    
30     M 60.208843,38.698967
31     L 97.86712,38.698967
32     C 97.86712,38.698967 96.176907,25.416467 101.5254,22.698967
33     C 106.94202,19.946851 132.17198,46.056049 131.84195,55.551743
34     C 131.50046,65.377079 105.79971,91.679067 101.5254,88.404518
35     C 97.332023,85.191969 97.86712,72.404518 97.86712,72.404518
36     L 60.208843,72.404518
37     C 57.438843,72.404518 55.208843,70.174518 55.208843,67.404518
38     L 55.208843,43.698967
39     C 55.208843,40.928967 57.438843,38.698967 60.208843,38.698967 z
40    
41     .end
42    
43     .outline o_home:
44    
45     M -53.886767,76.403498
46     L -53.886767,34.745221
47     C -53.886767,34.745221 -63.829917,35.216428 -63.886767,31.086941
48     C -63.943617,26.792438 -48.173573,15.507804 -48.173573,15.507804
49     L -48.460379,-0.8375205
50     L -39.603782,-0.8609028
51     L -39.441205,10.503755
52     C -39.441205,10.503755 -33.561078,0.91501123 -25.033991,0.770391
53     C -16.671921,0.62577077 10.039242,25.68734 11.818784,31.086941
54     C 13.581482,36.435434 1.818784,34.745221 1.818784,34.745221
55     L 1.818784,76.403498
56     C 1.818784,79.173498 -0.411216,81.4035 -3.181216,81.4035
57     L -48.886767,81.4035
58     C -51.656767,81.4035 -53.886767,79.173498 -53.886767,76.403498 z
59    
60     .end
61    
62     .filled home_idle outline=o_home fill=#336699 color=navy line=4
63     .filled home_hover outline=o_home fill=#3366ff color=salmon line=4
64     .filled home_pressed outline=o_home fill=#4466ff color=red line=3
65    
66     .filled arrow_idle outline=o_arrow fill=#336699 color=navy line=4
67     .filled arrow_hover outline=o_arrow fill=#3366ff color=salmon line=4
68     .filled arrow_pressed outline=o_arrow fill=#4466ff color=red line=3
69    
70     .filled cadre_menu outline=o_cadre fill=salmon color=grey line=3
71    
72     .button next
73    
74     .show arrow_idle as=idle
75     .show arrow_idle as=area
76     .show arrow_hover as=hover
77     .show arrow_pressed as=pressed
78     # ActionScript
79     .on_release:
80     _root.viewport.nextFrame();
81     _root.updateInfo();
82     .end
83    
84     .end
85    
86     .button prev
87    
88     .show arrow_idle as=idle
89     .show arrow_idle as=area
90     .show arrow_hover as=hover
91     .show arrow_pressed as=pressed
92     # ActionScript
93     .on_release:
94     _root.viewport.prevFrame();
95     _root.updateInfo();
96     .end
97    
98     .end
99    
100     .button home
101    
102     .show home_idle as=idle
103     .show home_idle as=area
104     .show home_hover as=hover
105     .show home_pressed as=pressed
106     # ActionScript
107     .on_release:
108     _root.viewport.gotoAndStop(1);
109     _root.updateInfo();
110    
111     /* you can change to your home frame number */
112     .end
113    
114     .end
115    
116     .button menu_left
117    
118     .show border_left as=area alpha=0%
119     .on_move_in :
120     showMenu();
121     .end
122    
123     .end
124    
125     .sprite viewport
126    
127     # slave movie go here
128     .end
129    
130     .put viewport
131     .put menu_left
132    
133     .sprite C_menu
134    
135     .put cadre_menu y=5 alpha=90%
136     .put home pin=center x=25 y=28 scale=40% alpha=50%
137     .put prev pin=center x=25 y=65 scale=40% alpha=50% rotate=180
138     .put next pin=center x=25 y=95 scale=40% alpha=50% rotate=0
139    
140     .end
141    
142     .sprite s_menu
143     .frame 1
144    
145     .put C_menu x=-60
146     .put info x=-65 y=110 alpha=50%
147    
148     .frame 40
149    
150     .change C_menu x=5
151     .change info x=0
152     .stop
153    
154     .frame 80
155    
156     .change C_menu x=-60
157     .change info x=-65
158     .stop
159    
160     .end
161    
162     .action:
163    
164     _root.viewport.stop();
165     _root.createEmptyMovieClip("menu",500);
166     _root.attachMovie("s_menu","menu",500);
167    
168     info._alpha = 50;
169     info.embedFonts = 0;
170     var monStyle = new TextFormat();
171     monstyle.bold = false;
172     monStyle.italic = false;
173     monStyle.border = false;
174     monStyle.font = "_sans";
175     _root.menu.info.setTextFormat(monStyle);
176    
177     _root.menu.infoText = "Page\r" + String(_root.viewport._currentframe) + "/" + String(_root.viewport._totalframes);
178    
179     function showMenu() {
180     _root.menu._y = _root.viewport._ymouse - 60;
181     if(_root.menu._y < 0) {
182     _root.menu._y = 0;
183     };
184     _root.menu.Play();
185     };
186    
187     function updateInfo() {
188     _root.menu.infoText = "Page\r" + String(_root.viewport._currentframe) + "/" + String(_root.viewport._totalframes);
189     };
190    
191     // Actionscript évènements touches
192    
193     waitouches = new Object();
194     waitouches.onKeyDown = function () {
195     keydownrun=true;
196     _root.kd=Key.getCode();
197     switch(Key.getCode()) {
198     case 40: //Key.DOWN:
199     _root.viewport.nextFrame();
200     updateInfo();
201     break;
202     case 38: //Key.UP:
203     _root.viewport.prevFrame();
204     updateInfo();
205     break;
206     case 33: //Page précédente:
207     numPage = _root.viewport._currentframe - 5;
208     if(numPage < 1) {
209     _root.viewport.gotoAndStop(1);
210     } else {
211     _root.viewport.gotoAndStop(numPage);
212     };
213     updateInfo();
214     break;
215     case 34: //Page suivante:
216     numPage = _root.viewport._currentframe + 5;
217     if(numPage > _root.viewport._totalframes) {
218     _root.viewport.gotoAndStop(_root.viewport._totalframes);
219     } else {
220     _root.viewport.gotoAndStop(numPage);
221     };
222     updateInfo();
223     break;
224     case 35: //Key.End:
225     _root.viewport.gotoAndStop(_root.viewport._totalframes);
226     updateInfo();
227    
228     break;
229     case 36: //Key.Home:
230     _root.viewport.gotoAndStop(1);
231     updateInfo();
232    
233     break;
234     case 37: //Key.left:
235     ShowMenu();
236     break;
237     case 39: //Key.Right:
238     ShowMenu();
239     break;
240    
241     }
242     updateAfterEvent();
243     };
244    
245     Key.addListener(waitouches);
246    
247     .end
248    
249     .end

  ViewVC Help
Powered by ViewVC 1.1.26