MAXScript Tools and Interaction with 3ds Max > Creating MAXScript Tools > ActiveX Controls in MAXScript Rollouts > Typical ActiveX Controls > Other ActiveX Control Examples >

# Shockwave Flash ActiveX Object Events

Note

ActiveX Controls have been deprecated by Microsoft in the latest versions of the Windows operating system in favor of the DotNet framework and its controls.

While MAXScript still supports ActiveX controls, these have to be installed and registered on the system to be accessible to MAXScript.

As a replacement of ActiveX controls, MAXScript supports DotNet controls in 3ds Max 9 and higher.

The following example might not work unless the used ActiveX control is installed on your system.

Here is a sample script that creates a text object and sets the text to FSCommand event argument value sent by Shockwave Flash objects:

EXAMPLE
    rollout rFlash "Shockwave Flash Object"
    (
    local txtObj
    fn checkTextObject =
    (
    if $text01 == undefined then
    (
    txtObj = text text:"" name:"text01"
    addModifier txtObj (extrude amount:10)
    txtObj.wirecolor = red
    rotate txtObj 90 x_axis
    )
    else ( txtObj = $text01 )
    )
    activeXControl axFlash "{D27CDB6E-AE6D-11CF-96B8-444553540000}" height:200 width:300 align:#left
    on axFlash OnReadyStateChange arg1 do format "handler: OnReadyStateChange : %\n" arg1
    on axFlash OnProgress arg1 do format "handler: OnProgress : %\n" arg1
    on axFlash FSCommand arg1 arg2 do
    (
    checkTextObject()
    txtObj.text = arg1 + "+" + arg2
    max tool zoomextents all
    )
    on rFlash open do
    (
    axFlash.movie = "e:\\Movie1.swf"
    axFlash.movie = "e:\\Movie1.swf" -- need to load 2nd time sometimes
    checkTextObject();
    )
    )
    flashFloater = newRolloutFloater "Shockwave Flash Object" 350 300 10 10
    addRollout rFlash flashFloater

#### See Also

- ActiveX Controls in MAXScript Rollouts