1 |
################################################### # |
#################################################### |
2 |
# Extended viewer |
# Extended viewer |
3 |
# |
# |
4 |
# http://technoargia.free.fr/swftools/ - june 17 - 2006 # |
# http://technoargia.free.fr/swftools/ - june 17 - 2006 |
5 |
################################################### |
################################################### |
6 |
|
|
7 |
.flash filename=E_viewer.swf bbox=100x50 |
.flash filename=E_viewer.swf bbox=100x50 |
9 |
.box button_idle width=20 height=60 color=blue fill=salmon line=5 |
.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 |
.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 |
.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 |
# .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 |
.box border_left width=10 height=300 color=gray fill=gray line=3 |
14 |
|
|
15 |
.edittext info text="info" color=black size=100% width=60 height=60 align=center border=none noselect variable=infoText |
.edittext info text="info" color=black size=100% width=60 height=60 align=center border=none noselect variable=infoText |
16 |
|
|
113 |
|
|
114 |
.end |
.end |
115 |
|
|
116 |
|
.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 |
.button menu_left |
.button menu_left |
130 |
|
|
131 |
.show border_left as=area alpha=0% |
.show border_left as=area alpha=50% |
132 |
.on_move_in : |
.on_move_in : |
133 |
showMenu(); |
showMenu(); |
134 |
.end |
.end |
149 |
.put home pin=center x=25 y=28 scale=40% alpha=50% |
.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 |
.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 |
.put next pin=center x=25 y=95 scale=40% alpha=50% rotate=0 |
152 |
|
.put hide pin=center x=25 y=125 scale=20% alpha=50% rotate=0 |
153 |
|
|
154 |
.end |
.end |
155 |
|
|
159 |
.put C_menu x=-60 |
.put C_menu x=-60 |
160 |
.put info x=-65 y=110 alpha=50% |
.put info x=-65 y=110 alpha=50% |
161 |
|
|
162 |
.frame 40 |
.frame 4 |
163 |
|
|
164 |
.change C_menu x=5 |
.change C_menu x=5 |
165 |
.change info x=0 |
.change info x=0 |
166 |
.stop |
.stop |
167 |
|
|
168 |
.frame 80 |
.frame 8 |
169 |
|
|
170 |
.change C_menu x=-60 |
.change C_menu x=-60 |
171 |
.change info x=-65 |
.change info x=-65 |
173 |
|
|
174 |
.end |
.end |
175 |
|
|
176 |
|
# ActionScript |
177 |
.action: |
.action: |
178 |
|
// ECMA comments from here! |
179 |
|
|
180 |
_root.viewport.stop(); |
_root.viewport.stop(); |
181 |
_root.createEmptyMovieClip("menu",500); |
_root.createEmptyMovieClip("menu",500); |
184 |
info._alpha = 50; |
info._alpha = 50; |
185 |
info.embedFonts = 0; |
info.embedFonts = 0; |
186 |
var monStyle = new TextFormat(); |
var monStyle = new TextFormat(); |
187 |
monstyle.bold = false; |
monstyle.bold = true; |
188 |
monStyle.italic = false; |
monStyle.italic = false; |
189 |
monStyle.border = false; |
monStyle.border = false; |
190 |
monStyle.font = "_sans"; |
monStyle.font = "_sans"; |
191 |
_root.menu.info.setTextFormat(monStyle); |
_root.menu.info.setTextFormat(monStyle); |
192 |
|
|
|
_root.menu.infoText = "Page\r" + String(_root.viewport._currentframe) + "/" + String(_root.viewport._totalframes); |
|
|
|
|
193 |
function showMenu() { |
function showMenu() { |
194 |
_root.menu._y = _root.viewport._ymouse - 60; |
/* |
195 |
if(_root.menu._y < 0) { |
_root.menu._y = _root.viewport._ymouse - 60; |
196 |
_root.menu._y = 0; |
if(_root.menu._y < 0) { |
197 |
}; |
_root.menu._y = 0; |
198 |
_root.menu.Play(); |
}; |
199 |
|
*/ |
200 |
|
_root.menu.Play(); |
201 |
}; |
}; |
202 |
|
|
203 |
function updateInfo() { |
function updateInfo() { |
204 |
_root.menu.infoText = "Page\r" + String(_root.viewport._currentframe) + "/" + String(_root.viewport._totalframes); |
_root.menu.infoText = String(_root.viewport._currentframe) + " / " + String(_root.viewport._totalframes); |
205 |
}; |
}; |
206 |
|
|
207 |
|
updateInfo(); |
208 |
|
|
209 |
// Actionscript évènements touches |
// Actionscript évènements touches |
210 |
|
|
211 |
waitouches = new Object(); |
waitouches = new Object(); |
221 |
_root.viewport.prevFrame(); |
_root.viewport.prevFrame(); |
222 |
updateInfo(); |
updateInfo(); |
223 |
break; |
break; |
224 |
case 33: //Page précédente: |
case 33: // PageUp |
225 |
numPage = _root.viewport._currentframe - 5; |
numPage = _root.viewport._currentframe - 5; |
226 |
if(numPage < 1) { |
if(numPage < 1) { |
227 |
_root.viewport.gotoAndStop(1); |
_root.viewport.gotoAndStop(1); |
228 |
} else { |
} else { |
229 |
_root.viewport.gotoAndStop(numPage); |
_root.viewport.gotoAndStop(numPage); |
230 |
}; |
}; |
231 |
updateInfo(); |
updateInfo(); |
232 |
break; |
break; |
233 |
case 34: //Page suivante: |
case 34: // PageDown |
234 |
numPage = _root.viewport._currentframe + 5; |
numPage = _root.viewport._currentframe + 5; |
235 |
if(numPage > _root.viewport._totalframes) { |
if(numPage > _root.viewport._totalframes) { |
236 |
_root.viewport.gotoAndStop(_root.viewport._totalframes); |
_root.viewport.gotoAndStop(_root.viewport._totalframes); |
237 |
} else { |
} else { |
238 |
_root.viewport.gotoAndStop(numPage); |
_root.viewport.gotoAndStop(numPage); |
239 |
}; |
}; |
240 |
updateInfo(); |
updateInfo(); |
241 |
break; |
break; |
250 |
|
|
251 |
break; |
break; |
252 |
case 37: //Key.left: |
case 37: //Key.left: |
253 |
ShowMenu(); |
// ShowMenu(); |
254 |
|
_root.viewport.prevFrame(); |
255 |
|
updateInfo(); |
256 |
break; |
break; |
257 |
case 39: //Key.Right: |
case 39: //Key.Right: |
258 |
|
// ShowMenu(); |
259 |
|
_root.viewport.nextFrame(); |
260 |
|
updateInfo(); |
261 |
|
break; |
262 |
|
case 27: //Key.Escape: |
263 |
ShowMenu(); |
ShowMenu(); |
264 |
|
updateInfo(); |
265 |
break; |
break; |
266 |
|
|
267 |
} |
} |