hi
may i know how to exit the mediabox?
for example i create a group inside that is the mediabox
but when i click the close button(custom button) it will go to the other group
and thus exit the mediabox.
current situation is that when i click the close button,
it will continue playing. or it will pause when i code it mediabox.paused();
this is my code
var btnCloseDetail: CustomButton = CustomButton {
btnNormal:"{_DIR_}closedetail.png"
fitWidth: 78
x: (Screen.primary.visualBounds.width - 80) as Integer;
y: (Screen.primary.visualBounds.width - (Screen.primary.visualBounds.width - 30)) as Integer;
visible:false
onMousePressed: function(e: MouseEvent) {
detailWind.opacity = 0;
exitAppsBtn.visible=true;
btnCloseDetail.visible = false;
mediaBox.pause();
delete mediaBox from detailPage.content;
navBtnGrp.disable = false;
detailWindTransition.play();
pageNode = Constant.RESULT_PAGE;
}
}
var mediaBox:MediaBox;
function playVideo(){
delete detailPage.content;
insert btnCloseDetail into detailPage.content;
var media = "file:///C:/A.flv";
mediaBox = MediaBox {
// your media(video/audio) source and information
// Only mediaSource is the required variable. All others are optional.
mediaSource: media
mediaTitle: "Big Buck Bunny"
mediaDescription: "A well-tempered rabbit finds his day..."
// controls the visibility of mediaTitle/mediaDescription
showMediaInfo: true
// the position and size of the media on screen
translateX: 300
translateY: 300
width: 640
height: 360
// make the movie play as soon as it's loaded
autoPlay: true
// media controlbar height at the bottom of the media view
mediaControlBarHeight: 25
// some examples of function variables to interact with outside
onEndOfMedia: function() {
}
onMouseClicked: function(me) {
}
}
insert mediaBox into detailPage.content;
}