Special characters in dynamic field big problem!!!
Dear friends, i buy some script on flash stock site but now i have problem.
In all text fields I’m embed fonts and special characters but i have problem with two fields, flash calls from .as file. Maybe I’m stupid but a don’t know a bit from action script.
Please, can somebody embed in this code fallowing characters: “žŽšŠđĐčČćĆ”.
Because when I run script that characters are missing in words. I’m use embedded font with name “my”.
Big Thanks!!!
//!-- UTF8
import flash.display.BitmapData;
import caurina.transitions.*;
import oxylus.tickerv1.main;
class oxylus.tickerv1.button extends MovieClip
{
private var loaded:Boolean = false;
private var node:XMLNode;
public var ord:Number;
private var arrow:MovieClip;
public var bg_normal:MovieClip;
public var bg_over:MovieClip;
private var Img:MovieClip;
private var pic:MovieClip;
private var picnormal:MovieClip;
private var picover:MovieClip;
public var title:MovieClip;
public var subtitle:MovieClip;
public var date:MovieClip;
private var wi:Number;
private var mcLoader:MovieClipLoader;
public function button()
{
arrow = this["arrow"];
bg_normal = this["bg_normal"];
bg_over = this["bg_over"];
arrow._x = 3;
arrow._y = bg_normal._height/2 - arrow._height/2;
pic = this["pic"];
picnormal = pic["normal"];
picover = pic["over"];
pic._x = 19;
pic._y = 8;
title = this.createEmptyMovieClip("title", this.getNextHighestDepth());
title.createTextField("txt", title.getNextHighestDepth(), 0, 0, 0, 25);
title["txt"].selectable = false;
title._x = 87;
title._y = 2;
subtitle = this.createEmptyMovieClip("subtitle", this.getNextHighestDepth());
subtitle.createTextField("txt", subtitle.getNextHighestDepth(), 0, 0, 290, 50);
subtitle["txt"].selectable = false;
subtitle["txt"].wordWrap = true;
subtitle._x = 87;
subtitle._y = 22;
date = this.createEmptyMovieClip("date", this.getNextHighestDepth());
date.createTextField("txt", date.getNextHighestDepth(), 0, 0, 55, 50);
date["txt"].selectable = false;
date._y = 5;
date._x = 320;
Img = pic.createEmptyMovieClip("myImage", pic.getNextHighestDepth());
Img._x = 2;
Img._y = 2;
wi = main.scrollerWidth;
mcLoader = new MovieClipLoader();
mcLoader.addListener(this);
}
public function setNode(n)
{
node = n;
title["txt"].text = node.attributes.title;
subtitle["txt"].text = node.attributes.subtitle;
title["txt"].antiAliasType = "normal";
title["txt"].embedFonts = true;
subtitle["txt"].antiAliasType = "normal";
subtitle["txt"].embedFonts = true;
date["txt"].text = node.attributes.date;
normalText(title["txt"], subtitle["txt"], date["txt"]);
mcLoader.loadClip(node.attributes.picture, Img);
resize();
}
private function resize()
{
bg_normal._width = wi;
bg_over._width = wi;
title["txt"]._width = wi - 140;
subtitle["txt"]._width = wi - 89;
date._x = wi - date._width;
}
private function onLoadInit(Img:MovieClip) {
var bd:BitmapData = new BitmapData(Img._width, Img._height);
bd.draw(Img);
Img.attachBitmap(bd, Img.getNextHighestDepth(), "always", true);
Img._width = Img._height = 56;
loaded = true;
}
private function onLoadError()
{
pic._visible = false;
title._x = 18;
title["txt"]._width = wi - 55 - 16;
title["txt"]._height = 40;
subtitle._x = 18;
subtitle["txt"]._width = wi - 22;
date._x = wi - date._width;
loaded = true;
}
private function onRelease()
{
if ((loaded)&&(this != main.cB)&&(main.moving==false))
{
onn();
main.moving = true;
main.cB = this;
var i:Number = 0;
for (i = 0; i < main.total; i++)
{
main.news["scroller"]["scrl"]["mlst"]["but" + (i)].onRollOut();
}
main.news["news_list"]["list"].goNext(node.firstChild.parentNode, ord);
}
}
public function onRollOver()
{
if ((loaded)&&(main.moving==false)){
overText(title["txt"], subtitle["txt"], date["txt"]);
Tweener.addTween(bg_normal, { _alpha:0, time:.2, transition:"linear", rounded:true } );
Tweener.addTween(picnormal, { _alpha:0, time:.2, transition:"linear", rounded:true } );
}
}
public function onRollOut()
{
if ((loaded)&&(this != main.cB)){
normalText(title["txt"], subtitle["txt"], date["txt"]);
Tweener.addTween(bg_normal, { _alpha:100, time:.2, transition:"linear", rounded:true } );
Tweener.addTween(picnormal, { _alpha:100, time:.2, transition:"linear", rounded:true } );
}
}
public function onn()
{
overText(title["txt"], subtitle["txt"], date["txt"]);
Tweener.addTween(bg_normal, { _alpha:0, time:.2, transition:"linear", rounded:true } );
Tweener.addTween(picnormal, { _alpha:0, time:.2, transition:"linear", rounded:true } );
}
public function normalText(theText:TextField, theText_:TextField, theText__:TextField)
{
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xa3a3a3;
my_fmt.font = "my";
my_fmt.size = 14;
theText.setTextFormat(my_fmt);
var my_fmt_:TextFormat = new TextFormat();
my_fmt_.color = 0x636363;
my_fmt_.font = "my";
my_fmt_.size = 12;
theText_.setTextFormat(my_fmt_);
var my_fmt__:TextFormat = new TextFormat();
my_fmt__.color = 0x3b3b3b;
my_fmt__.align = "right";
my_fmt__.font = "my";
my_fmt__.size = 10;
theText__.setTextFormat(my_fmt__);
}
private function overText(theText:TextField, theText_:TextField, theText__:TextField)
{
var my_fmt:TextFormat = new TextFormat();
my_fmt.color = 0xe5e5e5;
my_fmt.font = "my";
my_fmt.size = 14;
theText.setTextFormat(my_fmt);
var my_fmt_:TextFormat = new TextFormat();
my_fmt_.color = 0x999898;
my_fmt_.font = "my";
my_fmt_.size = 12;
theText_.setTextFormat(my_fmt_);
var my_fmt__:TextFormat = new TextFormat();
my_fmt__.color = 0x4e4e4e;
my_fmt__.align = "right";
my_fmt__.font = "my";
my_fmt__.size = 10;
theText__.setTextFormat(my_fmt__);
}
}