/[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 7 - (hide annotations)
Fri Feb 22 14:18:32 2008 UTC (16 years, 2 months ago) by dpavlin
File size: 6277 byte(s)
fade in/out menu
1 dpavlin 2 ####################################################
2 dpavlin 1 # Extended viewer
3     #
4 dpavlin 2 # http://technoargia.free.fr/swftools/ - june 17 - 2006
5 dpavlin 1 ###################################################
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 dpavlin 2 # .box cadre_menu width=50 height=150 color=navy fill=salmon line=2
13 dpavlin 5 .box border_left width=10 height=300 color=gray fill=gray line=3
14 dpavlin 1
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 dpavlin 5 .button hide
117    
118     .show home_idle as=idle
119     .show home_idle as=area
120     .show home_hover as=hover
121     .show home_pressed as=pressed
122     # ActionScript
123     .on_release:
124     showMenu();
125     .end
126    
127     .end
128    
129 dpavlin 1 .button menu_left
130    
131 dpavlin 5 .show border_left as=area alpha=50%
132 dpavlin 1 .on_move_in :
133     showMenu();
134     .end
135    
136     .end
137    
138     .sprite viewport
139    
140     # slave movie go here
141     .end
142    
143     .put viewport
144 dpavlin 7 # .put menu_left
145 dpavlin 1
146     .sprite C_menu
147    
148 dpavlin 7 .put cadre_menu x=5 y=5 alpha=90%
149 dpavlin 1 .put home pin=center x=25 y=28 scale=40% alpha=50%
150     .put prev pin=center x=25 y=65 scale=40% alpha=50% rotate=180
151     .put next pin=center x=25 y=95 scale=40% alpha=50% rotate=0
152 dpavlin 5 .put hide pin=center x=25 y=125 scale=20% alpha=50% rotate=0
153 dpavlin 1
154     .end
155    
156     .sprite s_menu
157     .frame 1
158    
159 dpavlin 7 .put C_menu alpha=0%
160     .put info alpha=0%
161 dpavlin 1
162 dpavlin 7 .frame 5
163 dpavlin 1
164 dpavlin 7 .change C_menu alpha=100%
165     .change info alpha=100%
166 dpavlin 1 .stop
167    
168 dpavlin 7 .frame 10
169 dpavlin 1
170 dpavlin 7 .change C_menu alpha=0%
171     .change info alpha=0%
172 dpavlin 1 .stop
173    
174     .end
175    
176 dpavlin 2 # ActionScript
177 dpavlin 1 .action:
178 dpavlin 2 // ECMA comments from here!
179 dpavlin 1
180     _root.viewport.stop();
181     _root.createEmptyMovieClip("menu",500);
182     _root.attachMovie("s_menu","menu",500);
183    
184     info._alpha = 50;
185     info.embedFonts = 0;
186     var monStyle = new TextFormat();
187 dpavlin 2 monstyle.bold = true;
188 dpavlin 1 monStyle.italic = false;
189     monStyle.border = false;
190     monStyle.font = "_sans";
191     _root.menu.info.setTextFormat(monStyle);
192    
193     function showMenu() {
194 dpavlin 3 /*
195     _root.menu._y = _root.viewport._ymouse - 60;
196     if(_root.menu._y < 0) {
197     _root.menu._y = 0;
198     };
199     */
200     _root.menu.Play();
201 dpavlin 1 };
202    
203     function updateInfo() {
204 dpavlin 2 _root.menu.infoText = String(_root.viewport._currentframe) + " / " + String(_root.viewport._totalframes);
205 dpavlin 1 };
206    
207 dpavlin 2 updateInfo();
208    
209 dpavlin 1 // Actionscript évènements touches
210    
211     waitouches = new Object();
212     waitouches.onKeyDown = function () {
213     keydownrun=true;
214     _root.kd=Key.getCode();
215     switch(Key.getCode()) {
216     case 40: //Key.DOWN:
217     _root.viewport.nextFrame();
218     updateInfo();
219     break;
220     case 38: //Key.UP:
221     _root.viewport.prevFrame();
222     updateInfo();
223     break;
224 dpavlin 2 case 33: // PageUp
225 dpavlin 1 numPage = _root.viewport._currentframe - 5;
226     if(numPage < 1) {
227 dpavlin 2 _root.viewport.gotoAndStop(1);
228 dpavlin 1 } else {
229 dpavlin 2 _root.viewport.gotoAndStop(numPage);
230 dpavlin 1 };
231     updateInfo();
232     break;
233 dpavlin 2 case 34: // PageDown
234 dpavlin 1 numPage = _root.viewport._currentframe + 5;
235     if(numPage > _root.viewport._totalframes) {
236 dpavlin 2 _root.viewport.gotoAndStop(_root.viewport._totalframes);
237 dpavlin 1 } else {
238 dpavlin 2 _root.viewport.gotoAndStop(numPage);
239 dpavlin 1 };
240     updateInfo();
241     break;
242     case 35: //Key.End:
243     _root.viewport.gotoAndStop(_root.viewport._totalframes);
244     updateInfo();
245    
246     break;
247     case 36: //Key.Home:
248     _root.viewport.gotoAndStop(1);
249     updateInfo();
250    
251     break;
252     case 37: //Key.left:
253 dpavlin 2 // ShowMenu();
254     _root.viewport.prevFrame();
255     updateInfo();
256 dpavlin 1 break;
257     case 39: //Key.Right:
258 dpavlin 2 // ShowMenu();
259     _root.viewport.nextFrame();
260     updateInfo();
261 dpavlin 1 break;
262 dpavlin 5 case 27: //Key.Escape:
263     ShowMenu();
264     updateInfo();
265     break;
266 dpavlin 1
267     }
268     updateAfterEvent();
269     };
270    
271     Key.addListener(waitouches);
272    
273     .end
274    
275     .end

  ViewVC Help
Powered by ViewVC 1.1.26