Flash Combobox setStyle works in Test (debug) and not in Publish (swf)

by filip 25. August 2011 12:15

I tried to customize the combobox ( AS3 ), and everything was working fine by using cbo.setStyle( "embedFonts" ) and cbo.setStyle( "textFormat" ) while testing the movie.  However, when I published the SWF, the styles were no longer working.

It seems like setStyle doesn't really work properly for comboboxes for some reason.  The solution was to apply the setStyle to the textField inside the combobox, and not to the combobox itself.

For example, this doesn't work: 

 

cbo.setStyle( "embedFonts", true );
cbo.setStyle( "textFormat", tf );

 

but this works:

cbo.textField.setStyle( "embedFonts", true );
cbo.textField.setStyle( "textFormat", tf );

 

Tags: , ,

Web Development

blog comments powered by Disqus

About Filip Stanek

Death Note Pic I'm a developer at ACG in Cincinnati, OH. I like ASP.NET, Flash, and other web technologies, & enjoy playing chess, video games, etc.

Currently playing:

Disqus

Month List