Get the Shape3D in a Scene
I use the ObjectFile loader and i need to manipulate the objects separatly. How can i do that ?
Hi Ed,
What you want to do is traverse your scene graph.
For each Node of the scene graph you need to know whether it is a Group node or a Leaf node. If it is a Leaf node then you could do a further test, such as:
if (node instanceof Leaf) {
if (node instanceof Shape3D) ...
else if (node instanceof Group) {
However, if the node is a Group then you can use the methods:
int numChildren() and
Node getChild(int index) to traverse the graph.
You will need to use recursion. Here is a simple outline of how to do it.
public void findShapes(java.util.Vector v, BranchGroup node) {
if (node instanceof Group) {
int numChildren = ((Group) node).numChildren();
for (int i = 0; i < numChildren; i++)
findShapes(v, ((Group) node).getChild(i));
else if (node instanceof Leaf) {
// test if it is Shape3D
// if so add it to the vector
** - this code has not been tested
Hope this helps.
Similar Messages
-
How to get the Shape3D from a Link-SharedGroup
Tried VRML loading. Works great. Just loaded some surfaces created in Unigraphics. Version of the .wrl is v2.0 utf8. Can rotate, zoom and pan them. All fine. However, one thing I can't. That is, I cannot get the shapes, so I'm not able to pick them or change their appearances.
The loading example in Daniel Selman's book uses the following code to get the shape:
BranchGroup branchGroup = scene.getSceneGroup();
shape = (Shape3D) branchGroup.getChild(0);
While Walsh and Gehringer use:
Hashtable namedObjects = scene.getNamedObjects();
Enumeration e = namedObjects.keys();
While (e.hasMoreElements()) {
String name = (String) e.nextElement();
shape = (Shape3D) namedObjects.get(name);
Both methods don't work in my case and generate a ClassCastException "javax.media.j3d.Link". There may be two reasons. One, both examples above demo the use of an Object loader, not a VRML. And two, the children of the sceneGroup are not shapes or geometry but in fact are Links (as the Exception already shows). So, probably refering to a SharedGroup node. Now I System.printed the names in the hash table. Result is:
name = Body__4381
name = Body__4380
And I printed out all nodes, this shows:
node = javax.media.j3d.Link@168fda
node = javax.media.j3d.Link@3e41ec
node = javax.media.j3d.TransformGroup@5a2cef
node = javax.media.j3d.TransformGroup@3c16f0
I noticed some developers have quite some experience with loading. Maybe some of them can supply me with some code to pull those Shapes3D out of that structure. Thanks in advance.
DirkHi Cyril,
Thanks for your quick and detailed response. I was away for some days, so only now my findings. I tried your suggested code. It works correctly, I even added more instance types as Links and BranchGroups etc. However, it doesn't bring me any deeper in the structure. I mean, even with this approach it only prints out the names of the two known Links and TransformGroups.
Have been looking in the j3D API and several other books, but there are only very limited details on how to see what the Link is refering to. One is not allowed to use something like myLink.numChildren etc. There are examples how to create Links, SharedGroups and add the Shape3D to it. But not the other way.
Anyway, I try to look further.
Thanks again, your reply brought me at least closer to the solution.
Dirk -
Getting the name of selected Node in Adobe 3D PDF
Hello,
I'm trying to use the following code to get the name of the selected node for a 3D object in my PDF.
var c3d = this.getAnnots3D(this.pageNum)[0].context3D;
c3d.activated = true;
var select = c3d.scene.selectedNode.name;
I get the error
TypeError: c3d.scene.selectedNode is undefined
19:Console:Exec
undefined
I have placed my code at the folder level.
Can someone help please?The XPath expression for attribute is tag-name/@attribute-name
-
How do I get the same song to play on the main menu and during scene select
I would like the music to play continuously throught the menu and scene selection. As it is I have to drag the audio file into each scene selection, and the music starts at the beginning.
At least, is there a way to remove the awful sound track that iDVD has on the themes?
iMac 20 core Duo Mac OS X (10.4.8)Yes I can add audio, how do I get the same song to play throughout the chapter menus? I have 30 "chapters", which are scenes from an hour of home movie. Can the same song play continuously throughout the different chater menus?. As it is now, I have to drag an audio file into every submenu, and it starts the song at the beginning for each chapter menu.
Otherwise, that same song that is preloaded on the theme is played. I hope this makes sence, kind of hard to explain. Thanks -
Whenever I try to adjust the color of a scene it gets distorted/squiggly lines.
Using elements 12; This is my first time editing by the way. Whenever I try to adjust the color of a scene the footage gets distorted/squiggly lines. This is prior to me rendering the footage -- I don't know if that has anything to do with it.
mrdemiraj81
Thanks for the reply.
General
Are you saying that scenes with and without color correction had those quiggly look?
Are you aware of the More button at the bottom right of the Lighting Panel expanded? When you click on that, you should have opportunities
to adjust your settings. Right now you are looking at the More view. Note the Less bottom at the bottom right of the Lighting Panel expanded. You would click on Less to get back to the original view which does not have the adjustments sliders included.
More Specifics
Definitely start with the look at unrendered (orange line over content) versus rendered (green line over content).
Once that is ruled out then we can explore alternative explanation for what you are observing.
If unrendered/rendered is not the answer, could you post a screenshot of one of scenes with the "distorted/squiggly lines"
But, if you cannot, written Q&A will have to do.
1. Can you get the properties of this 4 min promo video - video compression, audio compression, frame rate, interlaced or progressive, file extension, pixel aspect ratio. If you do not have this information, it can be obtained from the MediaInfo (Tree View) program.
http://mediainfo-mac.en.softonic.com/mac
Just be careful for unwanted carry alongs during the download and install of MediaInfo. In the MediaInfo (Tree View), please look for what are listed for Scan Type and Scan Order.
2. Also, please tell us what you see listed in the opened project under
Edit Menu/Project Settings/General and the readings for Editing Mode, Timebase, Frame Size, and Pixel Aspect Ratio (even if the fields look grayed out).
Let us start here. If there is anything that you need clarification on, please do not hesitate to ask. I will rewrite if necessary.
Thanks.
ATR -
How to get the frame number of a label in a different scene.
I am completely stumped on this.
I have my project setup as the gameplay in one scene, and another scene for the outcome.
The outcome scene, say called, GameDone, has 2 frames. The first frame for win, labeled it WON, the second frame for lost, labeled LOST.
I could do the very simple thing and just gotoAndStop("GameDone", 1); but thats a bad practice, I believe.
Ive gone through google and found the closest thing needing a MovieClip. I could not figure out what to give it? A random MovieClip? a new one? one from the next scene? one from the current scene?
import flash.display.Scene;
for (var i:uint = 0; i < mc1.scenes.length; i++) {
var scene:Scene = mc1.scenes[i];
trace("scene " + scene.name + ": " + scene.numFrames + " frames");
That was an adobe sample.
So how could I, in the gameplay scene, the frame number for either WON or LOST in the "GameDone" scene?
Thanks.Try doing the simple thing that you think is a bad practice. I don't know why you think it is. The only problem with it is that you appear to have it backwards for AS3... in AS3 it is gotoAndStop(frame,scene);
Why don't you use the frame labels instead of frame numbers? gotoAndStop("Won", "GameDone"); -
My iPhone was stolen. I used Find My iPhone app to lock it and display a message. The phone has not connected to the internet to locate it. I contacted the police and they have taken my meid number. How does this work and what are my chances of getting the phone back? Are there other ways the theif can use it. I was told once they put in a new sim card and use it, whatever software the police have, it will show up.
Honestly? In the US (I can't speak to other countries, though I doubt it works much differently in a lot of the world) The police took your report and filed it either in their computers or, on paper. They will now not think of this again. The only time it will cross anyones mind is if, in the course of entering information into evidence about items recovered or seized at a crime scene, the serial number of an iPhone that was found/seized happens to match yours, in which case you will be contacted.
The police in the US can and will do nothing to 'blok' the phone and it's not worth their time to try and locate it unless you know for a fact that it was stolen by a big time drug lord, master criminal, or some other such prime target and they can get a court order to track the location of the phone in order to locate this individual for your own purposes. If they do that, they'll probably keep him under surveilance for a year or so before they act.
Basically, the police don't care about your phone. If they find it, they will give it back to you. They are not, however, going to go looking for it. They have better things to do.
I'm sorry, but that's the way it is. -
Get the duration of all mp3 files inside a directory
Hello everyone,
I am working on a little project done with swing. Since I need an mp3 player inside my swing application, I found a really good solution with JavaFX 2. I have never worked with JavaFX before, therefor it seems to me a little bit strange on some parts.
Anyway.
I created a button on my application and as soon as somebody presses that button, the application should scan recursivly a unique directory for mp3 files and store the information of artist, title and track length into a database.
The mp3 player I created is based on the example from this page:
http://www.java2s.com/Code/Java/JavaFX/Mp3playerwithmetadataviewandcontrolpanel.htm
I understand the source code for most parts, but some behaivors are not really clear to me. My thoughts about getting the complete length of the mp3 file was
media.getDuration
or
mediaplayer.getTotalDuration
but both results are NaN if I call .toMillis();
Instead I need to create a listener (why?)
private class TotalDurationListener implements InvalidationListener {
@Override
public void invalidated(Observable observable) {
final MediaPlayer mediaPlayer = songModel.getMediaPlayer();
final Duration totalDuration = mediaPlayer.getTotalDuration();
totalDurationLabel.setText(formatDuration(totalDuration));
}and register this listener on the mediaplayer
mp.totalDurationProperty().addListener(new TotalDurationListener());I can image that the mediaplayer can "host" several media objects somewho and the listener is called as soon as a new media will be added to the mediaplayer in order
the calculate the overall duration.
When is this listener exactly called and is there no other ways to get the total length of the mp3 file?
Here is a minimal example which should work without any external libs
package de.hauke.schwimmbad.application.playground;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import javafx.application.Platform;
import javafx.beans.property.ReadOnlyObjectWrapper;
import javafx.embed.swing.JFXPanel;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.scene.paint.Color;
import javafx.util.Duration;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.UIManager;
public class Testing10 extends JFrame {
private MediaPlayer mediaPlayer;
private final ReadOnlyObjectWrapper<MediaPlayer> mediaPlayerWrapper = new ReadOnlyObjectWrapper<MediaPlayer>(
this, "mediaPlayer");
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
new Testing10();
} catch (Exception ex) {
System.out.println(ex);
public Testing10() {
super();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(null);
setSize(500, 500);
setTitle("Testing");
setLocationRelativeTo(null);
setResizable(false);
JButton button = new JButton("Scan");
button.setBounds(10, 10, 150, 30);
add(button);
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
scan();
final JFXPanel fxPanel = new JFXPanel();
fxPanel.setBounds(30, 80, 300, 300);
add(fxPanel);
Platform.runLater(new Runnable() {
public void run() {
initFX(fxPanel);
setVisible(true);
private void scan() {
File directory = new File("C:\\dev\\mp3");
List<File> mp3Files = new ArrayList<File>();
for (File file : directory.listFiles()) {
if(file.getName().endsWith("mp3")) {
mp3Files.add(file);
for (File file : mp3Files) {
System.out.println(file.getAbsoluteFile());
getLength(file);
private Duration getLength(File file) {
if(mediaPlayer != null) {
mediaPlayer.stop();
final Media media = new Media(file.toURI().toString());
mediaPlayer = new MediaPlayer(media);
mediaPlayerWrapper.setValue(mediaPlayer);
if(media.durationProperty()==null) System.out.println("durationProperty ist null");
if(media.durationProperty().get()==null) System.out.println(".get() ist null");
System.out.println("---> " + media.durationProperty().get().toMillis());
return media.getDuration();
private void initFX(JFXPanel fxPanel) {
BorderPane root = new BorderPane();
Scene scene = new Scene(root, Color.ALICEBLUE);
fxPanel.setScene(scene);
}The other question is why do I need a listener for the meta data to be changed in order to get the meta data?
media.getMetadata().addListener(new MapChangeListener<String, Object>()Why can't I call something like
media.getMetadata() --> returns a filled map?
The metadata problem is not included inside the example from above.
Sorry for my english but I hope everybody can understand the issue.
Many greetings,
HaukeThe nature of the Media class is that it accesses it asynchronously. This means that when you create an instance of it, and then immediately query it, the data you want may not be available yet. This is all in the Javadoc, see the doc for Media:
The media information is obtained asynchronously and so not necessarily available immediately after instantiation of the class. All information should however be available if the instance has been associated with a MediaPlayer and that player has transitioned to MediaPlayer.Status.READY statusSo you could associate the Media with a MediaPlayer, and then wait until it goes to the Status READY, and then read the length of the Media.
As for your 2nd question, getMetadata() returns a Map. You can just loop through it:
for(Map.Entry<String, Object> entry : media.getMetadata()) {
// etc
}However, the same restrictions apply as with Media -- you will probably need to wait before the information is available -- that's why the Listener approach works, because it will notify you as soon as the information is added to the map. -
Getting the classic "Macintosh Basics" tutorials to run in OSX (and Linux?)
Good afternoon folks,
I remember WAY back in the early days that there were really good basic tutorial programs that game with your new macintosh to teach you the basics. If my memory is correct, I THINK my favourite was the earliest one, "Mouse Basics". All I remember is that, as a kid, the first tutorial I had on a Mac was this silly little fun game to teach how to use a mouse, how to click, how to drag, etc. I vaguely remember a fishbowl was involved somehow, and there was another part where you dragged a piece of paper from a desk into a garbage can.
Heck, I think there may have been one for the pre-Mac Apples that was also really good.
Today, I have two uses for these programs, and I want to figure out how to get them to work on modern hardware.
1) My dad, believing the hype about OSX being the "easiest computer in the world to use" went and bought himself a really expensive iMac, thinking it would do EVERYTHING for him. Remember the scene from Star Trek IV where Scotty sits in front of the Mac Plus and says, "computer," into the mouse. That's pretty much the mindspace where my dad's coming from. Plus, my mom's even worse, and is having a really hard time grasping the concept of using a mouse. They want me get Skype working on their computer, but when I tried to help them out I discovered just how much they need to learn before they get CLOSE to the point where they can use Skype comfortably.
But, because all this stuff is so automatic for me, because I've been using computers since around 1986 when I got my first C=64, I cannot figure out how to verbalize these concepts into words in a way they can understand. Trying to explain to them the concept of the "desktop" as a metaphor is really hard. To them, a computer is a machine that does something FOR you, like a toaster. To me a computer is a virtual "space" that I "enter" in order to do things for myself.
For example, they might ask something like, "how do I get the computer to do x?" And I would answer, "this is how YOU do x." Or, to put it another way, they might unconsciously think to themselves, "I want the computer to give me the information I ask for," while I would unconsciously think ,"I want to go into the file system and find the information that's stored there." That's why it's called the "Finder" after all, right? It's a philosophical paradigm shift they just can't seem to make. So, they don't want me to teach them how to use Skype. They want me to teach Skype how to work for them! Somehow I cannot explain to them that an iMac is not a HAL 9000...
So, I want to use these very old basic tutorial programs on OSX as a way to get my parents some practice on the very very very basic skills needed to use a computer. How to click. How to drag. The concept of the "desktop". Etc.
Anybody have any simple tricks I can try? I suppose I could download QEMU for OSX and then install System 7 on their iMac, but it seems to me that there MUST be a simpler solution.
2) I'm trying to develop a remastered **** Small Linux livecd for my very young nieces and nephews to help introduce them to computers. The idea is to prevent my silly siblings from wasting their money on those stupid pink plastic "laptops" you can buy at Toys R Us. Instead, they'd simply take their old laptop that they don't use anymore and just boot it up with the DSL livecd. On the cd will be all sorts of age-appropriate games, educational software, and a kid-oriented internet browser (I'm trying to get zacbrowser to run under WINE, so far without any luck.)
There would be two users built-in to the livecd. If you boot it without using a password you get "kid mode" with a really friendly desktop with large cartoony icons with all the programs for the kid. If you boot it with the preconfigured password you'd get "parent mode" allowing access to preferences, utilities, and the myDSL package installation system.
Along with giving new life to my brother-in-laws' old laptops, they could also take the livecd with them when they're visiting other folk. Instead of dumping the kids in front of the tv, they can just pop the livecd in the family's computer and the kids can plug away without the ability to touch anything stored on the harddrive.
Think of it as SugarOS for really old hardware.
As you've probably guessed by now, I want to include these old Mac tutorials with the CD, and again I'm trying to figure out the best way to get them to run under Linux. Again, I could try running System 7 under QEMU, but I'd really like to find a better way. Is there such a thing as "WINE for classic macs"?
In the unlikely event that anybody has a way to modify these old programs to run natively under OSX (or Linux), that would be AWESOME!!!
Or if anybody knows of any modern substitutes to the classic Mac Basics tutorials, that would also be cool (but not nearly as cool as a way to run the original programs. I really really liked the way those suckers did the job.)
Thanks in advance!Hi, and a warm welcome to the forums!
Couple of thoughts...
You could get/use SheepShaver to actually run Classic Apps on Intel Macs.
For "Kid Mode" you could put other's Home folders on USB Sticks big enough. -
How to get the parent of a component in fx?
Here is an example:
Index.fx:
Stage {
title: "Online book library";
width: 1024
height: 768
scene:Scene {
fill: Color.WHITE
content: [
banner ,
login = Login{translateX:715 translateY:135}
};Login.fx:
var logOn : Button = Button {
translateX:25 translateY: 170
text: "Log On"
font: Font {size:11 name: "Verdana Bold"}
action: function() {
showHello();
function showHello(){
// add a label in index.fx whose text is "welcome!";
}I want to show something on the index.fx but I don't know how to get the parent from the child component?
In Flex, we use parent or parentApplication, Is there a similar function in JavaFX?Reusing the same Tile example, I had no problems, I suppose I was doing wrong the first time:
def IMAGES_WIDTH = 100;
def IMAGES_HEIGHT = 100;
var COLUMN_NB = 3;
var ROW_NB = 3;
var scene: Scene;
var previews: Container;
Stage
title: "Test of Tile layout"
scene: scene = Scene
width: 500
height: 500
fill: Color.LAVENDER
content:
previews = Tile
hgap: 10
vgap: 10
layoutX: bind (scene.width - previews.width) / 2
layoutY: bind (scene.height - previews.height) / 2
columns: COLUMN_NB
content: for (i in [ 1 .. COLUMN_NB * ROW_NB ])
ImageView
id: "IV{i}"
image: Image
url: "{__DIR__}clock.gif"
width: IMAGES_WIDTH
preserveRatio: true
onMousePressed: Hide
function Hide(evt: MouseEvent): Void
println("{evt.node} ({evt.node.id}) - {evt.node.parent}");
var nm: Node = evt.node.parent.lookup("IV5"); // Middle node
nm.visible = false;
var ntl: Node = evt.node.parent.lookup("IV1"); //Top left node
(ntl as ImageView).viewport = Rectangle2D { height: IMAGES_WIDTH/2, width: IMAGES_WIDTH/2 };
(evt.node.parent as Tile).hgap = 20; // Strange effect, but works
} -
Is there a way to get the filename only on iOS using CameraRoll?
This post is a sidetrack from this post: http://forums.adobe.com/thread/848761?tstart=0
The method used in that post works perfect on both Android and iOS for selecting and uploading files.... BUT is there a way to get the filename of the file from the mediaPromise cross-plattform?
If you let the user select an image it's not very nice to have the image be called "temp.jpg" after uploading - you want the user to know which image he/her have uploaded
Any ideas? The "mediaPromise.file.relativePath()" works on Android but not on iOS. Not "mediaPromise["file"].url/relativePath/nativePath" either.
Thank youHey Joe what do you think of this solution.
1. Let the user select the image
2. Store the mediaPromise object in an array (event.data) for later use
3. Load in the object using loadMediaPremise
4. Add the loaded image into a movieclip (not visible from the scene)
5. Resize that movieclip to let's say 100x100
6. Use the BitmapData class to create a new bitmap from that movieclip and save it to storage
7. Use the saved file within the app as a thumbail
8. Use the mediaPromise object stored in the array later when the user wants to upload the images (then go through mediaPromise.open() on each image -> save to storage -> upload -> clear from storage -> loop).
I haven't tried it yet (will do this week) but should that be a acceptable solution to the problem(?)
I'm unsure if by just keeping the mediaPromise object within Flash will make the memory run wild though? -
How to get the parent window in sub-child controller class in javafx?
how to get the parent window in sub-child controller class in javafx?
You can get the window in which a node is contained with
Window window = node.getScene().getWindow();Depending when this is invoked, you might want to check the Scene is not null before calling getWindow().
If the window is a stage that is owned by another window, you can get the "parent" or "owner" window with
Window owner = null ;
if (window instanceof Stage) {
Stage stage = (Stage) window ;
owner = stage.getOwner();
} -
Can't get Rectangle to appear in scene
Hello all. I am a JavaFX newbie. I am working on my first program. I am trying to get my rectangle to appear on the stage. I have scoured the web for examples and from what I have found, my code ought to work, but I am not seeing my Rectangle for some reason. My code does not have any syntax errors or exceptions. Please help if you can.
import javafx.scene.shape.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.scene.*;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
public class Main extends Application {
* @param args the command line arguments
public void main(String[] args) {
Application.launch(Main.class, (java.lang.String[])null);
@Override
public void start(Stage primaryStage) {
try {
AnchorPane page = (AnchorPane) FXMLLoader.load(Main.class.getResource("TicTacToe.fxml"));
Scene scene = new Scene(page);
primaryStage.setScene(scene);
scene.getStylesheets().add("tictactoe/tictactoe.css");
primaryStage.setTitle("TicTacToe");
Group rectGroup=new Group();
final Rectangle rlt=new Rectangle(); //Rectangle Left Top
rlt.setX(107);
rlt.setY(35);
rlt.setHeight(150);
rlt.setWidth(150);
rlt.setFill(Color.GREY);
rlt.fillProperty();
rectGroup.getChildren().add(rlt);
rectGroup.setVisible(true);
primaryStage.show();
rlt.setOnMouseClicked(new EventHandler<MouseEvent>()
@Override
public void handle(MouseEvent t) {
rlt.setFill(Color.RED);
});I have an AnchorPae with tic-tac-toe hash marks as my stage and I put a Rectangle in the upper-left corner of the tic-tac-toe grid. I am doing this because I want to detect when someone clicks in the upper left corner of the grid, an X or an O jpg should appear. Right now, I am just trying to get a Grey Rectangle to appear and when it is clicked, it should change to Red. Eventually, when I get the Rectangle set-up properly and it will respond to clicks, the 9 Rectangles will be invisible.
Also, is there a better way to determine if someone clicks in a particular grid area on the AnchorPane?
Thanks,
DavidNever mind. I figured it out. Here is the code that worked. First of all, I didn't need to use Rectangles.
package tictactoe;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import javafx.event.EventHandler;
import javafx.fxml.FXMLLoader;
import javafx.scene.*;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
* @author David
public class Main extends Application {
* @param args the command line arguments
public void main(String[] args) {
Application.launch(Main.class, (java.lang.String[])null);
@Override
public void start(Stage primaryStage) {
try {
final AnchorPane page = (AnchorPane) FXMLLoader.load(Main.class.getResource("TicTacToe.fxml"));
Scene scene = new Scene(page);
primaryStage.setScene(scene);
scene.getStylesheets().add("tictactoe/tictactoe.css");
primaryStage.setTitle("TicTacToe");
final ImageView mm =new ImageView();//Middle Middle
final ImageView lt =new ImageView();//Left Top
final ImageView lm =new ImageView();//Left Middle
final ImageView lb =new ImageView();//Left Bottom
final ImageView tm =new ImageView();//Top Middle
final ImageView bm =new ImageView();//Bottom Middle
final ImageView rt =new ImageView();//Right Top
final ImageView rm =new ImageView();//Right Middle
ImageView rb =new ImageView();//Right Bottom
mm.setImage(new Image("tictactoe/images/x.jpg"));
mm.relocate(246,145);
lt.relocate(107,35);
lm.relocate(107,145);
lb.relocate(107,260);
tm.relocate(246,35);
bm.relocate(246,260);
rt.relocate(375,35);
rm.relocate(375,145);
rb.relocate(375,260);
page.getChildren().add(mm);
//page.getChildren().remove(mm);
page.getChildren().add(lt);
page.getChildren().add(lm);
page.getChildren().add(lb);
page.getChildren().add(tm);
page.getChildren().add(bm);
page.getChildren().add(rt);
page.getChildren().add(rm);
page.getChildren().add(rb);
primaryStage.show();
mm.setOnMouseClicked(new EventHandler<MouseEvent>()
@Override
public void handle(MouseEvent t) {
page.getChildren().remove(mm);
catch (Exception ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}So now, when I click the mm (middle-middle) x.jpg, it disappears.
Thanks,
David
Edited by: David.Warwick on Mar 7, 2013 1:04 PM -
Simplest way to display a title or caption at the beginning of each scene?
I am editing a video to make an instructional dvd covering 23 separate lessons. Without some kind of text in the first few seconds of each scene, there is no way for the viewer to quickly and efficiently distinguish one scene from another as they jump forward or backward from scene to scene. They would have to go back to the main menu between each scene to find the one they're looking for, and that's cumbersome.
I would like to add a caption/title (not sure what the technical Adobe term is -- I'm obviously an amateur) to the screen at the beginning of each scene. It can be a text overlay on top of the video, or it can be a blacked out screen (or whatever) with text that lasts a few seconds before each scene begins. I just need something to let the viewer know which lesson they are about to see.
I went through the footage and added scene markers at appropriate places, and the menu is functional. Now I'm looking for the most efficient (least time-consuming) way to accomplish my goal. It looks like one alternative is to manually split the clips at each scene change, then go to sceneline and insert a title between each scene, then manually type in the text that corresponds to my description of each scene. I hope this isn't the only, or the most efficient way.
Anyone know a simpler alternative? The simpler the better, as only a few people will be using the dvd so I don't want the cost (measured in editing time and effort) to outweigh the benefit of viewer convenience. Thanks in advance.I agree with Steve G. on adding the Titles from the PrE Titler function. Also, being new to PrE, this article on Titler might be useful, before you get tripped up by a few aspects of a New Title: http://forums.adobe.com/message/4976998#4976998
Good luck,
Hunt -
Getting the Request Object in the EJB published as a Web Service
Hi experts,
I have a Portal Service that call a BAPI in a back-end system with the Connector Framework. I have a Portal Component that calls the Portal Service, passing the Locale (request.getLocale()) and the User (request.getUser()) object. It's work fine!
I need to call the Portal Service by an EJB that is published as a Web Service. The connection between the EJB and Portal Service is ok, but I don't know how to get the Locale and the User object in the EJB to pass to the Portal Service.
Is possible to get the request object from the HTTP SOAP Request?
Thanks,
GustavoHey Alice!
The Feature Hashing module is actually a wrapper around
Vowpal Wabbit's implementation of the murmurhash. Thus, it takes text in, and produces 2^N new features based on the text, where N is the bitsize specified in the module. These features (and not the original text!) should be used during model training.
The Learner will then keep track of these features behind the scenes.
When you publish your web service and these features are recomputed for new input text (same N), they are used as the features for scoring.
Does that make sense?
Regards,
AK
Maybe you are looking for
-
HP Printing Engineers Mobilize: Expert Day War Room
During November and December of 2009, HP has mobilized a specialized group of engineers to provide answers and responses to customer questions during our Expert Day events. In both San Diego CA and Boise ID, there are conference rooms that transform
-
I have been using the same credit card for about a year and now it's telling me my security code don't match so it won't let me buy anything.... Any ideas
-
http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/cs-extension-builder/pdfs/CC_Extens ion_SDK.pdf . I also found this. Figured I'd add it to the thread in case someone looking for info comes across it.
-
I downloaded photos from an external hard drive. When I tried moving the photos folder To iPhoto I lost all of the photos. They are no longer In the downloads folder and they are not in iPhoto. Where are they? How do I recover them?
-
Please let me know how to display source code
Hi everyone. my name is Kazuma working in Japan. We have a problem with SE38. We transport one of executives program, which made from other development system, to our system. When we use SE38 and display botton, we encounter short dump like below and