Copy link to clipboard
Copied
Hello,
I'm working in Flash Builder 4.5 and I got external .swc library (made with Flash and Flex Component Kit) with some objects. One of these objects is a text field with some text. I need to change color of this text and I'm not sure if it's possible. I tried to change the "color" property but it doesn't change the color. I tried "setStyle('color',0xff000)" but it returns an error.
Is there any other way to modify color of .swc text from Flex/Flash Builder?
ask for the fla that was used to create the swc so you can inspect it.
Copy link to clipboard
Copied
you have to understand the internal workings of the swc to control its inner workings, or check the swc's api.
Copy link to clipboard
Copied
Thank you,
I'm searching the web for some detailed info about text controls in swc, but it's hard to find anything on this topic. The general descriptions of "how swc works" doesn't help either. And I just cannot find anything about "internal workings of swc" with detailed description of text controls. Maybe You have some interesting links about this?
I'm using many swc objects in my app and everything works fine, but always had problems with text controls. Like I cannot change the "text" property of text control, I cannot change it's color. I can change it's alpha and I can apply glow filter but even with filter there is something wrong. When filter is applied on text control created in Flex the blur is somehow attached to every single letter, but when I apply glow to text control inside .swc the blur seems to be applied to the whole object without discriminating separete letters.
Copy link to clipboard
Copied
general swc info won't help.
you need specific info about the swc you are using.
Copy link to clipboard
Copied
I can get the info (this .swc was created by my co-worker in flash) but I don't know what info I'm looking for. It's standard flash text field inside some other display object. I can control few properties, but not the text color or it's content.
Copy link to clipboard
Copied
ask for the fla that was used to create the swc so you can inspect it.
Copy link to clipboard
Copied
Ok. I got it.
Inside Flash it was a movieClip object, not a text field. That's why inside Flex I couldn't change the text content or it's color. And that's why the glow filter wasn't working as it should with text.
As for changing color of text field: property "color" doesn't work with Flash text fields so I had to use "setTextFormat" method.
Thanks for help
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now