Announcement

Collapse
No announcement yet.

Close GFx Movie Not Working In Latest UDK?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    So, you have i guess your own movie class that does lots of functionality and all.

    Code:
     class UIScene_Profile extends GFxMoviePlayer;
    
    /** Reference to the label used to display the message on the UI */
    var GFxObject MessageLabel;
    
    /** Reference to the text field used to enter the player's name */
    var GFxObject PlayerText;
    
    /** Reference to the text field used to enter the player's title */
    var GFxObject TitleText;
    
    /** Reference to the text field used to enter the player's clan */
    var GFxObject ClanText;
    
    /** Reference to the button used to save the profile info - must add a widget binding since we expect a GFxCLIKWidget */
    var GFxCLIKWidget SaveButton;
    
    /** Reference to the button used to close the UI - must add a widget binding since we expect a GFxCLIKWidget */
    var GFxCLIKWidget ExitButton;
    
    // Called when the UI is opened to start the movie
    function bool Start(optional bool StartPaused = false)
    {
    	// Start playing the movie
        Super.Start();
    
    	// Initialize all objects in the movie
        Advance(0);
    
        return true;
    }
    
    // Callback automatically called for each object in the movie with enableInitCallback enabled
    event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
    {
        // Determine which widget is being initialized and handle it accordingly
        switch(Widgetname)
        {
            case 'messageLabel':
            	// Save reference to the label that displays the message to the player
                MessageLabel = Widget;
                break;
            case 'playerText':
            	// Save reference to the text field for the player's name
                PlayerText = Widget;
                break;
            case 'titleText':
            	// Save reference to the text field for the player's title
                TitleText = Widget;
                break;
            case 'clanText':
            	// Save reference to the text field for the player's clan
                ClanText = Widget;
                break;
            case 'saveButton':
            	// Save reference to the button that saves the profile info
    		// the Widget is cast to a GFxCLIKWidget to allow for event listeners - see WidgetBindings
                SaveButton = GFxCLIKWidget(Widget);
                // Add a delegate for when this button is clicked
                SaveButton.AddEventListener('CLIK_click', SavePlayerData);
                break;
            case 'exitButton':
            	// Save reference to the button that closes the UI
    		// the Widget is cast to a GFxCLIKWidget to allow for event listeners - see WidgetBindings
                ExitButton = GFxCLIKWidget(Widget);
                // Add a delegate for when this button is clicked
                ExitButton.AddEventListener('CLIK_click', CloseMovie);
                break;
            default:
            	// Pass on if not a widget we are looking for
                return Super.WidgetInitialized(Widgetname, WidgetPath, Widget);
        }
        
        return false;
    }
    
    // Delegate added to change the message using the data entered
    //In a real game situation, the data would be saved somewhere
    function SavePlayerData(EventData data)
    {
        // Only on left mouse button
        if(data.mouseIndex == 0)
        {
        	// Set the text property of the message label using the profile info entered
            MessageLabel.SetString("text", "Welcome,"@PlayerText.GetString("text")@"("$TitleText.GetString("text")@"in"@ClanText.GetString("text")$")");
        }
    }
    
    // Delegate added to close the movie
    function CloseMovie(EventData data)
    {
        // Only on left mouse button
        if(data.mouseIndex == 0)
        {
        	// Close the UI
            Close();
        }
    }
    
    defaultproperties
    {
        // The imported SWF to use
    	MovieInfo=SwfMovie'UDNHud.UI_QuickStart'
    
        // Set widget bindings so the Widget passed to
        // WidgetInitialized for the buttons is a GFxCLICKWidget
        WidgetBindings.Add((WidgetName="saveButton",WidgetClass=class'GFxCLIKWidget'))
        WidgetBindings.Add((WidgetName="exitButton",WidgetClass=class'GFxCLIKWidget'))
    
        // Set properties for the movie
        // TimingMode=TM_Real makes the menu run while the game is paused
        bDisplayWithHudOff=TRUE
        TimingMode=TM_Real
    	bPauseGameWhileActive=TRUE
    	bCaptureInput=true
    }
    That's the class of your movie, wich is taken from here http://udn.epicgames.com/Three/ScaleformQuickStart.html


    Afterwards, in your classes you want to add a kismet node, wich is in this case, " ofc taking as example what you do the sequence action.

    Code:
      //-----------------------------------------------------------
    //Written by neongho
    //This starts the menu after the blank screen has been started
    //-----------------------------------------------------------
    class SeqAct_MovieGetClosed Extends SequenceAction;
    
    
    
    event activated()
    {
    GetWorldInfo().Game.Broadcast( GetWorldInfo().Game.GetAlocalPlayerController(), "I Got activated A node "@Targets[0]@" 0 IS Movie" );
    UIScene_Profile (Targets[0]).root.CloseMovie(); //Type cast the movie recived from kismet, target of your node
    }
    
    
    DefaultProperties
    {
     ObjName="MyMovieDoThis"
     ObjCategory="MovieActions"
     bCallHandler = false;
    }
    [img=http://s13.postimg.org/tn2pivo2r/When_Opens_Take_The_Reference.jpg] 1 Take the reference from the node that starts your movie, if kismet starts your movie
    [img=http://s16.postimg.org/7l95o1wvp/Start_Something_With_The_Movie_Reference.png] 2 Take the reference from the movie, and do what you want from code with it, in your case close it.

    Anyways reverb i think that your game is paused, while your movie is up and running and that might be the major problem you have.

    Leave a comment:


  • replied
    Originally posted by Neongho View Post
    Create your own kismet nodes doing that through the GFxMoviePlayer reference of your movie.

    Need more info about doing that ?
    Yes, please give me more info on that.

    Leave a comment:


  • replied
    Create your own kismet nodes doing that through the GFxMoviePlayer reference of your movie.

    Need more info about doing that ?

    Leave a comment:


  • started a topic Close GFx Movie Not Working In Latest UDK?

    Close GFx Movie Not Working In Latest UDK?

    I'm able to load and play my flash movie using the Open GFx Movie in Kismet. But when I connect the "close" node, the flash animation doesnt even appear anymore.



    Just wondering, is there a step I've missed or could it possibly be a bug in the latest 2015 UDK build? Because I've also noticed a couple of other kismet nodes that are nolonger functioning..

    I've also tried changing the player variable from All Players to Player but it still fails to solve the problem.
Working...
X