Announcement

Collapse
No announcement yet.

Scaleform not scaling.

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

    Scaleform not scaling.

    Hello !

    I'm using Nov2011 release.

    I got an issue while trying to scale my HUD menu.
    I got a menu swf (1024px 576px)
    And my ingame HUD swf (1024px 576px)

    As you can see they got both the same size.

    I launch the menu within a map with kismeth => It fit perfectly to the screen.
    However, when I start my regular map, the HUD class create my GFx class containing the ingame HUD swf.
    But it doesn't scale correctly : (

    I've found/seen those post:
    http://forums.epicgames.com/archive/.../t-740442.html
    http://forums.epicgames.com/threads/...nd-SetViewport

    Saying that it should work, but it doesn't in my case -_-

    If anyone got an idea please ^^'

    Nothing fancy on unrealScript side : /
    My class extending HUD:
    Code:
    class MineHUD extends HUD;
    
    
    // Scaleform mouse movie
    var GFxHUD MouseInterfaceGFx;
    //Actor hovered
    var Actor actorHovered;
    
    simulated event PostBeginPlay()
    {
      Super.PostBeginPlay();
    
        MouseInterfaceGFx = new () class'GFxHUD';
        if (MouseInterfaceGFx != None)
        {
        	MouseInterfaceGFx.MouseInterfaceHUD = Self;
    	    MouseInterfaceGFx.SetTimingMode(TM_Game);
            MouseInterfaceGFx.Init(class'Engine'.static.GetEngine().GamePlayers[MouseInterfaceGFx.LocalPlayerOwnerIndex]);
    		MouseInterfaceGFx.SetViewScaleMode(SM_ExactFit);
        }
     
    }
    etc
    My class extending GFx holding the swf file to load:
    Code:
    class GFxHUD extends GFxMoviePlayer;
    
    var GFxObject RootMC;
    
    var MineHUD MouseInterfaceHUD;
    
    function Init(optional LocalPlayer LocalPlayer)
    {
      // Initialize the ScaleForm movie
    	Super.Init(LocalPlayer);
    
    	Start();
    	Advance(0);
    
    	SetViewScaleMode(SM_ExactFit); //Does nothing : (
    	//SetAlignment(Align_BottomRight);
    
    	RootMC = GetVariableObject("_root");
    }
    
    etc...
    
    DefaultProperties
    {
    	MovieInfo = SwfMovie'MyProject.InGameHud''
    }

    #2
    Nobody have issue with the scaling ? : ' (
    I can't figure out my issue here : /
    Any suggestion please ?

    Comment


      #3
      Screen resolution is 1280 x 720 looks like you have TV resolution sizes for your swf

      I'm not exactly sure if that's your issue

      Scalemode comes from flash, docs here

      showAll (Default) makes the entire Flash content visible in the specified area without distortion while maintaining the original aspect ratio of the. Borders can appear on two sides of the application.
      noBorder scales the Flash content to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the application.
      exactFit makes the entire Flash content visible in the specified area without trying to preserve the original aspect ratio. Distortion can occur.
      noScale makes the size of the Flash content fixed, so that it remains unchanged even as the size of the player window changes. Cropping may occur if the player window is smaller than the Flash content.

      Comment


        #4
        Ah, it has to be called on the movie


        MyMovie.SetViewport(0, 0, 1280, 720)
        MyMovie.SetViewScaleMode(SM_ExactFit);

        So I think for you it's this, but I could be wrong

        MovieInfo.SetViewScaleMode(SM_ExactFit);

        Comment

        Working...
        X