Help > FLASH COMPONENT > Docs > Component API
Component API
Sets book size
example:
instanceName.setSize (200, 250); instanceName is the name of component instance on the stage.
gotoPage ( n )
Goes to page n. You can use it only when book is not in flipping process.
example:
instanceName.gotoPage(12);
flipForward()
Flips one page forward. You can use it only when book is not in flipping process. example:
instanceName.flipForward();
flipBack()
Flips one page back. You can use it only when book is not in flipping process.
example:
instanceName.flipBack();
directGotoPage(n)
Goes to page n directly. Skipping unnecessary pages flipping. You can use it only when book is not in flipping process.
example:
instanceName.directGotoPage(12);
Get/Set Autoflip Area Size property
example:
instanceName.autoFlipProp = 50; instanceName is the name of component instance on the stage.
flipOnClickProp
Get/Set Flip on Click property
example:
instanceName.flipOnClickProp = true;
moveSpeedProp
Get/Set Page Moving Speed property
example:
instanceName.moveSpeedProp = 2;
closeSpeedProp
Get/Set Page Closing Speed property
example:
instanceName.closeSpeedProp = 3;
gotoSpeedProp
Get/Set GotoPage Speed property
example:
instanceName.gotoSpeedProp = 4;
alwaysOpenedProp
Get/Set GotoPage Speed property. Read only.
example:
var tmp = instanceName.alwaysOpenedProp;
Appears only when the user mouse clicks on page i
example:
instanceName.onClick = function(i){
trace("Page clicked:" + i);
}
instanceName is the name of component instance on the stage.
onPutPage( i )
Appears after flipping page i
example:
instanceName.onPutPage = function(i, page){
trace("Page number :" + i);
page.gotoAndPlay("anyFrame");
}
onLastPage( )
Appears when end of book reached
example:
instanceName.onLastPage = function(){
trace("End");
}
onFirstPage( )
Appears when beginning of book reached
example:
instanceName.onFirstPage = function(){
trace("Start");
}
onStartFlip( i )
Appears when page i flipping starts
example:
instanceName.onStartFlip = function(i){
trace("Page #" + i + " is flipping");
}
onFlipBack( i )
Appears when page i is returned back following the user releasing the mouse button
example:
instanceName.onFlipBack = function(i){
trace("Page #" + i + " is returned ");
}
onEndGoto()
Appears when the gotoPage function is complete
example:
instanceName.onEndGoto = function(i){
trace("End of gotoPage procedure");
}
onPageLoad( url )
Appears when page loading is complete
example:
instanceName.onPageLoad = function(url){
trace("Page: " + url + " loaded");
}
