Announcement

Collapse
No announcement yet.

AS3 CLIK Components not working

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

  • replied
    HOW????

    Originally posted by Serbin View Post
    Edit: I got it working.
    How did you get it to work? I have spent days trying to make mine work, please tell me. Thanks

    Leave a comment:


  • replied
    Edit: I got it working.

    Leave a comment:


  • replied
    Thanks limscafo

    Leave a comment:


  • replied
    There is something called the "Complex Object Interface"

    Not sure how it works, but it contains "visible" and other stuff.

    Code:
    /** Struct for storing properties of display objects for easy and quick manipulation at runtime using the Complex Object Interface */
    struct native ASDisplayInfo
    {
    	var() float  X, Y, Z;
    	var() float  Rotation;
    	var() float  XRotation, YRotation;
    	var() float  XScale, YScale, ZScale;
    	var() float  Alpha;
    	var() bool   Visible;
    	var() bool   hasX, hasY, hasZ, hasRotation, hasXRotation, hasYRotation, hasXScale, hasYScale, hasZScale, hasAlpha, hasVisible;
    };
    So you have your button and maybe read and write to it:

    openInventory.GetDisplayInfo().Visible = false; ??? see: http://uncodex.com/2012-03/gfxui/gfxobject.html

    Leave a comment:


  • replied
    I tried adding the invisible rectangle and it didn't work

    Here is an image of the clik button and it's properties: http://i.imgur.com/qI9N2Vj.png
    Here's a video of the problem I'm having: http://www.youtube.com/watch?v=ntw5jANRdcA
    (I was finally able to click it at 0:50) (Does anyone know why that purple thing appears when I shoot?)

    Here's the DefaultProperties and WidgetInitialized code
    Code:
    event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
    {
    	switch(WidgetName)
    	{
    		case('openInventoryBtn'):
    			`log("openInventoryBtn initialized");
    			openInventoryBtn = GFxClikWidget(Widget);
    			openInventoryBtn.AddEventListener('CLIK_buttonPress', SetUInventory);
    			break;
    		case('openInventory'):
    			`log("openInventory initialized");
    			openInventory = GFxClikWidget(Widget);
    			openInventory.AddEventListener('CLIK_buttonPress', SetUInventory);
    			break;
    		default:
    			break;
    	}
    
    	return true;
    }
    
    DefaultProperties
    {
    WidgetBindings.Add((WidgetName="openInventory",WidgetClass=class'GFxCLIKWidget'))
    WidgetBindings.Add((WidgetName="openInventoryBtn",WidgetClass=class'GFxCLIKWidget'))
    
    bDisplayWithHudOff = false
    
    MovieInfo = SwfMovieTest_Content.flash.Game_HUD'
    
    bEnableGammaCorrection = false
    bAllowInput=true
    }
    Also, how do I check the visible and selected properties in unrealscript?

    Leave a comment:


  • replied
    Have the buttons been skinned or altered at all? Do they use autosize? The hit area seems to work on the largest visible area of the component. If you have altered them, I'd check the outline view on each frame to see that the largest area stays pretty much the same size. Try adding an invisible rectangle (alpha0%) at the bottom layer of the component and see if that fixes things.

    Not sure what your use of the Boolean is, clik components have the "selected" property? If that works for what you are trying to achieve - Id run by that first or things can get complicated.

    For the visible bit you could always declare a as3 wrapper function to check/return the .visible property?

    Leave a comment:


  • started a topic AS3 CLIK Components not working

    AS3 CLIK Components not working

    I have a problem with a CLIK button using the 'CLIK_buttonPress' event. It works fine in the Scaleform Launcher but in UDK I was only able to click a very small area on the button or it wouldn't work. Does anyone have an idea what might be wrong?

    Edit: I setup the click events in actionscript instead of unrealscript and it works fine in the Scaleform Launcher but I'm still having the problem above when playing my game in UDK

    Also, does anyone know which would be better:
    Making a boolean that is set to true when a button is clicked and false when it's clicked again (repeating)
    Checking the visibility of a movie clip

    If checking the visibility is better, how would I check the visibility in unrealscript?
Working...
X