/[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 11 - (show annotations)
Fri Feb 22 17:28:36 2008 UTC (16 years, 2 months ago) by dpavlin
File size: 6463 byte(s)
embed font which is now shows (with slightly wrong position) in gnash
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 width=110 height=20 align=center border=none noselect variable=infoText font=comic size=12pt
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 .put info x=15 y=45
156 .end
157
158 # change this animation for show/hide effect of menu
159 .sprite s_menu
160 .frame 1
161
162 .put C_menu alpha=0%
163
164 .frame 5
165
166 .change C_menu alpha=100%
167 .stop
168
169 .frame 10
170
171 .change C_menu alpha=0%
172 .stop
173
174 .end
175
176 # ActionScript
177 .action:
178 // ECMA comments from here!
179
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
187 function showMenu() {
188 /*
189 _root.menu._y = _root.viewport._ymouse - 60;
190 if(_root.menu._y < 0) {
191 _root.menu._y = 0;
192 };
193 */
194 _root.menu.Play();
195 };
196
197 function updateInfo() {
198 var page = _root.viewport._currentframe;
199 var total = _root.viewport._totalframes;
200
201 var pos = Math.floor(
202 ( page - 1 ) / ( total - 1 ) * 100
203 );
204
205 if ( pos == 0 ) pos = 1;
206
207 _root.menu.C_menu.infoText = String(page) + " / " + String(total)
208 // + "\r" + String(pos)
209 ;
210 _root.menu.C_menu.page_bar.gotoAndStop( pos );
211 };
212
213 updateInfo();
214
215 // Actionscript évènements touches
216
217 waitouches = new Object();
218 waitouches.onKeyDown = function () {
219 keydownrun=true;
220 _root.kd=Key.getCode();
221 switch(Key.getCode()) {
222 case 40: //Key.DOWN:
223 _root.viewport.nextFrame();
224 updateInfo();
225 break;
226 case 38: //Key.UP:
227 _root.viewport.prevFrame();
228 updateInfo();
229 break;
230 case 33: // PageUp
231 numPage = _root.viewport._currentframe - 5;
232 if(numPage < 1) {
233 _root.viewport.gotoAndStop(1);
234 } else {
235 _root.viewport.gotoAndStop(numPage);
236 };
237 updateInfo();
238 break;
239 case 34: // PageDown
240 numPage = _root.viewport._currentframe + 5;
241 if(numPage > _root.viewport._totalframes) {
242 _root.viewport.gotoAndStop(_root.viewport._totalframes);
243 } else {
244 _root.viewport.gotoAndStop(numPage);
245 };
246 updateInfo();
247 break;
248 case 35: //Key.End:
249 _root.viewport.gotoAndStop(_root.viewport._totalframes);
250 updateInfo();
251
252 break;
253 case 36: //Key.Home:
254 _root.viewport.gotoAndStop(1);
255 updateInfo();
256
257 break;
258 case 37: //Key.left:
259 // ShowMenu();
260 _root.viewport.prevFrame();
261 updateInfo();
262 break;
263 case 39: //Key.Right:
264 // ShowMenu();
265 _root.viewport.nextFrame();
266 updateInfo();
267 break;
268 case 27: //Key.Escape:
269 ShowMenu();
270 updateInfo();
271 break;
272
273 }
274 updateAfterEvent();
275 };
276
277 Key.addListener(waitouches);
278
279 .end
280
281 .end

  ViewVC Help
Powered by ViewVC 1.1.26