Internet Explorer ActiveX Control

The following example creates an Internet Explorer browser control in a rollout and registers it as extended viewport.

Pick "Web Page" from the Extended Views menu to display the rollout in the webpage. Also click various hypertext links to see the text change in the viewports

Sample Script

rollout rWebpage "Web page"

(

local txtObj

local vpsz = getViewSize()

activeXControl ax "http://www.yahoo.com" height:(vpsz.y-50) width:(vpsz.x-50) align:#center

 

fn checkTextObject =

(

if $text01 == undefined then

(

txtObj = text text:"" name:"text01"

addModifier txtObj (extrude amount:10)

txtObj.wirecolor = red

)

else ( txtObj = $text01 )

on rWebpage open do ( checkTextObject() )

on ax TitleChange txt do

(

checkTextObject()

if not (matchPattern txt pattern:"http:") then

(  

if txtObj.text != text then

(

print txt

txtObj.text = txt

max tool zoomextents all

)

)

)

)

fWebPage = newRolloutFloater "Web page" rWebpage.vpsz.x rWebpage.vpsz.y

addRollout rWebPage fWebPage

 

registerViewWindow fWebPage

showProperties rWebpage.ax

ms_ActiveX03.gif

 

WARNING:

Due to a recent change in ActiveX controls handling by Microsoft, URLs are ALWAYS expected to start with "http://". Thus, using just "www.yahoo.com" will work in 3ds Max 5 but not in 3ds Max 6 and 7!

See also

ActiveX Controls in MAXScript Rollouts