Hello. I have a small problem. I'm trying to parse an array of strings from .ini file to flash, using:
While in ActionScript I set them up using:
The problem is, however, that I can't tell whether or not the saves are parsed correctly, or if the code works as it should, because instead of any readable text, or at least 'undefined' all I'm getting are few black squares. I guess it's font embedding thing, and this is my question - how can I embed fonts using Vectorian Giotto and FlashDevelop?
Code:
function SetUpSaves() { local byte i; local GFxObject DataProvider; local GFxObject TempObj; local GFxObject RootMC; local ZombiePlayerController PC; PC = ZombiePlayerController(GetPC()); RootMC = GetVariableObject("_root"); DataProvider = CreateArray(); for (i = 0; i < PC.SaveName.Length; i++) { TempObj = CreateObject("Object"); TempObj.SetString("SaveName", PC.SaveName[i]); // TempObj.SetString("ItemType", Inventory[i].ItemType); // TempObj.SetString("ItemDesc", Inventory[i].ItemDesc); DataProvider.SetElementObject(i, TempObj); } RootMC.SetObject("saves", DataProvider); }
Code:
_root.cntBtn.onRelease = function() { //FlashConnect.trace("WORKS"); _root.playBtn._visible = false; _root.exitBtn._visible = false; _root.cntBtn._visible = false; var saves:Array = []; var i:Number; //for (i = 0; i < saves.length; i++) for (i = 0; i < 4; i++) { //_root.createTextField(saves[i], _root.getNextHighestDepth(), _root._height - 100 * i, _root._width - 200, 300, 20); _root.createTextField("my_txt" + i, _root.getNextHighestDepth(), _root._width / 2, _root._height / 2 + (i * 20), 300, 20); _root["my_txt"+i].border = true; _root["my_txt" + i].text = saves[i].text; FlashConnect.trace("WORKS"); }
Comment