Announcement

Collapse
No announcement yet.

Scaleform HUD errors. Help!

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

    Scaleform HUD errors. Help!

    Hello!

    I'm working on a Scaleform HUD and my ActionScript (which is directly copied from https://www.youtube.com/watch?v=E8oM808ETWs) is having some really interesting errors. The screenshot below shows them:

    http://i40.photobucket.com/albums/e2.../as3errors.png

    Here's the AS code I have:

    Code:
    import flash.external.ExternalInterface;
    import gfx.motion.Tween;
    _global.gfxExtensions=true;
    
    function init()
    {
    	_root.Health._yrotation = 30;
    	_root.Ammo._yrotation = 30;
    }
    
    init();
    I looked in the UDK_hud.fla file and found some of the code I have is identical to what's there (except it compiles). I have no idea what I'm doing wrong. Any help would be greatly appreciated asap. Thank you.

    #2
    Do you mean: import scaleform.clik.motion.Tween; or import fl.transitions.Tween; ?

    gfx.motion.Tween does not exist for me either.

    Also "_root" has changed to "root" in Actionscript3.

    Comment


      #3
      have you define the CLIK folder path in your AS3 settings?

      Comment


        #4
        I changed _root to root so that's fixed. My CLIK folder is: C:\UDK\UDK-2014-02\Development\Flash\AS3\CLIK

        The tutorial I was following didn't say anything about either the scaleform.clik.motion.Twwen; or import.fl.transition.Tween;, but I changed those and got rid of the gfx.motion.Tween issue.

        I'm getting other errors now that include:

        http://i40.photobucket.com/albums/e2..._HUD_error.png

        My code now:

        Code:
        import flash.external.ExternalInterface;
        import scaleform.clik.motion.Tween;
        import fl.transitions.Tween;
        
        function init()
        {
        	root.Health._yrotation = 30;
        	root.Ammo._yrotation = 30;
        }
        
        init();
        
        root.onEnterFrame = function() 
        {
        	angle += 0.1;
        	var sined:Number = Math.sin(angle) +2;
        	sined /= 2;
        
        	 root.Health.Title._z = -200 * sined;
        	 root.Health.Bar._z = -500 * sined;
        	 root.Health.Value._z = -200 * sined;
        	 root.Health.Background._z = 200 * sined;
        	 
        	 root.Ammo.Title._z = -200 * sined;
        	 root.Ammo.Bar._z = -500 * sined;
        	 root.Ammo.Value._z = -200 * sined;
        	 root.Ammo.Background._z = 200 * sined;
        }
        What I have coded is named the same as in my Flash document. Any help would be awesome right now. Thanks!

        PS I wish there were some beginner and easy-to-follow tutorials for Scaleform with AS3 and Flash CS6. Haven't found any so far and the ones I've found are obviously way outdated.

        Comment

        Working...
        X