Announcement

Collapse
No announcement yet.

Loading Images!

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

    Loading Images!

    hi all,
    i use the bellow code for load images from unreal packages into swf file,
    var GFxObject Root;

    function LoadImages()
    {
    local GFxObject myImageLoader;
    myImageLoader=Root.GetObject("ui_loader");
    myImageLoader.SetString("source", "img//UI_FrontEnd_Art.GameTypes.___Deathmatch");
    }
    but it doesn't work.
    can you help me?
    thanks.

    #2
    hi again,
    i have some textures in an unreal package,
    and i want load the textures on UILoader component into a swf file,and i want use the swf file as user interface in my game.
    i have the below code in my unreal script:
    class BSUserInterface extends GFxMoviePlayer;
    var GFxObject Root;
    function Init(optional LocalPlayer LocPlay)
    {
    super.Init(LocPlay);
    Root=GetVariableObject("_root");
    UpdateImages ();
    }
    function UpdateImages()
    {
    local GFxObject myImageLoader;
    myImageLoader=Root.GetObject("ui_loader");
    myImageLoader.SetString("source","img//UI_FrontEnd_Art.GameTypes.___Deathmatch");
    }
    DefaultProperties
    {
    MovieInfo = SwfMovie'UserInterface.UserInterface'
    bAutoPlay=true
    }
    "ui_loader" is name of an UILoader component in the swf file.
    i help from the below link to write the UpadateImages function
    http://udn.epicgames.com/Three/Scale...ading%20Images
    note:when i write the code that be used for load image at runtime in the link,i face with a compile error,the error related to GetObject function,so i add Root before GetObject.
    now i have a problem,
    when my game be run in visual studio i face with udk.exe error
    i put image of udk.exe error in below:

    what's problem?
    please help me
    thanks.

    Comment


      #3
      http://udn.epicgames.com/Three/Scale...ading%20Images
      sorry!
      the link is here

      Comment


        #4
        Open the editor.

        Right click your texture file and select Copy Full Name to Clipboard.
        Paste that to a text file somewhere (anywhere). You will see something like this:

        Code:
        Texture2D'Something.somethingelse.myTexture'
        Something = the package name.
        Somethingelse = the group name. (you may or may not have this part)
        myTexture = the texture name.

        Now copy ONLY the Something.somethingelse.myTexture part.

        Then use this code in UnrealScript:
        Code:
        var GFxObject Root;
        
        function Init(optional LocalPlayer LocPlay)
        {
            super.Init(LocPlay);
            Root = GetVariableObject("_root");
            UpdateImages ();
        }
        
        function UpdateImages()
        {
            local GFxObject myImageLoader;
            myImageLoader = Root.GetObject("ui_loader"); // ui_loader = instance name of UILoader CLIK component in Flash
            myImageLoader.SetString("source","img://Something.somethingelse.myTexture");
        }
        By the way - the code you wrote is missing the : (colon) after img. That is a syntax error and it very likely what is causing your UDK to crash.

        Comment


          #5
          thanks very very much

          Comment

          Working...
          X