1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
|
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init(event)" backgroundColor="#333333"
xmlns:book="com.pricope.miti.book.*" xmlns:rs="com.rubenswieringa.book.*" xmlns:local="*" viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import com.rubenswieringa.book.Page;
import flash.display.StageDisplayState;
import flash.events.FullScreenEvent;
// Status FULLSCREEN:
private var FullScreenStatus:Boolean = false;
private function init(event):void
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenRedraw);
}
private function fullScreenRedraw(event:FullScreenEvent):void
{
output.text = ""
if (event.fullScreen == false)
disableFullScreen()
}
private function changeFullScreenStatus(e:MouseEvent):void
{
if(FullScreenStatus)
disableFullScreen()
else
enableFullScreen()
}
private function disableFullScreen():void
{
FullScreenStatus = false;
fullScreen_btn.label = "Mode Plein Ecran";
fullScreen_btn.stage.displayState = StageDisplayState.NORMAL;
}
private function enableFullScreen():void
{
FullScreenStatus = true;
fullScreen_btn.label = "Sortir Plein Ecran";
fullScreen_btn.stage.displayState = StageDisplayState.FULL_SCREEN;
}
]]>
</mx:Script>
<book:LargeBook id="myBook" openAt="0" autoFlipDuration="600" easing="0.7" regionSize="150"
sideFlip="true" hardCover="false" hover="true" snap="false"
flipOnClick="true" height="600" y="{Math.round(Application.application.height/2-300)}" width="1200" x="{Math.round(Application.application.width/2-600)}"
initialize="init(event)">
<rs:Page hard="true" name="0">
<mx:Image source="@Embed('imagebook_bord/1.jpg')" />
</rs:Page>
<rs:Page name="1">
<mx:Image source="@Embed('imagebook_bord/2.jpg')" />
</rs:Page>
<rs:Page name="2">
<mx:Image source="@Embed('imagebook_bord/3.jpg')" />
</rs:Page>
<rs:Page name="3">
<mx:Image source="@Embed('imagebook_bord/4.jpg')" />
</rs:Page>
<rs:Page name="4">
<mx:Image source="@Embed('imagebook_bord/5.jpg')" />
</rs:Page>
<rs:Page name="5">
<mx:Image source="@Embed('imagebook_bord/6.jpg')" />
</rs:Page>
<rs:Page name="6">
<mx:Image source="@Embed('imagebook_bord/7.jpg')" />
</rs:Page>
<rs:Page name="7">
<mx:Image source="@Embed('imagebook_bord/8.jpg')" />
</rs:Page>
<rs:Page name="8">
<mx:Image source="@Embed('imagebook_bord/9.jpg')" />
</rs:Page>
<rs:Page name="9">
<mx:Image source="@Embed('imagebook_bord/10.jpg')" />
</rs:Page>
</book:LargeBook>
<mx:Button x="782" y="{Math.round(Application.application.height/2+320)}" label="Aller a la page" click="myBook.jumpToPage(Number(pageNumber.text))"/>
<mx:TextInput x="700" y="{Math.round(Application.application.height/2+320)}" width="83" text="1" id="pageNumber"/>
<mx:Button x="380" y="{Math.round(Application.application.height/2+320)}" label="<<" id="fCover" click="myBook.jumpToPage(0)" width="45"/>
<mx:Button x="500" y="{Math.round(Application.application.height/2+320)}" label="<" id="pPage0" click="myBook.prevPage()" width="45"/>
<mx:Button x="433" y="{Math.round(Application.application.height/2+320)}" label=">>" id="bCover" click="myBook.jumpToPage(myBook.pageArray.length)" width="45"/>
<mx:Button x="553" y="{Math.round(Application.application.height/2+320)}" label=">" id="nPage" click="myBook.nextPage()" width="45"/>
<mx:Button label="Mode Plein Ecran" id="fullScreen_btn" x="5" y="5" click="changeFullScreenStatus(event)"/>
<mx:Text x="56" y="65" text="" id="output"/>
<mx:Style source="styles.css"/>
</mx:Application> |
Partager