Results 1 to 3 of 3
  1. #1
    xclaim is offline Member
    Join Date
    Nov 2009
    Posts
    4
    Rep Power
    0

    Default 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;
    }

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    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.

  3. #3
    xclaim is offline Member
    Join Date
    Nov 2009
    Posts
    4
    Rep Power
    0

    Default

    this is a javafx coding
    by the way i have solve it already

Similar Threads

  1. JavaFX not able to read images
    By ajeeb in forum NetBeans
    Replies: 4
    Last Post: 02-16-2010, 04:16 PM
  2. JavaFX Script and JavaFX Mobile
    By levent in forum Java Software
    Replies: 1
    Last Post: 01-27-2010, 05:48 PM
  3. How to exit the program by typing "exit"?
    By Laythe in forum New To Java
    Replies: 6
    Last Post: 08-19-2009, 09:32 PM
  4. Indentation Size Reset While Coding JavaFX
    By JDCAce in forum NetBeans
    Replies: 0
    Last Post: 10-06-2008, 10:28 PM
  5. Lobo Browser 0.98 - Now With JavaFX Support
    By lobochief in forum Java Software
    Replies: 0
    Last Post: 03-10-2008, 04:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •