Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
Listbox color change..

Listbox color change..

2004-03-14       - By Chizl

 Back
Reply:     1     2     3  

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..&nbsp;&nbsp;&nbsp; I'm new to this forum
and I'm somewhat a newbie in flash&#8230;&nbsp;&nbsp; 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..&nbsp; :)</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..&nbsp; 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 = &quot;Verdana&quot;;</FONT>

<BR><FONT SIZE=2 FACE="Arial">s.fontSize = 5;</FONT>

<BR><FONT SIZE=2 FACE="Arial">s.fontWeight = &quot;bold&quot;;</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=&quot;Verdana&quot; </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=&quot;Verdana&quot;<
/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(&quot;textColor&quot;,
0xFF0000);</FONT>

<BR><FONT SIZE=2 FACE="Arial">MP3List.setStyleProperty(&quot;face&quot;,
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??
&nbsp; </FONT>
</P>

</BODY>
</HTML>