View the description of  active-x flash component

ASP Flash VBScript Examples

 Create Bitmap
 Create-Button
 Create Circle
 Create EditText
 Create Polygon
 Create Sound
 Create Text

 JScript Samples
 PHP Examples
 C# Code

Download

 Help File (71KB)
 ASFHelp.chm

 Full Trial (1.82MB)
 ASFDemo.zip




Active Server Flash Standard

Create Swf Flash Animation from ASP VBScript - Create-Button

Flash swf File Size: 1.34 KB
<% @LANGUAGE="VBSCRIPT" %>
<%

response.Buffer = true
response.CacheControl = "no-chache"

' Create flash movie object
set Movie = Server.CreateObject("eMarkASF.Movie")

' Set the stage size and background-color of flash movie
    Movie.SetSize 600, 229
    Movie.SetBackgroundColorEx "#FFD700"

' Use a color object
set color1 = Server.CreateObject("eMarkASF.Color")
    color1.ColorString = "#FFFFFF"
    
set color2 = Server.CreateObject("eMarkASF.Color")
    color2.ColorString = "red"

' Create flash objects and create four button shape for four button status of up, over, hit, down
set obj = Server.CreateObject("eMarkASF.FlashObject")
    obj.CreatePolygon 20, 50
    obj.AddPolygonLineTo 20,200
    obj.AddPolygonLineTo 200, 50
    obj.AddPolygonLineTo 20, 50
    obj.LineWidth = 4
    obj.SetRadialFill color1, color2
    
set obj2 = Server.CreateObject("eMarkASF.FlashObject")
    obj2.CreatePolygon 20, 50
    obj2.AddPolygonLineTo 20,200
    obj2.AddPolygonLineTo 200, 50
    obj2.AddPolygonLineTo 20, 50
    obj2.LineWidth = 4
    obj2.SetRadialFill color2, color1
    
' Create action object to set the button action
set Action = Server.CreateObject("eMarkASF.Action")
    Action.GetURL "http://www.google.com", "blank"

'//ActionConditions
'enum
'{
'    OverDownToIdle = 1,
'    IdleToOverDown = 2,
'    OutDownToIdle = 3,
'    OutDownToOverDown = 4,
'    OverDownToOutDown = 5,
'    OverDownToOverUp = 6,
'    OverUpToOverDown = 7,
'    OverUpToIdle = 8,
'    IdleToOverUp = 9
'};

' Create the button using the four shape
set btn = Server.CreateObject("eMarkASF.FlashObject")
    btn.CreateButton obj, obj2, obj, obj2
    btn.QueueEvent Action, 7
        
    Movie.AddObject btn

    obj.CreateOval 250,70,550,210
    obj.LineWidth = 0
    obj.SetRadialFill color1, color2    
    
    obj2.CreateOval 250,70,550,210
    obj2.LineWidth = 0
    obj2.SetRadialFill color2, color1
    
    color2.ColorString = "blue"    

' Create another button without action
set obj3 = Server.CreateObject("eMarkASF.FlashObject")
    obj3.CreateOval 250,70,550,210
    obj3.LineWidth = 0
    
    obj3.SetRadialFill color1, color2
    
set obj4 = Server.CreateObject("eMarkASF.FlashObject")
    obj4.CreateOval 250,70,550,210
    obj4.LineWidth = 0
    obj4.SetRadialFill color2, color1
    
    btn.CreateButton obj4, obj3, obj2, obj
    Movie.AddObject btn

    ' Output the swf binary data to browser directly
    response.contentType = "application/x-shockwave-flash"
    response.binarywrite Movie.Content

    ' Free all objects
    obj.Free
    obj2.Free
    obj3.Free
    obj4.Free
    Movie.Free
%>