Sample: UnicodeWithFontEmbedding.vbs - using Unicode text and embedding font into Flash movie

Submitted by eLenka on 20 April, 2011 - 13:42

The sample shows how to create Flash movie with SWF Scout SDK using Unicode text with font symbols embedded into SWF.

This flash movie can be viewed even without Arial Unicode MS font installed because font symbols are embedded into generated flash movie:

IMPORTANT NOTE: This sample requires Arial Unicode MS Unicode font installed on your computer.

VB Source Code:

  W = 640
  H = 480
  Set Movie = CreateObject("SWFScout.FlashMovie")
  Movie.InitLibrary "demo","demo"
 
' Initialize and start movie generation
 
  Movie.BeginMovie 0,0,W,H,1,12,6
  Movie.Compressed = true
  Movie.SetBackgroundColor 255,255,255
 
 Font = Movie.AddFont( "Arial Unicode MS",10,false, false,false,true,0)
 
 Text= Movie.AddTextEdit ("EditText","init string",0,0,0,255,Font,0,0,W,H)
 Movie.TEXT_LoadFromFile "UnicodeInput.txt", true
 Movie.TEXT_WordWrap = true
 Movie.TEXT_Multiline = true
 Movie.PlaceText Text, Movie.CurrentMaxDepth
 
 Movie.ShowFrame 1
 
 Movie.EndMovie
 
 Movie.SaveToFile "Unicode_WithFontEmbedding.swf"

 

Download source code and required files: