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

Contents of /E_viewer.sc

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26