Home
> SlideshowBox 2
> Topic
How change gallery TextFormat in code? - FlashDevelop, AS3
Posted by user830441
How change gallery TextFormat in code? - FlashDevelop, AS3 September 21, 2011 03:07PM | Registered: 12 years ago Posts: 3 |
Re: How change gallery TextFormat in code? - FlashDevelop, AS3 September 22, 2011 10:57AM | Admin Registered: 13 years ago Posts: 248 |
Re: How change gallery TextFormat in code? - FlashDevelop, AS3 September 22, 2011 12:12PM | Registered: 12 years ago Posts: 3 |
Re: How change gallery TextFormat in code? - FlashDevelop, AS3 September 23, 2011 10:19AM | Admin Registered: 13 years ago Posts: 248 |
Re: How change gallery TextFormat in code? - FlashDevelop, AS3 September 23, 2011 12:10PM | Registered: 12 years ago Posts: 3 |
Finnaly i manage to get this work ...
for somebody else, who has same issue:
import com.jumpeye.events.SlideshowBoxEvent;
import flash.display.MovieClip;
import flash.text.Font;
public class Main extends MovieClip
{
[Embed(source = "../lib/Font.TTF", fontName = "FONT_NAME", mimeType='application/x-font', embedAsCFF='false')]
public static var FONT_CLASS:Class;
private myAlbum:SlideshowBox;
public function Main() {
Font.registerFont(FONT_CLASS);
myAlbum = new SlideshowBox();
myAlbum.addEventListener(SlideshowBoxEvent.TEMPLATE_CREATION_DONE, onTemplateCreated);
myAlbum.template = GetTemplate();
addChild(myAlbum);
}
function onTemplateCreated(e:SlideshowBoxEvent):void {
myAlbum.template.fontName = "FONT_NAME";
}
}
for somebody else, who has same issue:
import com.jumpeye.events.SlideshowBoxEvent;
import flash.display.MovieClip;
import flash.text.Font;
public class Main extends MovieClip
{
[Embed(source = "../lib/Font.TTF", fontName = "FONT_NAME", mimeType='application/x-font', embedAsCFF='false')]
public static var FONT_CLASS:Class;
private myAlbum:SlideshowBox;
public function Main() {
Font.registerFont(FONT_CLASS);
myAlbum = new SlideshowBox();
myAlbum.addEventListener(SlideshowBoxEvent.TEMPLATE_CREATION_DONE, onTemplateCreated);
myAlbum.template = GetTemplate();
addChild(myAlbum);
}
function onTemplateCreated(e:SlideshowBoxEvent):void {
myAlbum.template.fontName = "FONT_NAME";
}
}
Re: How change gallery TextFormat in code? - FlashDevelop, AS3 September 26, 2011 08:57AM | Admin Registered: 13 years ago Posts: 248 |
Sorry, only registered users may post in this forum.