Announcement

Collapse
No announcement yet.

[Solved] Dont get textfield changed with US

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

    [Solved] Dont get textfield changed with US

    Hello,
    I searched the last hours for a solution and nothing worked. Its a UnrealScript problem but ScaleForm related.
    I have a movie-clip on the main stage. In this movie-clip "mctablet" on a specific frame a dynamic text-field with the instance name of "locaton_txt" appears.
    Now I want to change the text with UnrealScript:
    Code:
    class GCRTabletMenu extends GFxMoviePlayer;
    
    var GFxObject PositionTitle; // variable for current position
    var GFxObject McTablet;
    
    function bool Start(optional bool StartPaused = false) {
    	super.Start();                  // call start function of parrent class GFxMoviePlayer
    	Advance(0);                     // play the .swf from frame 0
    
    	McTablet = GetVariableObject("_root.mctablet");
    	PositionTitle = GetVariableObject("_root.mctablet.locaton_txt");	    // Assign Textfield to variable 
    	PositionTitle.SetText("LOCATION");                              // set value to Textfield 
    	
    	return true;
    }
    but nothing happens. The strange thing is, when I put the textfield in to root and address the texfield directly over :
    Code:
    PositionTitle = GetVariableObject("_root.locaton_txt");
    The textfield changes.

    Has anyone a idea? Would be amazing

    #2
    It should work as you have it coded. I just did a quick test on my end, and it works fine. I have a dynamic text field on frame 1 inside of a movie clip on the _root timeline.

    What frame of your movie clip is the text field on?

    Comment


      #3
      Hello Matt,
      thank you for the response. It is on frame 17 in the mctablet movieclip.

      Comment


        #4
        when you run the scaleform player look at the log to see the full path for your object. it might be slightly different.

        Comment


          #5
          Hi,
          sorry but where do I find the log? Or do you mean the FxMediaPlayer.exe command window when I test the swf in flash?
          Edit: it is definitely a Flash Path Problem but I cant find why it don't work properly when the location_txt is inside of a Movieclip.
          Edit2: Okay it has something todo with the fact that the textfield appear on a specific frame.


          So it looks like a comon problem in flash. So it dont has anything todo with UnrealScript.
          I placed the textfield on the first frame and made it invisible. On a specific frame I made it visible again.

          Comment

          Working...
          X