-
Genius
Loading Color from external txtFile
Hi,
I'm trying to load the value of a color (for a background MC) from an external txtFile.
In the file there's something like
Code:
_root.theColor=0x1F1229
In the AS:
code:
backColor = new Color(_root.mcBack);
backColor.setRGB(_root.theColor);
Pitty, does not work. How should I do this?
It works fine when I give the value of the color in the AS...
thx for helping,
Genius
Genius is one percent inspiration and 99 percent perspiration.
-
Registered User
hi,
in the text file you should have:
Code:
&theColor=0x1F1229&
, if you use loadVariables() or loadVariablesNum().
You have to preload the variables, to make sure it's avaiable when you try to use it.
I suggest you read loading variables
Here's an example with LoadVars(), the preferred way...
-
Genius
Genius is one percent inspiration and 99 percent perspiration.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|