/[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 3 - (show annotations)
Fri Feb 22 13:04:25 2008 UTC (16 years, 2 months ago) by dpavlin
File size: 5952 byte(s)
- remove menu follow mouse effect
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 4
149
150 .change C_menu x=5
151 .change info x=0
152 .stop
153
154 .frame 8
155
156 .change C_menu x=-60
157 .change info x=-65
158 .stop
159
160 .end
161
162 # ActionScript
163 .action:
164 // ECMA comments from here!
165
166 _root.viewport.stop();
167 _root.createEmptyMovieClip("menu",500);
168 _root.attachMovie("s_menu","menu",500);
169
170 info._alpha = 50;
171 info.embedFonts = 0;
172 var monStyle = new TextFormat();
173 monstyle.bold = true;
174 monStyle.italic = false;
175 monStyle.border = false;
176 monStyle.font = "_sans";
177 _root.menu.info.setTextFormat(monStyle);
178
179 function showMenu() {
180 /*
181 _root.menu._y = _root.viewport._ymouse - 60;
182 if(_root.menu._y < 0) {
183 _root.menu._y = 0;
184 };
185 */
186 _root.menu.Play();
187 };
188
189 function updateInfo() {
190 _root.menu.infoText = String(_root.viewport._currentframe) + " / " + String(_root.viewport._totalframes);
191 };
192
193 updateInfo();
194
195 // Actionscript évènements touches
196
197 waitouches = new Object();
198 waitouches.onKeyDown = function () {
199 keydownrun=true;
200 _root.kd=Key.getCode();
201 switch(Key.getCode()) {
202 case 40: //Key.DOWN:
203 _root.viewport.nextFrame();
204 updateInfo();
205 break;
206 case 38: //Key.UP:
207 _root.viewport.prevFrame();
208 updateInfo();
209 break;
210 case 33: // PageUp
211 numPage = _root.viewport._currentframe - 5;
212 if(numPage < 1) {
213 _root.viewport.gotoAndStop(1);
214 } else {
215 _root.viewport.gotoAndStop(numPage);
216 };
217 updateInfo();
218 break;
219 case 34: // PageDown
220 numPage = _root.viewport._currentframe + 5;
221 if(numPage > _root.viewport._totalframes) {
222 _root.viewport.gotoAndStop(_root.viewport._totalframes);
223 } else {
224 _root.viewport.gotoAndStop(numPage);
225 };
226 updateInfo();
227 break;
228 case 35: //Key.End:
229 _root.viewport.gotoAndStop(_root.viewport._totalframes);
230 updateInfo();
231
232 break;
233 case 36: //Key.Home:
234 _root.viewport.gotoAndStop(1);
235 updateInfo();
236
237 break;
238 case 37: //Key.left:
239 // ShowMenu();
240 _root.viewport.prevFrame();
241 updateInfo();
242 break;
243 case 39: //Key.Right:
244 // ShowMenu();
245 _root.viewport.nextFrame();
246 updateInfo();
247 break;
248
249 }
250 updateAfterEvent();
251 };
252
253 Key.addListener(waitouches);
254
255 .end
256
257 .end

  ViewVC Help
Powered by ViewVC 1.1.26