Hey Everybody, I've got a rather strange problem, here goes:
I'm running this code inside a custom GFxMoviePlayer class:
Note: "testLabel" is the instance name of a label that simply says "--test--"
Which is attached to a FLA running AS 2.0 and exporting using Flash Player 8.0 (also set up to show traces in UDK log):Code:function Init(optional LocalPlayer player) { super.Init(player); Advance(0); Start(); RootMC = GetVariableObject("_root"); `log("--------------------------------------------------------should've called debug in AS"); RootMC.ActionScriptVoid("DebugDisplay"); //LINE 1 ActionScriptVoid("DebugDisplay"); //LINE 2 `log(GetVariableObject("_root.testLabel").getText()); //LINE 3 }
So the log should readCode:function DebugDisplay() { trace("-------------------- in DebugDisplay()"); }
"--------------------------------------------------------should've called debug in AS"
"-------------------- in DebugDisplay()" | (from LINE 1)
"-------------------- in DebugDisplay()" | (from LINE 2)
"--test--" | (from LINE 3)
Instead, it reads:
ScriptLog: --------------------------------------------------------should've called debug in AS
DevGFxUI: Error: Can't find method '_level0.DebugDisplay' to invoke.
ScriptWarning: Accessed None
CustomGFxMoviePlayer Transient.CustomGFxMoviePlayer_0
Function CustomGame.CustomGFxMoviePlayer:Init:0137
ScriptLog:
Because line 1 (from the unrealscript source) works when called from another function in the same FLA, I know the first error is from line 2 in the unrealscript source (which means since it's not throwing an error for line 1, it's finding the function called in line 1). But why doesn't it print out? the other two errors have be baffled; can anybody shed some light on this?
Thanks![]()



Reply With Quote


Bookmarks