# FStyleFormat - Gradient?

**URL:** <https://forum.kirupa.com/t/fstyleformat-gradient/11673>\
**Category:** Uncategorized\
**Created:** [January 20, 2003, 10:36pm UTC](https://forum.kirupa.com/t/fstyleformat-gradient/11673 "2003-01-20T22:36:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrthad](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@andrthad](https://forum.kirupa.com/u/andrthad)\
**Post date:** [January 20, 2003, 10:36pm UTC](https://forum.kirupa.com/t/fstyleformat-gradient/11673/1 "2003-01-20T22:36:54Z")

</div>

Hi,

I was reading through one of my Flash books on Actionscript and it said you could do gradients programmatically. I was wondering if you can specify a linear gradient for a FStyleFormat value. For example:

```auto

     formStyleFormat.face = 0xFFFFFF; 

```

If you can, can you also specify whether the linear gradient goes side/side or up/down.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 20, 2003, 10:42pm UTC](https://forum.kirupa.com/t/fstyleformat-gradient/11673/2 "2003-01-20T22:42:40Z")

</div>

As far as I know, you can’t.

beginGradientFill() is how you create gradients in MX. And it is a drawing API thing.

Here is a thread where the beginGradientFill() method is used.

[http://www.kirupaforum.com/showthread.php?s=&threadid=12042](http://www.kirupaforum.com/showthread.php?s=&threadid=12042)

(complicated eh?)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 20, 2003, 11:36pm UTC](https://forum.kirupa.com/t/fstyleformat-gradient/11673/3 "2003-01-20T23:36:40Z")

</div>

You can’t, but you could have a gradient shaped masked by some text to emulate that.

pom :cowboy:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 20, 2003, 11:38pm UTC](https://forum.kirupa.com/t/fstyleformat-gradient/11673/4 "2003-01-20T23:38:51Z")

</div>

i.e. put those two above posts together and you got yourself a winner 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 20, 2003, 11:48pm UTC](https://forum.kirupa.com/t/fstyleformat-gradient/11673/5 "2003-01-20T23:48:01Z")

</div>

Bringing out the big dogs for this question. I like it. Where would Kirupa be without you guys.

I was trying to be able to skin the comboBox component with a gradient face. Sounds like I challenge. I will probably be back with some more questions.

ilyaslamasse,

I didn’t understand what you meant by “gradient shaped masked”. Would you give me an example code?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 20, 2003, 11:51pm UTC](https://forum.kirupa.com/t/fstyleformat-gradient/11673/6 "2003-01-20T23:51:14Z")

</div>

no d, a _gradient shape_, masked by…

basically, have a gradient shape as a movieclip where your text is and set the mask of that gradient to be the text. Then the text has a gradient color.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 21, 2003, 12:01am UTC](https://forum.kirupa.com/t/fstyleformat-gradient/11673/7 "2003-01-21T00:01:49Z")

</div>

Big dogs? :trout:

😛
