Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Change color of text inside .swc library

Engaged ,
Mar 23, 2015 Mar 23, 2015

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?

TOPICS
ActionScript
746
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 24, 2015 Mar 24, 2015

ask for the fla that was used to create the swc so you can inspect it.

Translate
Community Expert ,
Mar 23, 2015 Mar 23, 2015

you have to understand the internal workings of the swc to control its inner workings, or check the swc's api.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 24, 2015 Mar 24, 2015

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2015 Mar 24, 2015

general swc info won't help.

you need specific info about the swc you are using.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 24, 2015 Mar 24, 2015

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2015 Mar 24, 2015

ask for the fla that was used to create the swc so you can inspect it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 24, 2015 Mar 24, 2015

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2015 Mar 24, 2015
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines