Scenes

I am a newb at this program and i want to know how to set the
beginning scene. when i make "scene 2" and ctrl+enter, it starts
with scene 2 instead of scene 1. Scene 1 is the index (home) of the
site I'm making. I couldn't find anything about this in the flash
help.
I also have another question, how do i link a button to a
scene? The flash help wasn't specific enough.
This is what i did:
-made a button symbol
-gave it an instance name of "button" (temporally)
-gave the frames this script:
button.onRelease = function() {
gotoAndPlay("scene 2", 1);
What could be the problem?

oops, this should probably belong in the flash general
discussion.

Similar Messages

  • IMovie capture from DV tape without auto scene break

    Has anyone figured out to prevent iMovie from automatically inserting scene breaks in iMovie'11.
    I am importing previously edited footage for conversion.  This still contains the timestamps.
    After importing, iMovie automatically places each clip by time/date order in Events - which means it is jumbled up because it has previously been edited.
    Basically what I want is either 1) to import as a single clip, i.e. disable auto scene break, or 2) to be able to sort clips into same time/date order that they were imported.
    Cheers

    iMovie will assume that anything imported in DV Stream is coming directly off a camcorder, and therefore will be sorted in chronological order.
    If you still have access to the software where you created these movies, you can share them out in something other than DV Stream.
    For example, if you have iMovie 06, you can import it without auto scene breaks. Then Export Using QuickTime to an mov container in the DV codec. That will produce an mov file that iMOvie 11 will import in the correct order.

  • Display contents of a loop  in SCENE

    Hi all,
    Can i display the contents of a for loop one after another in a "Scene".
    The code below displays the contents of "for" loop in OUTPUT window as well as in the "SCENE". But the problem is that the contents of "for" loop are displayed in the scene graph only after the for loop exits.
    how can i rectify this code to generate the output similar to the OUTPUT window in SCENE graph.?
    import javafx.scene.Scene;
    import javafx.stage.Stage;
    import javafx.scene.text.Text;
    import ranno.*;
    import javafx.scene.control.Button;
    import javafx.scene.Group;
    import generateResult.*;
    var number: Integer[];
    var msg : String ;
    var a : String[];
    var locX: Integer;
    var locY: Integer;
    def canvas = Group { };
    var display : Button =Button {
    translateX: 100
    translateY: 100
    width : 100
    height : 30
    text : "Click"
    var text : Text
    action:function(){
    delete canvas.content;
    for(i in [0..1])
    java.lang.Thread.sleep(1000);
    number=i;
    println(number[i]);
    a=Integer.toString(number[i]);
    locX=20;
    locY=20;
    msg = "{a}";
    text = Text{
    x: locX
    y: locY+20*i
    content : msg
    insert text into canvas.content;
    Stage
    title: "Numbers"
    var array : String[];
    var i : Integer;
    scene : Scene
    width: 400
    height: 200
    content :
    [display,canvas]
    If you haven't understood my question,please execute this code and compare the output in the OUTPUT window with the SCENE output.
    I want the output in SCENE to be similar to the output in OUTPUT window.
    Please help me in modifying my code .

    Since you haven't used the CODE button, the source code is messed up (star means bold here).
    But the short answer is: don't use a loop with sleep()!
    JavaFX provides Timelines and Transitions to animate things and add stuff progressively to the scenegraph.

  • Some questions about how to change scenes

    i have something like the following:
    fxml (view/main/MainMenu.fxml):
    <Scene fx:controller="view.main.CtrlMainMenu" xmlns:fx="http://javafx.com/fxml" stylesheets="view/main/main.css">
        <GridPane xmlns:fx="http://javafx.com/fxml" alignment="center" id="backgorund" hgap="10" vgap="10">
            <!--other panes -->
            <VBox spacing="8" GridPane.columnIndex="0" GridPane.rowIndex="1">
                <Button text="Start" onAction="#Start"/>
                <Button text="Options" onAction="#Options"/>
                <Button text="Exit" onAction="#Exit"/>
            </VBox>
        </GridPane>
    </Scene>main loop (cotroller/main.java):
    public class main extends Application{
        public static void main(String[] args){
            launch(main.class, args);
        public void start(Stage stage) throws Exception{
            stage.setTitle(CtrlLanguage.get(CtrlLanguage.TITLE));
            CtrlMainMenu main = new CtrlMainMenu();
            Scene scene = main.main();          //don't know how to make Scene scene = (Scene)FXMLLoader.load(getClass().getResource("MainMenu.fxml")); work on here since MainMenu.fxml is in view/main while the main class is in controller and ended up putting CtrlMainMenu in the view although is not very correct
            stage.setScene(scene);
            stage.setWidth(1080);
            stage.setHeight(720);
            stage.show();
    }view controller (view/main/CtrlMainMenu.java):
    public class CtrlMainMenu{
        //other buttons actions
        public Scene main() throws Exception{
            return (Scene)FXMLLoader.load(getClass().getResource("MainMenu.fxml"));
        @FXML protected void Start(ActionEvent event){
        @FXML protected void Options(ActionEvent event){
        @FXML protected void Exit(ActionEvent event){
            System.exit(0);          //is there any other way to finish the program than using a system.exit?
    }got few questions currently:
    1. i'd like to be able to keep using CtrlMainMenu for other buttons while the ones that appear there go to the main (since will be reusing those classes from other scenes)
    tried adding fx:controller on panes instead of the scene, but it doesnt work at all (it crashes) else directly in CtrlMainMenu change the scenes of the stage, but then, i have to send the stage to every controller i use? (or how do i know the stage of the scene?)
    and in the case of options, i'd like after done, go back to the previous scene, is that possible? if so, how?
    2.if i want to implement languages, how do i do to change the text? tried with setText() but depending on where do i put it, it crashes, so dont know where do i have to put it
    3.im doing a game that may have different number of players, so, is there some way to erase/hide/add data from a gridpane with fxml?

    1. ok, found the way to change scenes, with this way:
    @FXML protected void Start(ActionEvent event) throws Exception{
         Node node = (Node)event.getSource();
         Stage stage = (Stage)node.getScene().getWindow();
         Scene scene = (Scene)FXMLLoader.load(getClass().getResource("../view/main/MainMenu.fxml"));     //this is just an example, will change to go to another scene
         stage.setScene(scene);
         stage.show();
    }but now i have another problem, when i click on the button the stage scene is changed, but the scene is transformed to a very small one at the top left (the size seems the same as when i dont put the set width/height on the stage when creating it), the stage size remains the same, and when i resize the window, it gets "repaired"
    the options, i thought on using a pane over the current pane so this way instead of going back would be just removing that new pane, would that work well?
    2. found about languages that is by using <Label text="%myText"/> and java.util.ResourceBundle but don't know how to use it, can someone provide me an example, please?
    3. still haven't looked on it...

  • Problem with persistence across scenes

    I have a student who has created some code- see below. At the moment this code is in Scene 5 - but the blocks also appear on other scenes.
    How does he limit this code to just one scene?
    Can he replicate this to be used on other scenes, but starting out fresh.
    Currently, 50 blocks spawn on top of one another. These are used for teaching addition or multiplication. When they've been dragged out into a pattern, we don't want that pattern on another scene, we want them on on top of the other.
    The code is not overly elegant, but it does work - except for being repeated across scenes.
    block = []
    //this function creates a block at a certain location and adds it to an array
    //new identifiers are block30 and so on
    function spawnBlock(){
      blockSpawn = attachMovie("block","block"+_root.getNextHighestDepth(),_root.getNextHighestDepth(),{_x:5 50,_y:300});
      block.push(blockSpawn._name);
    //this runs the spawnBlock funtion 50 times creating 50 new blocks
    //change 50 to the number of blocks desired
    for(i=0;i<50;i++){
      spawnBlock();
      //trace(block[i]); //testing if the funtion was working
    function dragSetup(clip){ //this is used to assign a movie clip to funtion that can be reused with each block that is created
      clip.onPress = function(){
      startDrag(this);
      clip.onRelease = clip.onReleaseOutside=function(){ //same as above
      stopDrag();
    //this lets each block that is needed to be dragged
    //add in more lines to let more blocks get dragged
    dragSetup(block0);
    dragSetup(block1);
    dragSetup(block2);
    dragSetup(block3);
    dragSetup(block4);
    dragSetup(block5);
    dragSetup(block6);
    dragSetup(block7);
    dragSetup(block8);
    dragSetup(block9);
    remainder removed for brevity.

    use:
    function clear_blockF():Void{
    for(var i:Number=block.length-1;i>=0;i--){
    this[block[i]].removeMovieClip();
    block.length=0;

  • AS2 open another scene and play a label inside a mc

    I'm looking for a piece of AS2 script that will open a different scene and play a label from inside a mc.
    So it should be something like...
    On release go to scene x and play x label from inside x mc.
    I can get to the scene via the button "on release gotoandplay scene 2 .
    Once in the scene I can get a button to gotoandplay themc.mc and the label.
    But what I really want to do is get the button on one page to go to the scene and play the label on the second scene.
    Any ideas?

    use:
    gotoAndPlay("scene2_frame1");
    this.onEnterFrame=someF;
    function someF(){
    yourmovieclip.gotoAndPlay("some label");
    delete this.onEnterFrame;

  • Problem with adding a Node in a Scene from a Node initialization

    Hi all! I am trying to create a custom Button, then I create a class that extends Rectangle, then this class add a Text on the button... but the Text is never shown!
    import javafx.scene.Cursor;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.LinearGradient;
    import javafx.scene.paint.Stop;
    import javafx.scene.effect.DropShadow;
    import javafx.scene.text.Text;
    import javafx.scene.text.Font;
    import javafx.scene.input.MouseEvent;
    public class Button extends Rectangle {
        public var text: String;
        postinit {
            cursor = Cursor.HAND;
            width = 90;
            height = 25;
            arcWidth = 15;
            arcHeight = 15;
            effect = DropShadow {radius: 6};
            fill = LinearGradient {
                startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                stops: [
                    Stop {offset: 0.0, color: Color.WHITE}
                    Stop {offset: 1.0, color: Color.LIGHTGRAY}
            insert Text {
                x: this.x + 5, y: this.y + 5
                content: text
                font: Font {size: 13}
            } into scene.content;
            onMouseEntered = function(e: MouseEvent): Void {
                fill = LinearGradient {
                    startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                    stops: [
                        Stop {offset: 0.2, color: Color.WHITE}
                        Stop {offset: 1.0, color: Color.LIGHTGRAY}
            onMouseExited = function(e: MouseEvent): Void {
                fill = LinearGradient {
                    startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                    stops: [
                        Stop {offset: 0.0, color: Color.WHITE}
                        Stop {offset: 1.0, color: Color.LIGHTGRAY}
            onMousePressed = function(e: MouseEvent): Void {
                fill = LinearGradient {
                    startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                    stops: [
                        Stop {offset: 0.0, color: Color.LIGHTGRAY}
                        Stop {offset: 1.0, color: Color.WHITE}
            onMouseReleased = function(e: MouseEvent): Void {
                fill = LinearGradient {
                    startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0
                    stops: [
                        Stop {offset: 0.0, color: Color.WHITE}
                        Stop {offset: 1.0, color: Color.LIGHTGRAY}
    }If I print scene.content from this class, there is no nodes in the scene! If I print content from the scene, the output show only the button, but not the Text...
    Can somebody tell me why this doesn't works?

    Based on your code, do you even need to extend or create a CustomNode? I believe you can accomplish your desired result by adding a stylesheet to your scene and then specify a styleClass for a basic button.
    Here are a few snippets:
    The scene:
    scene: Scene {
                    stylesheets: uiCSS
                    content: [ //your button ]               ]
                }The button:
    Button{ styleClass: "myButton"}The css:
    .myButton:hover{
       -fx-text-fill: linear (0%,0%) to (0%,100%)
            stops (0%, rgb(220, 220, 220)) (25%, rgb(190, 190, 190))(50%, rgb(190, 190, 190))(100%, rgb(220, 220, 220));
    .myButton:pressed{
      -fx-text-fill: linear (0%,0%) to (0%,100%)
            stops (0%, rgb(100, 100, 100)) (25%, rgb(100, 100, 100))(50%, rgb(100, 100, 100))(100%, rgb(100,100, 100));
    }You can modify the look and feel of any JavaFX control in this manner. An important resource to access is the caspian.css which can be found in the JDK library in the javafx-ui-controls.jar under the com.sun.javafx.scene.control.skin.caspian. You can essentially copy and paste any of the controls css into your css file and modify as desired. This allows you to skin your components without having to change any of the behavior which becomes a big hassle.
    Hope this helps.

  • How to structure several scenes (in symbols) on the main stage timeline

    Hi,
    I'm new to edge animate but have a Flash background and I'm working in Edge Animate on a game which is structured in several scenes. Each scene I did put in a symbol. Now I wonder how to build the main timeline or the "story - controller" so to speak. I have all the scenes but I do not know how to connect them.
    In Flash it was possible to add keyframes of scenes one after another (like stairs) and jump forward or backward if needed to load the movie clips. In Edge Animate all scenes (or symbols) are in place from the beginning of the timeline and I cannot move the symbol to a later keyframe. Of course I can move animations in the timeline. The only way I think is to hide the symbols first and make them visible if needed. But this does not seem to be the right way and I don't understand the concept of structuring complex animations yet.
    I would like to know how to structure several scenes in Edge Animate properly. Something like a scene loader or unloader would be useful. Highly appriciate any hints to a solution.
    Thank you,
    JP

    resdesign wrote:
    You can also use edgecommons to load edge composition into another edge composition.
    Thank you to your tipp so I try to organize my scenes into compositions. I can successfully load a composition (scene2) into the main container :
    EC.loadComposition("scene2.html", sym.getSymbol("mainContainer"));
    Now I'm facing another situation. At the end of the loaded composition scene2 is a "Next Scene" button suppose to load scene3.html composition into the main container. "Next Scene" is a nested button inside the loaded composition screen2 symbol. How do I load the next compostion from the current one? This code for On Click of course does not work:
    EC.loadComposition("scene3.html", sym.getSymbol("mainContainer"));
    I think the refer to the mainContainer is wrong. Is it just a targeting issue or is it the wrong approach in general?

  • How to use two agents in one scene?

    Hi experts,
    I have two agents:
    First Agent: Unix
    Second Agent: Windows.
    I would like:
    Steps In the scene:
    1) Load file in the oracle table (LKM --> File to oracle) --> agent linux
    2) Load Table in BAM (LKM --> oracle to BAM) --> agent windows
    I would like to have in one interface File to BAM.
    Do you undestand me?
    thanks
    Edited by: Benito Camelas on 14-jun-2010 3:32

    Hi.
    You can execute scenario from command line http://docs.oracle.com/cd/E14571_01/integrate.1111/e12643/running_executions.htm#BABJEHIG:
    On UNIX systems:
    ./startscen.sh <scenario_name> <scenario_version> <context_code> [<log_level>] [-AGENT_URL=<remote_agent_url>] [-NAME=<local_agent_name>] [-SESSION_NAME=<session_name>] [-KEYWORDS=<keywords>] [<variable>=<value>]*
    On Windows systems:
    startscen.bat <scenario_name> <scenario_version> <context_code> [<log_level>] [-AGENT_URL=<remote_agent_url>] ["-NAME=<local_agent_name>"] ["-SESSION_NAME=<session_name>"] ["-KEYWORDS=<keywords>"] ["<variable>=<value>"]*

  • How can I display a new scene in JavaFX 2.2? For example after button click

    how to display new scene after button click in the main window, I want the main window and the new scene are in one stage. thx

    You can change the scene by calling stage.setScene(new Scene(newContentParent));
    I don't think you are quite asking for a complete scene change though as you "want the main window and the scene in one stage". The main window is a stage (as Stage extends Window). And a given stage can only contain one scene at a time (though you can swap it out by calling setScene as described earlier).
    What I think you are really asking for how can you replace some content part of the active Scene on the Stage. To do that you can set a layout manager like a HBox or a BorderPane as the root of your scene, then change out the content of the layout manager. For example:
    final BorderPane layout = new BorderPane();
    layout.setCenter(new Label("Dogbert");
    final Button nav = new Button("Next");
    layout.setLeft(nav);
    nav.setOnAction(new EventHandler<ActionEvent>() {
      @Override public void handle(ActionEvent actionEvent) {
        layout.setCenter(new Label("Dilbert"));       
    });In the above short sample code, if you wanted to change the scene rather than the a pane, then you would call stage.setScene rather than layout.setCenter.
    There is a complete executable example with multiple content panes and some styling here:
    http://stackoverflow.com/questions/13556637/how-to-have-menus-in-java-desktop-application

  • How can I put multiple photos during an imovie scene?

    I'm designing a video where it shows the process of people growing up and I really wanted to put 2-4 pictures on the same screen scene to show a comparison between the time difference. Is there any way that I could do that?
    And if not, is there any software (i.e plugins, downloadable content, apple related downloadable content) that I could use?

    You can work with 2 pictures with iMovie '11 using either picture-in-picture or side-by-side.
    Here a short tutorial on picture-in-picture:
    http://www.apple.com/findouthow/movies/#picinpic
    Side-by-side is created in a similar way.
    For more then 2 photos you have to first composite them using something like PhotoShop or Pixelmator.
    Matt

  • I have never used iMovie before.  I would like to connect many videos together and edit them.  I would also like to learn how to add transitions between scenes and add music.  Help!

    Hey Everyone!
    I want to learn how to create a video in iMovie.  My goal is to be able to take many vidoes and place them into one.  I would also like to delete scenes and and add transitions.  I am also hoping to add music to the video I create.
    Please help or direct me to an area that will help me! =)

    Here is some extra information (which I intended to include in my previous aborted post):
    iLife '11 Video Showcase (scroll down to see iMovie '11) -
    http://www.apple.com/ilife/video-showcase/
    iMovie '11 Help (can also be accessed from iMovie's menu item Help>iMovie Help) -
    http://help.apple.com/imovie/#button-0
    (the same link that Karsten provided above)
    Ken Stone's iMovie '09 Tutorial (still mostly relevant to iMovie '11) -
    http://www.kenstone.net/fcp_homepage/imovie_09_stone.html
    In addition, the following links will be useful (relating to iMovie '08 and iMovie '09, but still mostly relevant to iMovie '11) -
    http://www.apple.com/findouthow/movies/imovie08.html
    http://www.apple.com/findouthow/movies/
    Note that some of the above links contain video tutorials. It's well worth watching all that you come across!
    Have fun with iMovie '11 and don't hesitate to seek further help here in this forum.
    John

  • Can I add the same style sheet to multiple nodes in the same scene?

    I know this sounds like a dumb question, so I'll give an explanation below.  I've done this with FXML and Scene Builder and haven't noticed any negative effects yet.  I'm mostly curious what happens internally when I add a style sheet to a node and that same style sheet has already been added via a parent node.
    The reason I ask is because I use fx:include in many of my FXML files.  For example, I'll have something like this:
    MainPane.fxml - Uses shared.css and main-pane.css.  Includes SubPane.fxml.
    SubPane.fxml - Uses shared.css and sub-pane.css.  Included in MainPane.fxml using fx:include.
    I used to add shared.css to SubPane.fxml using Scene Builder's preview option, but the way this works has been changed in Scene Builder 2.  See this thread for an explanation of the change.  I also use TestFX and I'm convinced that I should be ensuring shared.css is applied to SubPane.fxml before running GUI tests.
    The easiest way to accomplish what I want is to add shared.css to the root node of both MainPane.fxml and SubPane.fxml.  However, I don't know if that's something I'm allowed to do.  Is it?

    No. http://www.adobe.com/products/creativecloud/faq.html
    Can I buy more than one membership to an individual offering of Creative Cloud? 
    No, Adobe has moved to identity-based licensing with a technology that will not support multiple same-product licenses, so you can buy only one membership per Adobe ID. If you need two Creative Cloud memberships, you will need to purchase each with a unique Adobe ID. You can also purchase a Creative Cloud for teams membership, which allows you to purchase and manage multiple seats under one account.

  • How do I link a button to a scene?

    built a simple 4 page flash site with basic tweening. need to
    link my navigation buttons to the specific scenes. For example. The
    Home Page. I want to click on the About Us button and have it
    direct the user to the About Us page (which is built as a
    individual scene.
    Basically need to find out how to make a button link to a
    specific scene.
    Thank you!!!

    I create a layer called labels then label each frame where
    the animation for each page will start,(home about etc) then add
    event listeners using action script to play from those labels and
    also place stop functions so the timeline stops once the content
    has loaded.
    so lets say the home button has a instance name of home_btn
    and you have a label on the timeline for the home page as homepage
    home_btn.addEventListener(MouseEvent.CLICK,home);
    function home(event:MouseEvent)void;
    gotoAndPlay("homepage")

  • How do I move an object from one photo to another and then change the scene, i.e.  winter to sum?

    How do I move an object from one photo to another and then change the scene, i.e.  winter to summer?

    OK.
    Open the picture with the new scene. This will be your canvas.
    Open the picture with object A, select it with one of the selection tools, go to Edit>copy
    Go back to the new scene/canvas, Go to Edit>paste
    Repeat for object B
    Use the move tool to position A & B, each on its own layer. Use the corner handles of the bounding box to resize, if necessary
    You should have 3 layers: Background layer, and the 2 layers with A & B
    Note: It's best if the resolution of the 3 picture files is the same value.

  • How do I make multiple text bold, for example scene headings or character names?

    How do I make multiple text bold, for example scene headings or character names?

    You can do that by editing the template of the document.
    Open the document, go to Edit->Template. A dialog will launch which will have element types on the left and it's properties on the right.
    Select Scene Heading(or Character name) on the left. On the right, go to 'Text' tab and click on Bold checkbox.
    Press OK.
    Hope this helps.
    Cheers,
    Sunny

Maybe you are looking for