How to create Flash Lite compatible movie with SWF Scout (I-Mode, Symbian, Windows Mobile)

Submitted by eLenka on 19 April, 2011 - 11:58

The sample shows to create flash lite (i-Mode) compatible flash movie using SWF Scout SDK. 

SWF Scout provides ability to generate Flash Lite (and i-mode) compatible flash movies that can be played using Flash Lite player on i-Mode, Nokia, Symbian, Windows Mobile and other mobile devices.

shapes.swf flash lite movie generated by SWF Scout in i-mode HTML browseri-mode HTML browser window with keys

To generate flash lite compatible flash movie just set SWF Version to 101 (Flash Lite format) in .BeginMovie method and don't forget to set appropriate size. Most mobile devices provides 240x320 pixels screen so we set width to 240 and height to 320 for our flash movie

See also: moving ball using keys example (flash lite, i-mode)

 

' you can find source code of this example Shapes.vbs along with required image files in  "Examples\More Examples\Lite" sub-folder
 
  W = 240 ' width
  H = 320 ' height
  Set Movie = CreateObject("SWFScout.FlashMovie")
 
  Movie.InitLibrary "demo","demo"
 
  Movie.BeginMovie 0,0,W,H,1,12,101' 101 is Flash Lite compatible SWF version
  Movie.SetBackgroundColor 255,255,255
 
Font = Movie.AddFont( "Arial",8, true,false,false,false,0) ' 0 = DEFAULT_CHARSET
FontBig = Movie.AddFont("Arial",12,true,false,false,false,0) ' 0 = DEFAULT_CHARSET
 
' SHAPES
 
Text = Movie.AddText2("SHAPES",0,0,0,255,FontBig, W / 2, H / 2,2)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
Movie.ShowFrame 10
Movie.PLACE_FadeIn 0.5 ' fade in
 
' shapes
' all kinds of shapes
 
' rectangle
Text = Movie.AddText("Rectangle",0,0,0,255,Font, 0, 5, 75, 80)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
 
Shape = Movie.AddShape
Movie.SHAPE_Rectangle 0, 20, 80, 70
Movie.SHAPE_SetSolidColor 145,245,245,true,255
 
Movie.PlaceShape Shape,Movie.CurrentMaxDepth
 
' circle
Text = Movie.AddText("Circle",0,0,0,255,Font, 80, 5, 150, 80)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
 
Shape = Movie.AddShape
Movie.SHAPE_Circle 110, 30, 52
Movie.SHAPE_SetSolidColor 145,145,100,true,255
Movie.PlaceShape Shape,Movie.CurrentMaxDepth
 
' pie
Text = Movie.AddText("Pie",0,0,0,255,Font, 160, 5, 230, 80)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
 
Shape = Movie.AddShape
Movie.SHAPE_Pie 175, 52, 30, 30, 0, 270
Movie.SHAPE_SetSolidColor 245,145,145,true,155
Movie.PlaceShape Shape,Movie.CurrentMaxDepth
 
' star
Text = Movie.AddText("Star",0,0,0,255,Font, 230, 5, 320, 80)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
 
Shape = Movie.AddShape
Movie.SHAPE_Star 270,55,30,5, 7,True
 
Movie.SHAPE_SetSolidColor 135,135,200,true,215
Movie.PlaceShape Shape,Movie.CurrentMaxDepth
 
' polygon
Text = Movie.AddText("Polygon",0,0,0,255,Font, 0, 85, 80, 115)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
 
Shape= Movie.AddShape
Movie.SHAPE_BeginPolygon
Movie.SHAPE_AddPolygonPoint 5,105
Movie.SHAPE_AddPolygonPoint 115,0
Movie.SHAPE_AddPolygonPoint 145, 20
Movie.SHAPE_AddPolygonPoint 125, 25
Movie.SHAPE_AddPolygonPoint 115, 30
Movie.SHAPE_AddPolygonPoint 120, 32
Movie.SHAPE_EndPolygon
Movie.SHAPE_SetSolidColor 135,135,200,true,215
 
Movie.PlaceShape Shape,Movie.CurrentMaxDepth
 
'Arc  (closed)
 
Text = Movie.AddText("Arc",0,0,0,255,Font,  85, 85, 160, 115)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
 
Shape = Movie.AddShape
Movie.SHAPE_Arc 120, 145,25, 30, 7,135,TRUE
 
Movie.SHAPE_SetSolidColor 135,135,200,true,215
Movie.PlaceShape Shape,Movie.CurrentMaxDepth
 
'Ellipse
 
Text = Movie.AddText("Ellipse",0,0,0,255,Font,  170, 85, 230, 115)
Movie.PlaceText Text,Movie.CurrentMaxDepth ' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
 
Shape = Movie.AddShape
Movie.SHAPE_Ellipse 170, 115, 220, 220
 
Movie.SHAPE_SetSolidColor 65,82,100,true,105
Movie.PlaceShape Shape,Movie.CurrentMaxDepth
 
'Ring
 
Text = Movie.AddText("Ring",0,0,0,255,Font,  85,250, 300, 115)
Movie.PlaceText Text,Movie.CurrentMaxDepth' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
 
Shape = Movie.AddShape
Movie.SHAPE_Ring 270, 145,30, 25
 
Movie.SHAPE_SetSolidColor 95,125,90,true,215
Movie.PlaceShape Shape,Movie.CurrentMaxDepth
 
'Diamond
 
Text = Movie.AddText("Diamond",0,0,0,255,Font,  0, 160, 85, 200)
Movie.PlaceText Text,Movie.CurrentMaxDepth' place text
Movie.PLACE_FadeOut 0.5 ' fade out text
 
Shape = Movie.AddShape
Movie.SHAPE_Diamond 0, 360,170,480
 
Movie.SHAPE_SetSolidColor 155,105,200,true,215
Movie.PlaceShape Shape,Movie.CurrentMaxDepth
 
Movie.ShowFrame 30
 
Movie.EndMovie
 
Movie.SaveToFile "Shapes.swf"

 

Download source code: