|
-
Embed font in Combo Box and Radio Buttons
Hi all,
Yes me again.
I am currently creating a contact form which scrolls up and down showing form components. I am using shared library fonts from another swf which is working fine however because I needed it to be masked therfore need to embed the fonts. This is easy to do with text boxes however I am having trouble in embedding a shared font into a combo box and radio buttons.
I am using this actionscript for the combo box
Code:
var myStyleFormat = new _root.contactDetails.contactResearch.ComboBox.FStyleFormat();
myStyleFormat.textColor = 0xFF0000;
myStyleFormat.embedFonts = true;
myStyleFormat.textFont = "Font Standard"; // Name of the embedded font
myStyleFormat.FStyleFormat.applyChanges();
I think that I am on the right lines but its not quite working. Does anyone have any ideas?
Thanks
Using Flash MX on WinXP Pro
"Destiny is not a matter of chance. It is a matter of choice"
William Jennings Bryan
-
Think you could simply embed the font in the FLabel's (editing the component itself from the Library...) textfield.
-
I don't see how you can do it because I have the combobox in the main scene one Level0 and I am simply just trying to link its font for another shared library. On text boxes there is an option in the properities panel where by changing the Character you can emebed the fonts for that individual text box but I do not see that option for Combo boxes or Radio buttons. I therefore have found some actionscripts which should be able to do the same thing but dymanically. The unfortunate thing is I cant get it to work. Regarding your comment. I has a look at the script of the combo box. Its very extensive at 480 line of code without explaination which makes it difficult to interperate. I cant see any text boxes that It might refer to either. It does not look like that I can hard code the combo box.
I am sure however that it is possible to change the font dynamically though. Any more ideas.
Thanks
Using Flash MX on WinXP Pro
"Destiny is not a matter of chance. It is a matter of choice"
William Jennings Bryan
-
I didn't say anything about the comboBox or radio components themselves. I said the FLabel component, which is used by the other components. The Flabel component is but a textfield in which the font isn't embedded (default) so you would simply embed it as you would any other normal textfield, by hitting the Character tab and selecting All Characters...
In the Library...
Flash UI Components -> Component Skins -> Global Skins -> FLabel component
-
You are simply the KING of actionscript.
You were right. I made the appropriate changes and it works just as it should.
Thanks again.
Using Flash MX on WinXP Pro
"Destiny is not a matter of chance. It is a matter of choice"
William Jennings Bryan
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
|