Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Monday, January 30, 2012

unable to open 'C:\... libs\player\9.0\playerglobal.swc' - Solution

If you ever see an error unable to open 'C:\... libs\player\9.0\playerglobal.swc' in your Problems tab maybe below is a solution for you.
I found this situation while importing some projects. I'm still using flex builder 3 while project has been imported from flash builder 4 where was SDK 4.1. I'm not sure why, but somehow during import some old sdk was used as default. Of course I switched it to the good one but then this error occurred.

The fastest way is to set, and later unset requiring a flash version in compiler tab in project properties.
All you have to do is to check 'Generate HTML wrapper file.
Check Require Flash Player version ans set at least major number to 10.
Press Apply.
Uncheck 'Generate ...' so it will turn off.
It's done!




Friday, November 11, 2011

Problem with updating SDK in Flash builder - Flash player version

I've added another version of  SDK to my Flash builder. It's easy as CTRL+C, CTRL+V. But afterwards my projects were complaining that they don't see flash player and throws error with playerglobal.swc in it's title.

I have to mention that I was switching from sdk 3.5 to 4.1 so automatically I had to upgrade player form version 9 to 10.

In my project properties I had unchecked generating html site with embedded flash like on screen below. I thought if it is disabled IDE is not taking this into consideration. WRONG!
When I:

  1.  selected "Generate HTML wrapper file"
  2. put new version of flash player (10.0.0 instead of 9.0.124)
  3. pressed "Apply"
  4. unselected "Generate HTML wrapper file"
Errors dissapeared.

One more thing. I'm not using html wraper file. I'm not sure how it works when you have it selected. Maybe it'll update automatically. If not do it manually but with ommiting points 1 and 4 from my list.

Saturday, August 6, 2011

Letter Spacing - TextFormat or css StyleSheet

If you;re looking for example of setting letter spacing - here it is.

The first solution is TextFormat. The property is named same in both options - letterSpacing. Let's see the code:

var txtfmodified:TextField = new TextField();
addChild(txtfmodified);
txtfmodified.y =20;
txtfmodified.text = 'hello world';
var tf:TextFormat = txtfmodified.getTextFormat();
tf.letterSpacing = 3; /* I tried lots of different values here. */
txtfmodified.setTextFormat(tf);

We can also use stylesheet to adjust part of text (in previous solution you can also adjust part of text but selecting chars is more complicated than using styles for classes of html tags). Here is the example:

var txtfmodified2:TextField = new TextField();
addChild(txtfmodified2);
txtfmodified2.y =40;
txtfmodified2.text = 'hello world';
var s:StyleSheet = new StyleSheet();
s.setStyle("p", {letterSpacing:3});
txtfmodified2.styleSheet = s;
txtfmodified2.htmlText = "<p>hello world</p>";

Remember that there are two solutions but you cannot mix them. Either way you'll receive error like this:
Error: Error #2009: This method cannot be used on a text field with a style sheet


And a proof at the end. First line is simple not modified field. Second line is modified by TextFormat properties. Third line is adjusted by stylesheet.




Thursday, April 28, 2011

VerifyError: Error #1053: Illegal override of z in mx.core.BitmapAsset.

Have you ever got error like in title? I was wondering what's the problem. I've checked everything twice. Spent on this some time. Solution? Check version of flash player and SDK that you're using. I had Flash player 10.1, I was compiling to 9.0 but was using SDK 4.2