{"id":95,"date":"2011-08-25T00:00:46","date_gmt":"2011-08-25T00:00:46","guid":{"rendered":"http:\/\/bloodforge.com\/?p=95"},"modified":"2020-02-20T03:19:55","modified_gmt":"2020-02-20T03:19:55","slug":"flash-combobox-setstyle-works-in-test-debug-and-not-in-publish-swf","status":"publish","type":"post","link":"https:\/\/bloodforge.azurewebsites.net\/index.php\/2011\/08\/25\/flash-combobox-setstyle-works-in-test-debug-and-not-in-publish-swf\/","title":{"rendered":"Flash Combobox setStyle works in Test (debug) and not in Publish (swf)"},"content":{"rendered":"\n<p>I tried to customize the combobox ( AS3 ), and everything was working fine by using cbo.setStyle( &#8220;embedFonts&#8221; ) and cbo.setStyle( &#8220;textFormat&#8221; ) while testing the movie. &nbsp;However, when I published the SWF, the styles were no longer working.<\/p>\n\n\n\n<p>It seems like setStyle doesn&#8217;t really work properly for comboboxes for some reason. &nbsp;The solution was to apply the setStyle to the textField inside the combobox, and not to the combobox itself.<\/p>\n\n\n\n<p>For example, this doesn&#8217;t work:&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cbo.setStyle( \"embedFonts\", true );\ncbo.setStyle( \"textFormat\", tf );<\/code><\/pre>\n\n\n\n<p> but this works: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cbo.textField.setStyle( \"embedFonts\", true );\ncbo.textField.setStyle( \"textFormat\", tf );<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I tried to customize the combobox ( AS3 ), and everything was working fine by using cbo.setStyle( &#8220;embedFonts&#8221; ) and cbo.setStyle( &#8220;textFormat&#8221; ) while testing the movie. &nbsp;However, when I published the SWF, the styles were no longer working. It seems like setStyle doesn&#8217;t really work properly for comboboxes for some reason. &nbsp;The solution was [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/95"}],"collection":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/comments?post=95"}],"version-history":[{"count":1,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":96,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/posts\/95\/revisions\/96"}],"wp:attachment":[{"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/media?parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/categories?post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bloodforge.azurewebsites.net\/index.php\/wp-json\/wp\/v2\/tags?post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}