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

  ViewVC Help
Powered by ViewVC 1.1.26