  | | | Listbox color change.. | Listbox color change.. 2004-03-14 - By Chizl
Back Hello.. I'm new to this forum and I'm somewhat a newbie in flash. I used to develop in Flash 4 and 5, then as of 3 months ago I was thrown into Flash MX 2004 and using a lot of ActionScript.. I'm kind of between newbie and somewhat decent, so I figure I would just sign up here.. :)
Here is what I'm working on at home.. http://www.chizl.com/music/mp3/
It's an MP3 player and I have a lot of it completed.. The problem I'm having at the moment is changing the color of my Listbox.
Here is what I've tried..
TRY 1: var s = MP3List.style; s.color = 0xff0000; s.fontFamily = "Verdana"; s.fontSize = 5; s.fontWeight = "bold"; s.applyChanges();
TRY 2: var myFstyle=new FStyleFormat() myFstyle.textFont="Verdana" myFstyle.background=0x00ff00 myFstyle.textSize=5 myFstyle.textColor=0xFF0000 myFstyle.face=0x0000FF myFstyle.addListener(MP3List) myFstyle.applyChanges()
TRY 3: globalStyleFormat.textFont="Verdana" globalStyleFormat.textSize=5 globalStyleFormat.textColor=0xFF0000 globalStyleFormat.addListener(MP3List) globalStyleFormat.applyChanges()
TRY 4: MP3List.setStyleProperty("textColor", 0xFF0000); MP3List.setStyleProperty("face", 0xFF0000);
As you can see, I have tried just about everything I can find on the web, but NONE of these seem to do anything not even an error.. Anyone please point me in the right direction??
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0"> <TITLE>Listbox color change..</TITLE> </HEAD> <BODY> <!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hello.. I'm new to this forum and I'm somewhat a newbie in flash… I used to develop in Flash 4 and 5, then as of 3 months ago I was thrown into Flash MX 2004 and using a lot of ActionScript..</FONT></P>
<P><FONT SIZE=2 FACE="Arial">I'm kind of between newbie and somewhat decent, so I figure I would just sign up here.. :)</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">Here is what I'm working on at home..</FONT>
<BR><A HREF="http://www.chizl.com/music/mp3/"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.chizl.com/music/mp3/</FONT></U></A> </P>
<P><FONT SIZE=2 FACE="Arial">It's an MP3 player and I have a lot of it completed.. The problem I'm having at the moment is changing the color of my Listbox.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Here is what I've tried..</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">TRY 1:</FONT>
<BR><FONT SIZE=2 FACE="Arial">var s = MP3List.style;</FONT>
<BR><FONT SIZE=2 FACE="Arial">s.color = 0xff0000;</FONT>
<BR><FONT SIZE=2 FACE="Arial">s.fontFamily = "Verdana";</FONT>
<BR><FONT SIZE=2 FACE="Arial">s.fontSize = 5;</FONT>
<BR><FONT SIZE=2 FACE="Arial">s.fontWeight = "bold";</FONT>
<BR><FONT SIZE=2 FACE="Arial">s.applyChanges();</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">TRY 2:</FONT>
<BR><FONT SIZE=2 FACE="Arial">var myFstyle=new FStyleFormat()</FONT>
<BR><FONT SIZE=2 FACE="Arial">myFstyle.textFont="Verdana" </FONT>
<BR><FONT SIZE=2 FACE="Arial">myFstyle.background=0x00ff00 </FONT>
<BR><FONT SIZE=2 FACE="Arial">myFstyle.textSize=5</FONT>
<BR><FONT SIZE=2 FACE="Arial">myFstyle.textColor=0xFF0000 </FONT>
<BR><FONT SIZE=2 FACE="Arial">myFstyle.face=0x0000FF </FONT>
<BR><FONT SIZE=2 FACE="Arial">myFstyle.addListener(MP3List)</FONT>
<BR><FONT SIZE=2 FACE="Arial">myFstyle.applyChanges()</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">TRY 3:</FONT>
<BR><FONT SIZE=2 FACE="Arial">globalStyleFormat.textFont="Verdana"< /FONT>
<BR><FONT SIZE=2 FACE="Arial">globalStyleFormat.textSize=5</FONT>
<BR><FONT SIZE=2 FACE="Arial">globalStyleFormat.textColor=0xFF0000</FONT>
<BR><FONT SIZE=2 FACE="Arial">globalStyleFormat.addListener(MP3List)</FONT>
<BR><FONT SIZE=2 FACE="Arial">globalStyleFormat.applyChanges()</FONT> </P>
<P><FONT SIZE=2 FACE="Arial">TRY 4:</FONT>
<BR><FONT SIZE=2 FACE="Arial">MP3List.setStyleProperty("textColor", 0xFF0000);</FONT>
<BR><FONT SIZE=2 FACE="Arial">MP3List.setStyleProperty("face", 0xFF0000);</FONT> </P> <BR>
<P><FONT SIZE=2 FACE="Arial">As you can see, I have tried just about everything I can find on the web, but NONE of these seem to do anything not even an error. .</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Anyone please point me in the right direction?? </FONT> </P>
</BODY> </HTML>
|
|
 |