-
Why this code is not working?
Hello All,
Why this code is not working; it is all about rotating a text field inside an mc container.
Here is the code;
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
var label:TextField = container.createTextField("label", 1, 0, 0, 150, 20);
label.text = "Hello World";
_root["container"]._rotation = 90;
tried doing sonmething else like; _root["container"].label._rotation = 90;
and another trial with; label._rotation = 90;
All not working, the result is that the text disappears from stage.
Any tips, thanks!
-
.
Hi,
embedFonts is your problem, I think.
-
Hi,
could you please post the code here, or save the *.fla with an older version.
thanks!
-
.
Hi,
Unable to save lower, sorry.
Perhaps you can upgrade to a higher version or download a trial version, it is CS6.
You need to use embeFonts combined with textFormat, font needs to be in the library with AS linkage name.
You should be able to get it from those searches, or last solution, decompile it.
-
-
.
Hi,
The link just takes you to the create clips code !!!
PHP Code:
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
var textFormat:TextFormat = new TextFormat();
textFormat.font = "libraryFont";
textFormat.color = 0xFF0000;
textFormat.size = 12;
var label:TextField = container.createTextField("label", 1, 0, 0, 0, 20);
label.autoSize = true;
label.embedFonts = true;
label.text = "Hello World";
label.setTextFormat(textFormat);
container._rotation = 25;
remember the library font
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|