--- E_viewer.sc 2008/02/22 12:23:54 2 +++ E_viewer.sc 2008/02/22 19:04:44 12 @@ -6,25 +6,19 @@ .flash filename=E_viewer.swf bbox=100x50 + .font comic filename="fonts/comic.swf" + + .box menu_background width=130 height=60 color=navy fill=gray line=0 + .box page_progress_bar width=110 height=10 color=white line=2 + .box page_current_page width=10 height=10 color=black fill=white line=0 + .box button_idle width=20 height=60 color=blue fill=salmon line=5 .box button_hover width=20 height=60 color=red fill=salmon line=6 .box button_pressed width=20 height=60 color=gray fill=salmon line=5 -# .box cadre_menu width=50 height=150 color=navy fill=salmon line=2 - .box border_left width=5 height=800 color=gray fill=white line=3 - - .edittext info text="info" color=black size=100% width=60 height=60 align=center border=none noselect variable=infoText - -.outline o_cadre: + .box border_left width=10 height=300 color=gray fill=gray line=3 - M 12.3,-1.2483537 - L 40.130855,-1.2483537 - C 46.945055,-1.2483537 52.430855,4.2374464 52.430855,11.051646 - L 52.430855,123.77055 - C 52.430855,130.58475 46.945055,136.07055 40.130855,136.07055 - L 12.3,136.07055 C 5.4858001,136.07055 0,130.58475 0,123.77055 - L 0,11.051646 C 0,4.2374464 5.4858001,-1.2483537 12.3,-1.2483537 z + .edittext info text="info" color=black width=110 height=20 align=center border=none noselect variable=infoText font=comic size=12pt -.end .outline o_arrow: M 60.208843,38.698967 @@ -61,13 +55,11 @@ .filled home_idle outline=o_home fill=#336699 color=navy line=4 .filled home_hover outline=o_home fill=#3366ff color=salmon line=4 - .filled home_pressed outline=o_home fill=#4466ff color=red line=3 + .filled home_pressed outline=o_home fill=#8866ff color=red line=3 .filled arrow_idle outline=o_arrow fill=#336699 color=navy line=4 .filled arrow_hover outline=o_arrow fill=#3366ff color=salmon line=4 - .filled arrow_pressed outline=o_arrow fill=#4466ff color=red line=3 - - .filled cadre_menu outline=o_cadre fill=salmon color=grey line=3 + .filled arrow_pressed outline=o_arrow fill=#8866ff color=red line=3 .button next @@ -115,7 +107,7 @@ .button menu_left - .show border_left as=area alpha=0% + .show border_left as=area alpha=50% .on_move_in : showMenu(); .end @@ -128,33 +120,42 @@ .end .put viewport - .put menu_left +# .put menu_left + +.sprite page_bar +.frame 1 + .put page_progress_bar x=0 y=0 + .put page_current_page x=0 y=0 + .stop +.frame 100 + .change page_current_page x=100 +.end .sprite C_menu - .put cadre_menu y=5 alpha=90% - .put home pin=center x=25 y=28 scale=40% alpha=50% - .put prev pin=center x=25 y=65 scale=40% alpha=50% rotate=180 - .put next pin=center x=25 y=95 scale=40% alpha=50% rotate=0 + .put menu_background x=5 y=5 alpha=90% + .put home pin=center x=30 y=30 scale=40% alpha=50% + .put prev pin=center x=70 y=30 scale=40% alpha=50% rotate=180 + .put next pin=center x=110 y=30 scale=40% alpha=50% rotate=0 + .put page_bar x=15 y=50 + .put info x=15 y=45 .end +# change this animation for show/hide effect of menu .sprite s_menu .frame 1 - .put C_menu x=-60 - .put info x=-65 y=110 alpha=50% + .put C_menu alpha=0% -.frame 4 +.frame 5 - .change C_menu x=5 - .change info x=0 + .change C_menu alpha=100% .stop -.frame 8 +.frame 10 - .change C_menu x=-60 - .change info x=-65 + .change C_menu alpha=0% .stop .end @@ -169,23 +170,31 @@ info._alpha = 50; info.embedFonts = 0; - var monStyle = new TextFormat(); - monstyle.bold = true; - monStyle.italic = false; - monStyle.border = false; - monStyle.font = "_sans"; - _root.menu.info.setTextFormat(monStyle); function showMenu() { - _root.menu._y = _root.viewport._ymouse - 60; - if(_root.menu._y < 0) { - _root.menu._y = 0; - }; - _root.menu.Play(); +/* + _root.menu._y = _root.viewport._ymouse - 60; + if(_root.menu._y < 0) { + _root.menu._y = 0; + }; +*/ + _root.menu.Play(); }; function updateInfo() { - _root.menu.infoText = String(_root.viewport._currentframe) + " / " + String(_root.viewport._totalframes); + var page = _root.viewport._currentframe; + var total = _root.viewport._totalframes; + + var pos = Math.floor( + ( page - 1 ) / ( total - 1 ) * 100 + ); + + if ( pos == 0 ) pos = 1; + + _root.menu.C_menu.infoText = String(page) + " / " + String(total) +// + "\r" + String(pos) + ; + _root.menu.C_menu.page_bar.gotoAndStop( pos ); }; updateInfo(); @@ -243,6 +252,10 @@ _root.viewport.nextFrame(); updateInfo(); break; + case 27: //Key.Escape: + ShowMenu(); + updateInfo(); + break; } updateAfterEvent();