webEngine.getLoadWorker().stateProperty().addListener(
new ChangeListener<Worker.State>() {
public void changed(ObservableValue ov, Worker.State oldState, Worker.State newState) {
if (newState == Worker.State.SUCCEEDED) {
profile.setup();
profile.ready(new Runnable() { public void run() { pt.play(); } });
}
}
});
}