Results 1 to 8 of 8
  1. #1

    Default Flash movie on render texture doesnt take input?

    So while making some tests with rendering an flash movie into an render texture it seems that whatever the movie is loaded it completly ignores the player input

    In my gfx movie player defaultproperties i alredy set bCaptureInput to true but It seems that it just gives the same result i can move jump etc do any action

    I tried instead of rendering the movie in a render texture render it on full screen and the input seems to worked but i only need the movie to be on the render texture rather than fullscreen

    here is my gfx movie player code



    Code:
    class GFxCKMovie extends UTGFxTweenableMoviePlayer;
    
    
    var GFxClikWidget ScrollingList;
    var GFxClikWidget FoodList;
    var array<SapituInventory> ToCookItems; 
    var GFxClikWidget Icon1,Icon2,Icon3;
    var GFxClikWidget LockedBtn1,LockedBtn2,LockedBtn3;
    var GFxClikWidget NormalBtn1,NormalBtn2,NormalBtn3;
    var bool bInventoryVisible;
    var bool bSlot1Unlocked,bSlot2Unlocked,bSlot3Unlocked;
    var bool bSlot1Selected,bSlot2Selected,bSlot3Selected;
    var int SelectedIndex;
    
    var array<string> CookedItems; 
    var string FoodName;
    var int SlotIndex,FoodIndex;
    
    var tfpPlayerController PC;
    
    
    function InitMovie()
    {
    
    AddFocusIgnoreKey('Escape');
    AddFocusIgnoreKey('E');
    AddFocusIgnoreKey('e');
    
    }
    
    function SetInventoryVisible(bool val)
    {
    if(val == true)
    {
    ScrollingList.SetVisible(true);
    }
    
    if(val == false)
    {
    ScrollingList.SetVisible(false);
    }
    
    }
    
    event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
    {  
    PC = tfpPlayerController(GetPC());  
    SetUpDataProvider(ScrollingList);
    SetInventoryVisible(false);
    
        switch(WidgetName)
        {                 
    	case ('sl')
    	    ScrollingList = GFxClikWidget(Widget);
    	    SetUpDataProvider(ScrollingList);
    		UpdateCKList();
    		ScrollingList.AddEventListener('CLIK_itemPress',OnClickHandler);
    	    break;
    		
    		case ('slot1')
    	    LockedBtn1 = GFxClikWidget(Widget);
    		ScrollingList.AddEventListener('CLIK_OnPress',slot1func);
    	    break;
    		
    		case ('slot2')
    	    LockedBtn2 = GFxClikWidget(Widget);
    		ScrollingList.AddEventListener('CLIK_OnPress',slot2func);
    	    break;
    		
    		case ('slot3')
    	    LockedBtn3 = GFxClikWidget(Widget);
    		ScrollingList.AddEventListener('CLIK_OnPress',slot3func);
    	    break;
    		
    		
    			case ('icon1')
    	    Icon1 = GFxClikWidget(Widget);
    
    	    break;
    		
    		case ('icon2')
    	    Icon2 = GFxClikWidget(Widget);
    		
    	    break;
    		
    		case ('icon3'): // this assumes your Scrolling List has an instance name of 'sl' in Flash.
    	    Icon3 = GFxClikWidget(Widget);
    
    	    break;
    
        
    		case ('fl'): // this assumes your Scrolling List has an instance name of 'sl' in Flash.
    	    FoodList = GFxClikWidget(Widget);
    	    SetUpDataProvider2(FoodList);
    		UpdateCKList();
    		ScrollingList.AddEventListener('CLIK_itemPress',FoodOnClickHandler);
    	    break;
    	}
    	   return true;
    }
    
    function UpdateCKList()
    {
    SetUpDataProvider2(FoodList);
    
    }
    
    function UpdateInventory()
    {
    SetUpDataProvider(ScrollingList);
    }
    
    
    function SetUpDataProvider(GFxClikWidget Widget)
    {
        local byte i;
        local GFxObject DataProvider;
        local GFxObject TempObj;
    
    		PC = tfpPlayerController(GetPC());
    
    
        DataProvider = CreateArray();
    	
        switch(Widget)
        {
    	case (ScrollingList):
    	    for (i = 0; i < PC.char.inventory.Length; i++)
    	    {        
    		TempObj = CreateObject("Object");
    		
    		
    	        TempObj.SetString("label", PC.char.inventory[i].item.DisplayName);
                 //TempObj.SetString("iconimage", PC.char.inventory[i].item.ItemIcon);
                 //TempObj.SetString("itemCount", " "$PC.char.inventory[i].item.Count);			 //      TempObj.SetString("label", "SDADSSD2"); // this will be displayed in the list
    		DataProvider.SetElementObject(i, TempObj);
    	    }
    		
    	    break;
    	default:
    	    break;
        }  
        Widget.SetObject("dataProvider", DataProvider);  	
    }
    
    function SetUpDataProvider2(GFxClikWidget Widget)
    {
        local byte i;
        local GFxObject DataProvider;
        local GFxObject TempObj;
    
    		PC = tfpPlayerController(GetPC());
    
    
        DataProvider = CreateArray();
    	
        switch(Widget)
        {
    	case (FoodList):
    	    for (i = 0; i < ToCookItems.Length; i++)
    	    {        
    		TempObj = CreateObject("Object");
    		
    	        TempObj.SetString("label", ToCookItems[i].item.DisplayName);
                 TempObj.SetString("iconimage", ToCookItems[i].item.ItemIcon);
                 //TempObj.SetString("itemCount", " "$PC.char.inventory[i].item.Count);			 //      TempObj.SetString("label", "SDADSSD2"); // this will be displayed in the list
    		DataProvider.SetElementObject(i, TempObj);
    	    }
    		
    	    break;
    	default:
    	    break;
        }  
        Widget.SetObject("dataProvider", DataProvider);  	
    }
    
    
    function OnClickHandler(GFxClikWidget.EventData ev) 
    {
     SelectedIndex = ev.index;
        if(bSlot1Selected == true)
    	{
    	NormalBtn1.SetText(pc.char.inventory[SelectedIndex].ItemName);
    	Icon1.SetString("source",pc.char.inventory[SelectedIndex].item.ItemIcon);
    	ToCookItems.AddItem(PC.char.inventory[SelectedIndex]);
    	}
    	
    	if(bSlot2Unlocked == true && bSlot2Selected == true)
    	{
    	NormalBtn2.SetText(pc.char.inventory[SelectedIndex].ItemName);
    	Icon2.SetString("source",pc.char.inventory[SelectedIndex].item.ItemIcon);
    	ToCookItems.AddItem(PC.char.inventory[SelectedIndex]);
    	}
    	
    	if(bSlot3Unlocked == true && bSlot3Selected == true)
    	{
    	NormalBtn3.SetText(pc.char.inventory[SelectedIndex].ItemName);
    	Icon3.SetString("source",pc.char.inventory[SelectedIndex].item.ItemIcon);
    	ToCookItems.AddItem(PC.char.inventory[SelectedIndex]);
    	}
    	 
    }
    
    function Slot1Func(GFxClikWidget.EventData ev) 
    {
    bSlot1Selected = true;
    SetInventoryVisible(true);
    	 
    }
    
    function Slot2Func(GFxClikWidget.EventData ev) 
    {
    SlotIndex = ev.index;
    	 
    }
    
    function Slot3Func(GFxClikWidget.EventData ev) 
    {
    SlotIndex = ev.index;
    	 
    }
    
    function FoodOnClickHandler(GFxClikWidget.EventData ev) 
    {
         
    	 
    }
    
    function CookItems(GFxClikWidget.EventData ev)
    {
    
    }
    
    defaultproperties
    {   
    
    	bCaptureInput = true;
    	bTakeFocus = true;
    	bIgnoreMouseInput = false;
    	 WidgetBindings.Add((WidgetName="sl",WidgetClass=class'GFxClikWidget'))
    	 WidgetBindings.Add((WidgetName="slot1",WidgetClass=class'GFxClikWidget'))
    	 WidgetBindings.Add((WidgetName="slot2",WidgetClass=class'GFxClikWidget'))
    	 WidgetBindings.Add((WidgetName="slot3",WidgetClass=class'GFxClikWidget'))
    	 WidgetBindings.Add((WidgetName="fl",WidgetClass=class'GFxClikWidget'))
    	RenderTexture = TextureRenderTarget2D'SK_Journal.Test'
    	 MovieInfo=SwfMovie'SURVIVORFlash.CKMovie'
    	
    
    }

    i alredy tried using an second "Empty" flash movie to take input but then i cant even move the mouse in my first flash movie
    Last edited by alvarofer0021; 05-06-2012 at 11:33 AM.
    Rising Soul Studios Main Leader
    S.U.R.V.I.V.O.R RPG Survival Game

    http://www.moddb.com/games/survivor
    http://forums.epicgames.com/showthread.php?t=819282

  2. #2

    Default

    Bump ........
    Rising Soul Studios Main Leader
    S.U.R.V.I.V.O.R RPG Survival Game

    http://www.moddb.com/games/survivor
    http://forums.epicgames.com/showthread.php?t=819282

  3. #3

    Default

    Again bump....

    i just noticed that the mouse over input works but not left and right click
    Last edited by alvarofer0021; 05-19-2012 at 11:39 AM.
    Rising Soul Studios Main Leader
    S.U.R.V.I.V.O.R RPG Survival Game

    http://www.moddb.com/games/survivor
    http://forums.epicgames.com/showthread.php?t=819282

  4. #4
    MSgt. Shooter Person
    Join Date
    May 2011
    Posts
    32

    Default

    I got it to work by doing the following:
    1. Apply Flash Movie 'A' as material to object in world.
    2. Using Kismet Open the GfxMovie at some event, I used Level Loaded.
    3. Create an empty SWF that contains nothing.
    4. In your HUD class, bring up the dummy SWF based on either Trigger(see UDN for how to do this), or a key press.
    5. The empty GfxMovie class has nothing but bAutoPlay=true;

    I am not sure about capturing right click, but I use left click and it works fine.

  5. #5
    MSgt. Shooter Person
    Join Date
    May 2011
    Posts
    32

    Default Interact with In-Game object that uses a Flash SWF as a material

    I got it to work by doing the following:
    1. Apply Flash Movie 'A' as material to object in world.
    2. Using Kismet Open the GfxMovie at some event, I used Level Loaded.
    3. Create an empty SWF that contains nothing.
    4. In your HUD class, bring up the dummy SWF based on either Trigger(see UDN for how to do this), or a key press.
    5. The empty GfxMovie class has nothing but bAutoPlay=true;

    I am not sure about capturing right click, but I use left click and it works fine.

  6. #6

    Default

    thanks but i alredy tried this with no luck

    HUD Wrapper class

    Code:
    exec function ToggleCKMovie()
    {
      EmptyMovie = new class'GFxEmptyMovie'; // "Empty" Movie
               
                EmptyMovie.bEnableGammaCorrection = FALSE;
                EmptyMovie.SetTimingMode(TM_Real);
    			EmptyMovie.SetViewScaleMode(SM_ShowAll);
    		    EmptyMovie.SetAlignment(Align_CenterRight);
    			EmptyMovie.Start();
    
    
            if (CKMovie == None)
            {
    			  
    	       CKMovie.MovieInfo = SwfMovie'SURVIVORFlash.CKMovie'; // now the one in wich i want input
                CKMovie.bEnableGammaCorrection = FALSE;
                CKMovie.SetTimingMode(TM_Real);
    			CKMovie.SetViewScaleMode(SM_ShowAll);
    		    CKMovie.SetAlignment(Align_BottomRight );
     }
    
     }

    I really have tried every single thing that came to my mind but yet NOTHING seems to work, The weird part is Why the Mouse Over works in the button , but the rest of the input not?

    i mean once i open the movie in FULLSCREEN it takes input properly doesnt allow player to move etc

    but if use the render texture then the player can rotate,move etc

    And i really need to find a way to make this work as most of the interfaces in my game reside on render textures and i really dont want to re-design everything just becouse this seems to be broken
    Last edited by alvarofer0021; 05-21-2012 at 03:47 PM.
    Rising Soul Studios Main Leader
    S.U.R.V.I.V.O.R RPG Survival Game

    http://www.moddb.com/games/survivor
    http://forums.epicgames.com/showthread.php?t=819282

  7. #7

    Default

    This appears to be a bug in current versions of UDK. It used to work fine, but after testing, I can confirm this no longer works as expected.

  8. #8

    Default

    Thanks for confirming matt do you know if this will be fixed in the next UDK Build?

    as this is key for the interfaces i was making
    Rising Soul Studios Main Leader
    S.U.R.V.I.V.O.R RPG Survival Game

    http://www.moddb.com/games/survivor
    http://forums.epicgames.com/showthread.php?t=819282


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.