UDN
Search public documentation:
GFxVariableAccess
日本語訳
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
中国翻译
한국어
Interested in the Unreal Engine?
Visit the Unreal Technology site.
Looking for jobs and company info?
Check out the Epic games site.
Questions about support via UDN?
Contact the UDN Staff
How to access variables from an external SWF
Overview
This example demonstrates how you would access variables from an external SWF within Unrealscript.
var MyString:String = "Something cool"; var MyNumber:Number = 37; var MyBoolean:Boolean = true;
var bool myBoolean; var string myString; var float myNumber; var GFxObject RootMC RootMC = GetVariableObject("_root"); /* Get AS Vars */ myBoolean = RootMC.GetBool("MyBoolean"); myString = RootMC.GetString("MyString"); myNumber = RootMC.GetFloat("MyNumber"); `log("##### MyBoolean: "@myBoolean); `log("##### MyString: "@myString); `log("##### MyNumber: "@myNumber); /* Set AS Vars */ RootMC.SetBool("MyBoolean", false); RootMC.SetString("MyString", "Something AWESOME!"); RootMC.SetFloat("MyNumber", 100); `log("##### MyString changed to: "@RootMC.GetString("MyString"));