Results 1 to 3 of 3
- 11-24-2009, 07:17 AM #1
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
how to stop/exit the mediabox JAVAFX
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;
}
- 11-25-2009, 06:01 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
For me this is not a Java code, this is a JavaScript code. This is not a JS forum. It's better to ask your question in JS forum.
- 11-26-2009, 02:33 AM #3
Member
- Join Date
- Nov 2009
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
JavaFX not able to read images
By ajeeb in forum NetBeansReplies: 4Last Post: 02-16-2010, 03:16 PM -
JavaFX Script and JavaFX Mobile
By levent in forum Java SoftwareReplies: 1Last Post: 01-27-2010, 04:48 PM -
How to exit the program by typing "exit"?
By Laythe in forum New To JavaReplies: 6Last Post: 08-19-2009, 08:32 PM -
Indentation Size Reset While Coding JavaFX
By JDCAce in forum NetBeansReplies: 0Last Post: 10-06-2008, 09:28 PM -
Lobo Browser 0.98 - Now With JavaFX Support
By lobochief in forum Java SoftwareReplies: 0Last Post: 03-10-2008, 03:00 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks