How to change FPS, height and width of SWF flash movie file using SWF Scout library
Submitted by eLenka on 6 July, 2011 - 14:38
This sample demonstrates changing width, height and FPS (frames per second) parameters of existing SWF flash movie file using SWF Scout SDK.
Input and output flash movies - width, height and FPS (speed) are changed:
→
VB Source Code:
' read information about source flash file SWFFileName = "Shapes.swf" NewWidth = 800 NewHeight = 600 NewTop = -100 NewLeft = -70 ' read information about current width, height, top and left Set SWFFileInfo = CreateObject("SWFScout.SWFFileInfo") SWFFileInfo.LoadFile SWFFileName FPS = SWFFileInfo.FPS Height = SWFFileInfo.YMax - SWFFileInfo.YMin Width = SWFFileInfo.XMax - SWFFileInfo.XMin CurrentTop = SWFFileInfo.XMin CurrentLeft = SWFFileInfo.XMin Coord = SWFFileInfo.SystemCoord Set SWFFileInfo = nothing ' now create new movie with same width, height and fps Set Movie = CreateObject("SWFScout.FlashMovie") Movie.InitLibrary "demo","demo" Movie.BeginMovie NewLeft,NewTop,NewWidth,NewHeight,Coord,FPS,6 ExtSWF= Movie.AddExternalSWF ("shapes.swf", 0, true) ' 0 is seimRoot mode = we "merge" external swf into current Movie.EndMovie Movie.SaveToFile "ReBoundSWFMovie.swf"
Download source code: