|
Create flash slideshow using low-level methods to implement effects (rotation,
scaling, movements)
IMPORTANT: if you are looking for not for low-level SWF API but for "ready-to-use" library for converting JPG, BMP, PNG images into flash slideshow with transition effects - please check our SWF SlideShow Scout Library Extended slide show samples:
Generated Flash slide show movie:
download ZIP with all required files and VB script VB source code: W = 640
H = 480
MaxDepth = 65000
FramesPerImage
= 18 ' number of frames
for every image in slide show
Set
Movie = CreateObject("SWFScout.FlashMovie")
Movie.InitLibrary
"demo","demo"
' Movie
creating and setting parameters
Movie.BeginMovie
0,0,W,H,1,12,6
Movie.Compressed
= true
Movie.SetBackgroundColor
255,255,255
'
//////// image #1
img1 = Movie.AddImageFromFileName("NewImage1.jpg")
Shape1 = Movie.AddShape
Movie.SHAPE_RoundRect
0, 0, W, H, 10
Movie.SHAPE_SetImageFill
img1, 1 ' sfimFit
fill image mode = 1
' //////////
just show first image
Place1 = Movie.PlaceShape
(Shape1, 1) ' show
first image
Movie.PLACE_FadeOut
0.5
Movie.ShowFrame
5
'
///////// image #2
img2 = Movie.AddImageFromFileName("NewImage2.jpg")
Shape2 = Movie.AddShape
Movie.SHAPE_RoundRect
0, 0, W, H, 10
Movie.SHAPE_SetImageFill
img2, 1 ' sfimFit
fill image mode = 1
Movie.PlaceShape
Shape2, 2 ' place
new image on next depth
' /////////
moving
FOR
k = 1 to
10
Movie.PlaceShape
Shape2, 2 ' place
new image on next depth
Movie.PLACE_SetScale
0.1, 0.1
Movie.PLACE_SetTranslate
k*30, k*30
Movie.PLACE_AutoRemoveDepth
= true
Movie.ShowFrame
1
NEXT
' /////////
scaling, rotating
FOR
k = 1 to
10
Movie.PlaceShape
Shape2, 2 ' place
new image on next depth
Movie.PLACE_SetScale
k*0.1, k*0.1
Movie.PLACE_SetTranslate
300-k*30,300 -k*30
Movie.PLACE_SetRotate
k*36
Movie.PLACE_AutoRemoveDepth
= true
Movie.ShowFrame
1
NEXT
Place2 = Movie.PLACE_Index
Movie.ShowFrame
5
' ///////////
image #3
img3 = Movie.AddImageFromFileName("NewImage3.jpg")
Shape3 = Movie.AddShape
Movie.SHAPE_RoundRect
0, 0, W, H, 10
Movie.SHAPE_SetImageFill
img3, 1 ' sfimFit
fill image mode = 1
Movie.ShowFrame
5
Movie.RemoveObject
1
Movie.PlaceShape
Shape3, 1 ' place
new image instead of first image
Movie.PLACE_Index
= Place2
Movie.PLACE_FadeIn
1
Movie.RemoveObject
2
Movie.ShowFrame
5
Movie.PlaceShape
Shape1, 0 ' place
new image on next depth
' ///
rotate
FOR
k = 1 to
10
Movie.PlaceShape
Shape3, 1 ' place
new image on next depth
Movie.PLACE_SetTranslate
W - k*50, H - k*50
Movie.PLACE_SetScale
3/k, 3/k
Movie.PLACE_SetRotate
36*k
Movie.PLACE_AutoRemoveDepth
= true
Movie.ShowFrame
1
NEXT
' ///
translate x,y
FOR
k = 1 to
20
Movie.PlaceShape
Shape3, 1 ' place
new image on next depth
Movie.PLACE_SetScale
0.3/k, 0.3/k
Movie.PLACE_SetRotate
36*k
Movie.PLACE_AutoRemoveDepth
= true
Movie.ShowFrame
1
NEXT
Movie.RemoveObject
1
Movie.ShowFrame
5
Movie.EndMovie
Movie.SaveToFile
"SlideShowWithEffects.swf"
download ZIP with all required files and VB script Extended slide show samples: |
|
|
Copyright © ByteScout, 2003-2010. Privacy Statement
Microsoft®, Windows®, Windows 2000®, Windows Server®, Windows Vista®, Internet Explorer®, .NET Framework®, ActiveX®, Visual Basic®, Visual C#®, ASP®, ASP.NET®, Excel®, PowerPoint®, are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Adobe®, Flash® and Acrobat® are registered trademarks of Adobe Systems, Incorporated. Mozilla®, Firefox® and the Mozilla and Firefox Logos are registered trademarks of the Mozilla Foundation. Other product names or brandnames used herein are for identification purposes only and might be trademarks or registered trademarks of their respective companies. We disclaim any and all rights to those marks. |
|