Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-20-2008, 10:01 AM
Member
 
Join Date: Nov 2007
Posts: 46
Default another ini file problem :s

i use this code:
Code:
var ini = new Ini("settings.ini");
var resolution = ini.getString("RESOLUTION SETTINGS", "resolution");
trace (resolution)
i get traced:
key not found
my ini file:
Code:
[RESOLUTION SETTINGS]
resolution = 1024
why doesn't this work?
in my other project it works fine >
Reply With Quote
  #2 (permalink)  
Old 01-20-2008, 01:23 PM
Member
 
Join Date: Nov 2007
Posts: 46
Default Re: another ini file problem :s

i forgot to tell that the ini file is packed within the movie, but that shouldn't be a problem, right?
Reply With Quote
  #3 (permalink)  
Old 01-20-2008, 01:55 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: another ini file problem :s

Please try
Code:
var ini = new Ini(getAdditionalFile("settings.ini"));
And it is read-only, so you will not be able to write a string into it.
Reply With Quote
  #4 (permalink)  
Old 01-20-2008, 03:20 PM
Member
 
Join Date: Nov 2007
Posts: 46
Default Re: another ini file problem :s

ok
and how do you read an ini file wich is in the same folder as the application?
i use this code in flash (as 2.0)
Code:
import SWFKit.*;
var path = getAppDir();
var ini = new Ini(path+"wiimenu.ini");
var resolution = ini.getString("RESOLUTION SETTINGS", "resolution");
but in the textfield resolution i get the error:
key not found.
Reply With Quote
  #5 (permalink)  
Old 01-24-2008, 05:57 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: another ini file problem :s

SWFKit global functions are wrapped in the "Global" object, so to call the getAppDir method, you will have to use the following code
Code:
Global.getAppDir();
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:53 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.