Ask a Question related to Macromedia Flash, Design and Development.
-
Fain Cowie #1
Load color from text file...
I'm trying to use loadvariables to load a color from a text file like this:
loadVariables("colors.txt",_root);
Jan01.lblDateMemo.textcolor = color1
The textfile reads;
color1=0xff0000&color2=0x00f000&color3=0x0000ff
but it doesn't matter what I set the colors to, I get black
Any ideas?
Fain
Fain Cowie Guest
-
how to load embedded text file content
I need to have some unstructured data that is contained in text files compiled into my application, and then be able to access those files from my... -
Load data from Text File
Im am creating a web page and i wish to have a flash and non flash page. To make it easier on me when updating the pages i want to make them both... -
using text file to load my cast ......
I have a projector file that loads a web page first and then a swf movie and then some power point slides.How can I make a text file that shows me... -
load a .swf file within current .swf as per value of external text file
Hi ! I am confused at a point and need help. I just want to load a .swf file within my current .swf file as per the value the external text... -
Load Text from Text file with html links?
Try http://opensource.brajeshwar.com/downloads/dynamictextscroll/ and just change it to your liking, it have html links as far as I can remember. ... -
Martin Voegeli, vom #2
Re: Load color from text file...
> I'm trying to use loadvariables to load a color from a text file
You have to wait for the variables to load - this doesn't happen> like this:
>
> loadVariables("colors.txt",_root);
> Jan01.lblDateMemo.textcolor = color1
>
> The textfile reads;
> color1=0xff0000&color2=0x00f000&color3=0x0000ff
>
> but it doesn't matter what I set the colors to, I get black
>
> Any ideas? Fain Cowie
instantaneously. With Flash MX you can use LoadVars(). This object
implements an onLoad() event handler.
Have a look at the following page. Search for the paragraph "Receiving
using LoadVars.load" you can find some advice there. Furthermore you'll
find a link to the official information of Macromedia:
[url]http://actionscript-toolbox.com/samplemx_loadvars.php[/url]
[url]http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary427.html[/url]
Best wishes, Martin ;) * [url]http://birdy1976.com/[/url] * ICQ# 237743398
Martin Voegeli, vom Guest
-
Fain Cowie #3
Re: Load color from text file...
"Martin Voegeli, vom" <MartinVoegeli@gmx.ch> wrote in message news:<3F4B1126.165CB93F@gmx.ch>...
Thanks Martin, but I don't think that is the problem (yet). All of the>> > I'm trying to use loadvariables to load a color from a text file
> > like this:
> >
> > loadVariables("colors.txt",_root);
> > Jan01.lblDateMemo.textcolor = color1
> >
> > The textfile reads;
> > color1=0xff0000&color2=0x00f000&color3=0x0000ff
> >
> > but it doesn't matter what I set the colors to, I get black
> >
> > Any ideas? Fain Cowie
> You have to wait for the variables to load - this doesn't happen
> instantaneously. With Flash MX you can use LoadVars(). This object
> implements an onLoad() event handler.
>
> Have a look at the following page. Search for the paragraph "Receiving
> using LoadVars.load" you can find some advice there. Furthermore you'll
> find a link to the official information of Macromedia:
>
> [url]http://actionscript-toolbox.com/samplemx_loadvars.php[/url]
> [url]http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary427.html[/url]
>
> Best wishes, Martin ;) * [url]http://birdy1976.com/[/url] * ICQ# 237743398
text variables are loaded from beginning to end and assigned.But flash
seems to assign everything but the hex colors.(at the beginning of the
text file) If I trace the color variables, they show up unassigned.
Fain Cowie Guest
-
Javier Cerdas #4
Re: Load color from text file...
Just my two cents here... could it be that the values are detected by
Flash as strings and not hex numbers when you make the assignment to
the textcolor property?
Javi...
On 27 Aug 2003 10:27:17 -0700, [email]cowiefr@yahoo.com[/email] (Fain Cowie) wrote:
>"Martin Voegeli, vom" <MartinVoegeli@gmx.ch> wrote in message news:<3F4B1126.165CB93F@gmx.ch>...>>>>> > I'm trying to use loadvariables to load a color from a text file
>> > like this:
>> >
>> > loadVariables("colors.txt",_root);
>> > Jan01.lblDateMemo.textcolor = color1
>> >
>> > The textfile reads;
>> > color1=0xff0000&color2=0x00f000&color3=0x0000ff
>> >
>> > but it doesn't matter what I set the colors to, I get black
>> >
>> > Any ideas? Fain Cowie
>> You have to wait for the variables to load - this doesn't happen
>> instantaneously. With Flash MX you can use LoadVars(). This object
>> implements an onLoad() event handler.
>>
>> Have a look at the following page. Search for the paragraph "Receiving
>> using LoadVars.load" you can find some advice there. Furthermore you'll
>> find a link to the official information of Macromedia:
>>
>> [url]http://actionscript-toolbox.com/samplemx_loadvars.php[/url]
>> [url]http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary427.html[/url]
>>
>> Best wishes, Martin ;) * [url]http://birdy1976.com/[/url] * ICQ# 237743398
>Thanks Martin, but I don't think that is the problem (yet). All of the
>text variables are loaded from beginning to end and assigned.But flash
>seems to assign everything but the hex colors.(at the beginning of the
>text file) If I trace the color variables, they show up unassigned.Javier Cerdas Guest
-
Fain Cowie #5
Re: Load color from text file...
"MOF" <mof_daddy@hotmail.com> wrote in message news:<eYb3b.61469$Kb2.2644754@news010.worldonline. dk>...
Yipee! I stumbled on at least a temporary answer! It was sheer luck. I> Nope... the Color.setRGB() support strings as well....
>
> These are both valid:
> myColor.setRGB(0x00FF00);
> myColor.setRGB("0x00FF00");
>
> // Morten
>
>
> "Javier Cerdas" <jdc@mdtsoft.com> wrote in message
> news:smvpkv4p5pk5oscb096neqc86q9cu5qcbm@4ax.com...> news:<3F4B1126.165CB93F@gmx.ch>...> > Just my two cents here... could it be that the values are detected by
> > Flash as strings and not hex numbers when you make the assignment to
> > the textcolor property?
> >
> > Javi...
> >
> >
> > On 27 Aug 2003 10:27:17 -0700, [email]cowiefr@yahoo.com[/email] (Fain Cowie) wrote:
> >> > >"Martin Voegeli, vom" <MartinVoegeli@gmx.ch> wrote in message> [url]http://www.macromedia.com/support/flash/action_scripts/actionscript_dictiona[/url]> > >> > I'm trying to use loadvariables to load a color from a text file
> > >> > like this:
> > >> >
> > >> > loadVariables("colors.txt",_root);
> > >> > Jan01.lblDateMemo.textcolor = color1
> > >> >
> > >> > The textfile reads;
> > >> > color1=0xff0000&color2=0x00f000&color3=0x0000ff
> > >> >
> > >> > but it doesn't matter what I set the colors to, I get black
> > >> >
> > >> > Any ideas? Fain Cowie
> > >>
> > >> You have to wait for the variables to load - this doesn't happen
> > >> instantaneously. With Flash MX you can use LoadVars(). This object
> > >> implements an onLoad() event handler.
> > >>
> > >> Have a look at the following page. Search for the paragraph "Receiving
> > >> using LoadVars.load" you can find some advice there. Furthermore you'll
> > >> find a link to the official information of Macromedia:
> > >>
> > >> [url]http://actionscript-toolbox.com/samplemx_loadvars.php[/url]
> > >>
> ry/actionscript_dictionary427.html> >> > >>
> > >> Best wishes, Martin ;) * [url]http://birdy1976.com/[/url] * ICQ# 237743398
> > >
> > >Thanks Martin, but I don't think that is the problem (yet). All of the
> > >text variables are loaded from beginning to end and assigned.But flash
> > >seems to assign everything but the hex colors.(at the beginning of the
> > >text file) If I trace the color variables, they show up unassigned.
noticed in the Trace panel that the variable had an empty line behind
it. I remembered reading somewhere that the each variable in a text
file included a newline and a carriage return. I tried using:
Jan01.lblDateMemo.textcolor = ParseInt(color1)
That removes the additional symbols and returns an integer value for
the color.
Thanks for your input...
Fain
Fain Cowie Guest



Reply With Quote

