View Full Version : textstyle in listbox
linckx
08-27-2005, 10:00 AM
Hi Guys!
Finally been flashing a little recently... finally stuck again :)
I'm creating this listbox with some links to other stuff, and everything works.
That is of course the most important thing...
now I want to edit the looks of the thing. Everything turned out great...
except the font.
I can't seem to manage (I also searched forum and tried that stuff) to give my text a color and align it right... I used to be able to do such stuff, because on my previous website the text is red... not black...
Is there a not scripting way to it? and if there isn't, where do I have to script what then?
thx in advance!
robin
linckx
08-27-2005, 12:28 PM
found 1 solution allready, how to put colour in it...
I went through the whole maze of scripts and found in my library the right one here:
flash UI components
> core assets developer only
>>FUI component class tree
>>> FUI component SubClasses
>>>>FS selectable Item
and in there there's a script with two colors behind eachother (like xx00ff00) and the first one is 'selected' and the second one 'deselected'...
now let's search how to put it right-aligned...
wish me luck or help me out ;)
robin
linckx
08-27-2005, 01:11 PM
second one solved too!
I just took the lablefield from the component, erased it and put a new one there... worked from the first attempt :)
robin
flashdudette
09-07-2005, 04:46 PM
When using components there is an easy way to change the font color and name and a lot of different things. Use this code and adapt it to your needs.
function setGlobalStyleFormat(){
globalStyleFormat.face = 0x000099;
globalStyleFormat.background = 0x000099;
globalStyleFormat.arrow = 0xFFCC00;
globalStyleFormat.darkshadow = 0xAAAAAA;
globalStyleFormat.shadow = 0xEFEFEF;
globalStyleFormat.highlight = 0xEFEFEF;
globalStyleFormat.highlight3D = 0xAAAAAA;
globalStyleFormat.scrollTrack = 0x0066FF;
globalStyleFormat.selection = 0xAFAFAF;
globalStyleFormat.textSelected = 0x000000;
globalStyleFormat.textColor = 0x666666;
globalStyleFormat.textFont = "ArialEmbedded";
globalStyleFormat.embedFonts = true;
globalStyleFormat.textSize = 13;
globalStyleFormat.applyChanges();
}
setGlobalStyleFormat();
You need to embed the font. Do you know how to do it. But it works without embedding (change the line about embedding to false or rem it out) and just use the name of the font you use.
:)
linckx
09-07-2005, 05:48 PM
Hi there!
thanx for your reply!
I know how to embed fonts, but just little question (haven't got flash in the neighbourhood, otherwise I'd just try it out)
Do I have to implement this code on the first frame of my movie? Because it's a function I guess that'll do, but knowing myself, I'll try it out and it won't do a thing...
Or do I have to tell my component in a way (and what way then?) to apply that function to itself?
greetings!
Robin
flashdudette
09-07-2005, 05:55 PM
Yes, just put it in the first frame. I have never had any problem with it. It works with all the macromedia UI components 1 and 2. It's easy and you change the look of your listbox totally.
I also created a custom list box with other features like extending the text so it can take a long text, an icon for each line, etc...
If you are interested I can email you the file since the customization is a little complicated to post. :)
linckx
09-07-2005, 08:12 PM
please do, and thank you for your help allready!
robin
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.