Archive for the “Problems” Category

Have you ever run into this weird situation when you try to make a FLV video file with Adobe Media Encoder and when you try to resize it the encoder changes the dimensions you entered? No matter what you try you don’t get the desired dimensions.

Once I was in this same situation when I found that: Read the rest of this entry »

Share

Comments No Comments »

Have you ever run into this situation: using a dynamic text field for a mask with some letter spacing other than 0 and checked Auto Kern checkbox applied to the text field, adding some string value to the “text” property of the text field and after exporting the flash movie for Flash Player 8 and ActionScript 2, you see that the text you expect to show in the text field is not showing and the text field seems like it is empty?

I had exactly the same problem recently and found what causes it. Actually when you have a dynamic text field with checked Auto Kern and/or using Letter Spacing other than 0, immediately after you assign any value to the “text” property of the text field the field just “disappears”. So if you want to use auto kerning and/or letter spacing with dynamic text fields and plan to export the flash movie for Flash Player 8, you’d better use the TextFormat’s property “letterSpacing” and “kerning” (set to “true” for Auto Kerning)  like in the example:

var tf:TextFormat = new TextFormat();
 
tf.kerning = true;
 
tf.letterSpacing = 2;
 
myTextField.setNewTextFormat(tf);
 
myTextField.text = "Here goes the text";
Share

Comments No Comments »

Using armature in Flash CS4. Part I – some hints on how to work with Bone Tool, add/remove Poses, copy/paste Poses, name armature layers.

Share

Comments No Comments »

Have you ever tried in ActionScript 3 this:

this.addEventListener(Event.ENTER_FRAME, cpF1);
this.addEventListener(Event.ENTER_FRAME, cpF2);
 
function cpF1(e:Event):void{
trace("cpF1")
}
function cpF2(e:Event):void{
trace("cpF2")
}

Don’t expect to have traces like “cpF2″ only. You’ll have “cpF1 cpF2″ traced on every frame. This is a very hard to find mistake, if you expect an object to have only one onEnterFrame listener but you add another.

Comments 2 Comments »

1086: Syntax error: expecting semicolon before line

Have you ever seen this error, when trying to move your fla from ActionScript 2 to ActionScript 3:

Location: tempInit, Line 2   Description: 1086: Syntax error: expecting semicolon before line.”

In my case the problem was that I had a movieclip with a Linkage identifier in my ActionScript 2 file that contained space in the name. When I moved to ActionScript 3 all my Linkage identifiers were converted to class names and when I tried to compile my AS3 flash file I got this error above.

So be careful when you name your linkage identifiers. Better use “camel case” instead of using spaces. This will help you move your ActionScript 2 fla file to ActionScript 3 fla file without seeing this error.

Happy coding!

Share

Comments No Comments »

If you use a standart timeline animation with a shape tween above a button and you want to call a function that sets the events for the button from a frame – put the call to the function after Read the rest of this entry »

Share

Comments No Comments »

Skinning Slider Component

In a comment on my previous post [AS3] Skinning Flash Components I was asked to show how to change the size of the thumb of the Slider component. After some experiments with the component here is the way it can be done:

import fl.controls.Slider;
 
var s:Slider = new Slider();
s.move(10,10);
s.setSize(500,300);
/*s.setStyle("thumbUpSkin", SliderThumbCustomSkin);
s.setStyle("thumbDownSkin", SliderThumbCustomSkin);
s.setStyle("thumbOverSkin", SliderThumbCustomSkin);*/
s.maximum = 100;
s.minimum = 0;
s.tickInterval = 5;
addChild(s);
s.getChildAt(1).width = 50;
s.getChildAt(1).height = 100;

With the code above I found that Read the rest of this entry »

Share

Comments 5 Comments »

Using PNG in a MovieClip with Blend mode set to Overlay causes strange artifacts in Flash player 10

As you can see in the flash demo below, in Flash player 10 the  left image has strange artifacts while in the right image there are no artifacts.

I used Alpha: 99% for the Movie clip with the PNG and the artifacts were gone. I’m not sure what causes the artifacts in FP10 and if this solution is the right one, but it worked for me.

Here is the demo flash: Read the rest of this entry »

Share

Comments 3 Comments »

Today I run into this strange problem while trying to scale a Sprite containing dynamic TextField. As you can see in the flash demo below, when you scale the Sprite the TextField retains its position in the Sprite container.

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

This is the code that I use for scaling: Read the rest of this entry »

Share

Comments 3 Comments »

You can easily skin a Flash component using only ActionScript using component’s method setStyle() providing as parameters:

  1. the name of the style and
  2. your class that you want to use as the skin.

Here is the list of the styles that can be used for skinning a component:
Read the rest of this entry »

Share

Comments 2 Comments »

TxEff - The Flash Text Effects